diff --git a/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/__pycache__/__init__.cpython-310.pyc b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f1e96313362e9649cf18f485fc6abe82cacc7dc8 Binary files /dev/null and b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/__pycache__/__init__.cpython-310.pyc differ diff --git a/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/__pycache__/compiler.cpython-310.pyc b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/__pycache__/compiler.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7ed76a063a25fa75fe80b8e1259df86fc5dc5004 Binary files /dev/null and b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/__pycache__/compiler.cpython-310.pyc differ diff --git a/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/__pycache__/data.cpython-310.pyc b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/__pycache__/data.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0a599a78ab97a7a62696bfc1c5b14c0bb897c0a7 Binary files /dev/null and b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/__pycache__/data.cpython-310.pyc differ diff --git a/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/__pycache__/display.cpython-310.pyc b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/__pycache__/display.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1c7d3a2901195f97155027ffc3a79253b7a54b00 Binary files /dev/null and b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/__pycache__/display.cpython-310.pyc differ diff --git a/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/__pycache__/theme.cpython-310.pyc b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/__pycache__/theme.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f27a4a300b27d3cd8bda71f4a503614789646c93 Binary files /dev/null and b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/__pycache__/theme.cpython-310.pyc differ diff --git a/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/__init__.py b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3be8148dbf3cd5b2ae7ed65526787a64b72a1707 --- /dev/null +++ b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/__init__.py @@ -0,0 +1,571 @@ +# ruff: noqa: F403, F405 +# The contents of this file are automatically written by +# tools/generate_schema_wrapper.py. Do not modify directly. + +from altair.vegalite.v5.schema import channels, core +from altair.vegalite.v5.schema.channels import * +from altair.vegalite.v5.schema.core import * + +SCHEMA_VERSION = "v5.20.1" + +SCHEMA_URL = "https://vega.github.io/schema/vega-lite/v5.20.1.json" + +__all__ = [ + "SCHEMA_URL", + "SCHEMA_VERSION", + "URI", + "X2", + "Y2", + "Aggregate", + "AggregateOp", + "AggregateTransform", + "AggregatedFieldDef", + "Align", + "AllSortString", + "Angle", + "AngleDatum", + "AngleValue", + "AnyMark", + "AnyMarkConfig", + "AreaConfig", + "ArgmaxDef", + "ArgminDef", + "AutoSizeParams", + "AutosizeType", + "Axis", + "AxisConfig", + "AxisOrient", + "AxisResolveMap", + "BBox", + "BarConfig", + "BaseTitleNoValueRefs", + "Baseline", + "BinExtent", + "BinParams", + "BinTransform", + "BindCheckbox", + "BindDirect", + "BindInput", + "BindRadioSelect", + "BindRange", + "Binding", + "BinnedTimeUnit", + "Blend", + "BoxPlot", + "BoxPlotConfig", + "BoxPlotDef", + "BrushConfig", + "CalculateTransform", + "Categorical", + "Color", + "ColorDatum", + "ColorDef", + "ColorName", + "ColorScheme", + "ColorValue", + "Column", + "CompositeMark", + "CompositeMarkDef", + "CompositionConfig", + "ConcatSpecGenericSpec", + "ConditionalAxisColor", + "ConditionalAxisLabelAlign", + "ConditionalAxisLabelBaseline", + "ConditionalAxisLabelFontStyle", + "ConditionalAxisLabelFontWeight", + "ConditionalAxisNumber", + "ConditionalAxisNumberArray", + "ConditionalAxisPropertyAlignnull", + "ConditionalAxisPropertyColornull", + "ConditionalAxisPropertyFontStylenull", + "ConditionalAxisPropertyFontWeightnull", + "ConditionalAxisPropertyTextBaselinenull", + "ConditionalAxisPropertynumberArraynull", + "ConditionalAxisPropertynumbernull", + "ConditionalAxisPropertystringnull", + "ConditionalAxisString", + "ConditionalMarkPropFieldOrDatumDef", + "ConditionalMarkPropFieldOrDatumDefTypeForShape", + "ConditionalParameterMarkPropFieldOrDatumDef", + "ConditionalParameterMarkPropFieldOrDatumDefTypeForShape", + "ConditionalParameterStringFieldDef", + "ConditionalParameterValueDefGradientstringnullExprRef", + "ConditionalParameterValueDefTextExprRef", + "ConditionalParameterValueDefnumber", + "ConditionalParameterValueDefnumberArrayExprRef", + "ConditionalParameterValueDefnumberExprRef", + "ConditionalParameterValueDefstringExprRef", + "ConditionalParameterValueDefstringnullExprRef", + "ConditionalPredicateMarkPropFieldOrDatumDef", + "ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape", + "ConditionalPredicateStringFieldDef", + "ConditionalPredicateValueDefAlignnullExprRef", + "ConditionalPredicateValueDefColornullExprRef", + "ConditionalPredicateValueDefFontStylenullExprRef", + "ConditionalPredicateValueDefFontWeightnullExprRef", + "ConditionalPredicateValueDefGradientstringnullExprRef", + "ConditionalPredicateValueDefTextBaselinenullExprRef", + "ConditionalPredicateValueDefTextExprRef", + "ConditionalPredicateValueDefnumber", + "ConditionalPredicateValueDefnumberArrayExprRef", + "ConditionalPredicateValueDefnumberArraynullExprRef", + "ConditionalPredicateValueDefnumberExprRef", + "ConditionalPredicateValueDefnumbernullExprRef", + "ConditionalPredicateValueDefstringExprRef", + "ConditionalPredicateValueDefstringnullExprRef", + "ConditionalStringFieldDef", + "ConditionalValueDefGradientstringnullExprRef", + "ConditionalValueDefTextExprRef", + "ConditionalValueDefnumber", + "ConditionalValueDefnumberArrayExprRef", + "ConditionalValueDefnumberExprRef", + "ConditionalValueDefstringExprRef", + "ConditionalValueDefstringnullExprRef", + "Config", + "CsvDataFormat", + "Cursor", + "Cyclical", + "Data", + "DataFormat", + "DataSource", + "Datasets", + "DateTime", + "DatumChannelMixin", + "DatumDef", + "Day", + "DensityTransform", + "DerivedStream", + "Description", + "DescriptionValue", + "Detail", + "DictInlineDataset", + "DictSelectionInit", + "DictSelectionInitInterval", + "Diverging", + "DomainUnionWith", + "DsvDataFormat", + "Element", + "Encoding", + "EncodingSortField", + "ErrorBand", + "ErrorBandConfig", + "ErrorBandDef", + "ErrorBar", + "ErrorBarConfig", + "ErrorBarDef", + "ErrorBarExtent", + "EventStream", + "EventType", + "Expr", + "ExprRef", + "ExtentTransform", + "Facet", + "FacetEncodingFieldDef", + "FacetFieldDef", + "FacetSpec", + "FacetedEncoding", + "FacetedUnitSpec", + "Feature", + "FeatureCollection", + "FeatureGeometryGeoJsonProperties", + "Field", + "FieldChannelMixin", + "FieldDefWithoutScale", + "FieldEqualPredicate", + "FieldGTEPredicate", + "FieldGTPredicate", + "FieldLTEPredicate", + "FieldLTPredicate", + "FieldName", + "FieldOneOfPredicate", + "FieldOrDatumDefWithConditionDatumDefGradientstringnull", + "FieldOrDatumDefWithConditionDatumDefnumber", + "FieldOrDatumDefWithConditionDatumDefnumberArray", + "FieldOrDatumDefWithConditionDatumDefstringnull", + "FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull", + "FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull", + "FieldOrDatumDefWithConditionMarkPropFieldDefnumber", + "FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray", + "FieldOrDatumDefWithConditionStringDatumDefText", + "FieldOrDatumDefWithConditionStringFieldDefText", + "FieldOrDatumDefWithConditionStringFieldDefstring", + "FieldRange", + "FieldRangePredicate", + "FieldValidPredicate", + "Fill", + "FillDatum", + "FillOpacity", + "FillOpacityDatum", + "FillOpacityValue", + "FillValue", + "FilterTransform", + "Fit", + "FlattenTransform", + "FoldTransform", + "FontStyle", + "FontWeight", + "FormatConfig", + "Generator", + "GenericUnitSpecEncodingAnyMark", + "GeoJsonFeature", + "GeoJsonFeatureCollection", + "GeoJsonProperties", + "Geometry", + "GeometryCollection", + "Gradient", + "GradientStop", + "GraticuleGenerator", + "GraticuleParams", + "HConcatSpecGenericSpec", + "Header", + "HeaderConfig", + "HexColor", + "Href", + "HrefValue", + "ImputeMethod", + "ImputeParams", + "ImputeSequence", + "ImputeTransform", + "InlineData", + "InlineDataset", + "Interpolate", + "IntervalSelectionConfig", + "IntervalSelectionConfigWithoutType", + "JoinAggregateFieldDef", + "JoinAggregateTransform", + "JsonDataFormat", + "Key", + "LabelOverlap", + "LatLongDef", + "LatLongFieldDef", + "Latitude", + "Latitude2", + "Latitude2Datum", + "Latitude2Value", + "LatitudeDatum", + "LayerRepeatMapping", + "LayerRepeatSpec", + "LayerSpec", + "LayoutAlign", + "Legend", + "LegendBinding", + "LegendConfig", + "LegendOrient", + "LegendResolveMap", + "LegendStreamBinding", + "LineConfig", + "LineString", + "LinearGradient", + "LocalMultiTimeUnit", + "LocalSingleTimeUnit", + "Locale", + "LoessTransform", + "LogicalAndPredicate", + "LogicalNotPredicate", + "LogicalOrPredicate", + "Longitude", + "Longitude2", + "Longitude2Datum", + "Longitude2Value", + "LongitudeDatum", + "LookupSelection", + "LookupTransform", + "Mark", + "MarkConfig", + "MarkDef", + "MarkInvalidDataMode", + "MarkPropDefGradientstringnull", + "MarkPropDefnumber", + "MarkPropDefnumberArray", + "MarkPropDefstringnullTypeForShape", + "MarkType", + "MergedStream", + "Month", + "MultiLineString", + "MultiPoint", + "MultiPolygon", + "MultiTimeUnit", + "NamedData", + "NonArgAggregateOp", + "NonLayerRepeatSpec", + "NonNormalizedSpec", + "NumberLocale", + "NumericArrayMarkPropDef", + "NumericMarkPropDef", + "OffsetDef", + "Opacity", + "OpacityDatum", + "OpacityValue", + "Order", + "OrderFieldDef", + "OrderOnlyDef", + "OrderValue", + "OrderValueDef", + "Orient", + "Orientation", + "OverlayMarkDef", + "Padding", + "ParameterExtent", + "ParameterName", + "ParameterPredicate", + "Parse", + "ParseValue", + "PivotTransform", + "Point", + "PointSelectionConfig", + "PointSelectionConfigWithoutType", + "PolarDef", + "Polygon", + "Position", + "Position2Def", + "PositionDatumDef", + "PositionDatumDefBase", + "PositionDef", + "PositionFieldDef", + "PositionFieldDefBase", + "PositionValueDef", + "Predicate", + "PredicateComposition", + "PrimitiveValue", + "Projection", + "ProjectionConfig", + "ProjectionType", + "QuantileTransform", + "RadialGradient", + "Radius", + "Radius2", + "Radius2Datum", + "Radius2Value", + "RadiusDatum", + "RadiusValue", + "RangeConfig", + "RangeEnum", + "RangeRaw", + "RangeRawArray", + "RangeScheme", + "RectConfig", + "RegressionTransform", + "RelativeBandSize", + "RepeatMapping", + "RepeatRef", + "RepeatSpec", + "Resolve", + "ResolveMode", + "Root", + "Row", + "RowColLayoutAlign", + "RowColboolean", + "RowColnumber", + "RowColumnEncodingFieldDef", + "SampleTransform", + "Scale", + "ScaleBinParams", + "ScaleBins", + "ScaleConfig", + "ScaleDatumDef", + "ScaleFieldDef", + "ScaleInterpolateEnum", + "ScaleInterpolateParams", + "ScaleInvalidDataConfig", + "ScaleInvalidDataShowAsValueangle", + "ScaleInvalidDataShowAsValuecolor", + "ScaleInvalidDataShowAsValuefill", + "ScaleInvalidDataShowAsValuefillOpacity", + "ScaleInvalidDataShowAsValueopacity", + "ScaleInvalidDataShowAsValueradius", + "ScaleInvalidDataShowAsValueshape", + "ScaleInvalidDataShowAsValuesize", + "ScaleInvalidDataShowAsValuestroke", + "ScaleInvalidDataShowAsValuestrokeDash", + "ScaleInvalidDataShowAsValuestrokeOpacity", + "ScaleInvalidDataShowAsValuestrokeWidth", + "ScaleInvalidDataShowAsValuetheta", + "ScaleInvalidDataShowAsValuex", + "ScaleInvalidDataShowAsValuexOffset", + "ScaleInvalidDataShowAsValuey", + "ScaleInvalidDataShowAsValueyOffset", + "ScaleInvalidDataShowAsangle", + "ScaleInvalidDataShowAscolor", + "ScaleInvalidDataShowAsfill", + "ScaleInvalidDataShowAsfillOpacity", + "ScaleInvalidDataShowAsopacity", + "ScaleInvalidDataShowAsradius", + "ScaleInvalidDataShowAsshape", + "ScaleInvalidDataShowAssize", + "ScaleInvalidDataShowAsstroke", + "ScaleInvalidDataShowAsstrokeDash", + "ScaleInvalidDataShowAsstrokeOpacity", + "ScaleInvalidDataShowAsstrokeWidth", + "ScaleInvalidDataShowAstheta", + "ScaleInvalidDataShowAsx", + "ScaleInvalidDataShowAsxOffset", + "ScaleInvalidDataShowAsy", + "ScaleInvalidDataShowAsyOffset", + "ScaleResolveMap", + "ScaleType", + "SchemaBase", + "SchemeParams", + "SecondaryFieldDef", + "SelectionConfig", + "SelectionInit", + "SelectionInitInterval", + "SelectionInitIntervalMapping", + "SelectionInitMapping", + "SelectionParameter", + "SelectionResolution", + "SelectionType", + "SequenceGenerator", + "SequenceParams", + "SequentialMultiHue", + "SequentialSingleHue", + "Shape", + "ShapeDatum", + "ShapeDef", + "ShapeValue", + "SharedEncoding", + "SingleDefUnitChannel", + "SingleTimeUnit", + "Size", + "SizeDatum", + "SizeValue", + "Sort", + "SortArray", + "SortByChannel", + "SortByChannelDesc", + "SortByEncoding", + "SortField", + "SortOrder", + "Spec", + "SphereGenerator", + "StackOffset", + "StackTransform", + "StandardType", + "Step", + "StepFor", + "Stream", + "StringFieldDef", + "StringFieldDefWithCondition", + "StringValueDefWithCondition", + "Stroke", + "StrokeCap", + "StrokeDash", + "StrokeDashDatum", + "StrokeDashValue", + "StrokeDatum", + "StrokeJoin", + "StrokeOpacity", + "StrokeOpacityDatum", + "StrokeOpacityValue", + "StrokeValue", + "StrokeWidth", + "StrokeWidthDatum", + "StrokeWidthValue", + "StyleConfigIndex", + "SymbolShape", + "Text", + "TextBaseline", + "TextDatum", + "TextDef", + "TextDirection", + "TextValue", + "Theta", + "Theta2", + "Theta2Datum", + "Theta2Value", + "ThetaDatum", + "ThetaValue", + "TickConfig", + "TickCount", + "TimeInterval", + "TimeIntervalStep", + "TimeLocale", + "TimeUnit", + "TimeUnitParams", + "TimeUnitTransform", + "TimeUnitTransformParams", + "TitleAnchor", + "TitleConfig", + "TitleFrame", + "TitleOrient", + "TitleParams", + "Tooltip", + "TooltipContent", + "TooltipValue", + "TopLevelConcatSpec", + "TopLevelFacetSpec", + "TopLevelHConcatSpec", + "TopLevelLayerSpec", + "TopLevelParameter", + "TopLevelRepeatSpec", + "TopLevelSelectionParameter", + "TopLevelSpec", + "TopLevelUnitSpec", + "TopLevelVConcatSpec", + "TopoDataFormat", + "Transform", + "Type", + "TypeForShape", + "TypedFieldDef", + "UnitSpec", + "UnitSpecWithFrame", + "Url", + "UrlData", + "UrlValue", + "UtcMultiTimeUnit", + "UtcSingleTimeUnit", + "VConcatSpecGenericSpec", + "ValueChannelMixin", + "ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull", + "ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull", + "ValueDefWithConditionMarkPropFieldOrDatumDefnumber", + "ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray", + "ValueDefWithConditionMarkPropFieldOrDatumDefstringnull", + "ValueDefWithConditionStringFieldDefText", + "ValueDefnumber", + "ValueDefnumberwidthheightExprRef", + "VariableParameter", + "Vector2DateTime", + "Vector2Vector2number", + "Vector2boolean", + "Vector2number", + "Vector2string", + "Vector3number", + "Vector7string", + "Vector10string", + "Vector12string", + "VegaLiteSchema", + "ViewBackground", + "ViewConfig", + "WindowEventType", + "WindowFieldDef", + "WindowOnlyOp", + "WindowTransform", + "X", + "X2Datum", + "X2Value", + "XDatum", + "XError", + "XError2", + "XError2Value", + "XErrorValue", + "XOffset", + "XOffsetDatum", + "XOffsetValue", + "XValue", + "Y", + "Y2Datum", + "Y2Value", + "YDatum", + "YError", + "YError2", + "YError2Value", + "YErrorValue", + "YOffset", + "YOffsetDatum", + "YOffsetValue", + "YValue", + "channels", + "core", + "load_schema", + "with_property_setters", +] diff --git a/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/__pycache__/_typing.cpython-310.pyc b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/__pycache__/_typing.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..553439d86b26b734d813dfb19fe9ac18f8647e7b Binary files /dev/null and b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/__pycache__/_typing.cpython-310.pyc differ diff --git a/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/_config.py b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/_config.py new file mode 100644 index 0000000000000000000000000000000000000000..b5d4020ffaa030cd470d012ab64bde428b7ff070 --- /dev/null +++ b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/_config.py @@ -0,0 +1,7777 @@ +# The contents of this file are automatically written by +# tools/generate_schema_wrapper.py. Do not modify directly. + +from __future__ import annotations + +import sys +from typing import TYPE_CHECKING, Any, Literal, TypedDict + +if sys.version_info >= (3, 14): + from typing import TypedDict +else: + from typing_extensions import TypedDict +from ._typing import PaddingKwds, RowColKwds + +if TYPE_CHECKING: + # ruff: noqa: F405 + from collections.abc import Sequence + + from ._typing import * # noqa: F403 + + +__all__ = [ + "AreaConfigKwds", + "AutoSizeParamsKwds", + "AxisConfigKwds", + "AxisResolveMapKwds", + "BarConfigKwds", + "BindCheckboxKwds", + "BindDirectKwds", + "BindInputKwds", + "BindRadioSelectKwds", + "BindRangeKwds", + "BoxPlotConfigKwds", + "BrushConfigKwds", + "CompositionConfigKwds", + "ConfigKwds", + "DateTimeKwds", + "DerivedStreamKwds", + "ErrorBandConfigKwds", + "ErrorBarConfigKwds", + "FeatureGeometryGeoJsonPropertiesKwds", + "FormatConfigKwds", + "GeoJsonFeatureCollectionKwds", + "GeoJsonFeatureKwds", + "GeometryCollectionKwds", + "GradientStopKwds", + "HeaderConfigKwds", + "IntervalSelectionConfigKwds", + "IntervalSelectionConfigWithoutTypeKwds", + "LegendConfigKwds", + "LegendResolveMapKwds", + "LegendStreamBindingKwds", + "LineConfigKwds", + "LineStringKwds", + "LinearGradientKwds", + "LocaleKwds", + "MarkConfigKwds", + "MergedStreamKwds", + "MultiLineStringKwds", + "MultiPointKwds", + "MultiPolygonKwds", + "NumberLocaleKwds", + "OverlayMarkDefKwds", + "PaddingKwds", + "PointKwds", + "PointSelectionConfigKwds", + "PointSelectionConfigWithoutTypeKwds", + "PolygonKwds", + "ProjectionConfigKwds", + "ProjectionKwds", + "RadialGradientKwds", + "RangeConfigKwds", + "RectConfigKwds", + "ResolveKwds", + "RowColKwds", + "ScaleConfigKwds", + "ScaleInvalidDataConfigKwds", + "ScaleResolveMapKwds", + "SelectionConfigKwds", + "StepKwds", + "StyleConfigIndexKwds", + "ThemeConfig", + "TickConfigKwds", + "TimeIntervalStepKwds", + "TimeLocaleKwds", + "TitleConfigKwds", + "TitleParamsKwds", + "TooltipContentKwds", + "TopLevelSelectionParameterKwds", + "VariableParameterKwds", + "ViewBackgroundKwds", + "ViewConfigKwds", +] + + +class AreaConfigKwds(TypedDict, total=False): + """ + :class:`altair.AreaConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + align + The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). + One of ``"left"``, ``"right"``, ``"center"``. + + **Note:** Expression reference is *not* supported for range marks. + angle + The rotation angle of the text, in degrees. + aria + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG element, removing the mark item from the ARIA accessibility tree. + ariaRole + Sets the type of user interface element of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "role" attribute. Warning: this + property is experimental and may be changed in the future. + ariaRoleDescription + A human-readable, author-localized description for the role of the mark item for + `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "aria-roledescription" attribute. + Warning: this property is experimental and may be changed in the future. + aspect + Whether to keep aspect ratio of image marks. + baseline + For text marks, the vertical text baseline. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an + expression reference that provides one of the valid values. The ``"line-top"`` and + ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are + calculated relative to the ``lineHeight`` rather than ``fontSize`` alone. + + For range marks, the vertical alignment of the marks. One of ``"top"``, + ``"middle"``, ``"bottom"``. + + **Note:** Expression reference is *not* supported for range marks. + blend + The color blend mode for drawing an item on its current background. Any valid `CSS + mix-blend-mode `__ + value can be used. + + __Default value:__ ``"source-over"`` + color + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + cornerRadius + The radius in pixels of rounded rectangles or arcs' corners. + + **Default value:** ``0`` + cornerRadiusBottomLeft + The radius in pixels of rounded rectangles' bottom left corner. + + **Default value:** ``0`` + cornerRadiusBottomRight + The radius in pixels of rounded rectangles' bottom right corner. + + **Default value:** ``0`` + cornerRadiusTopLeft + The radius in pixels of rounded rectangles' top right corner. + + **Default value:** ``0`` + cornerRadiusTopRight + The radius in pixels of rounded rectangles' top left corner. + + **Default value:** ``0`` + cursor + The mouse cursor used over the mark. Any valid `CSS cursor type + `__ can be used. + description + A text description of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the `"aria-label" attribute + `__. + dir + The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` + (right-to-left). This property determines on which side is truncated in response to + the limit parameter. + + **Default value:** ``"ltr"`` + dx + The horizontal offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + dy + The vertical offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + ellipsis + The ellipsis string for text truncated in response to the limit parameter. + + **Default value:** ``"…"`` + endAngle + The end angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + fill + Default fill color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove fill. + + **Default value:** (None) + fillOpacity + The fill opacity (value between [0,1]). + + **Default value:** ``1`` + filled + Whether the mark's color should be used as fill color instead of stroke color. + + **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well + as ``geoshape`` marks for `graticule + `__ data sources; + otherwise, ``true``. + + **Note:** This property cannot be used in a `style config + `__. + font + The typeface to set the text in (e.g., ``"Helvetica Neue"``). + fontSize + The font size, in pixels. + + **Default value:** ``11`` + fontStyle + The font style (e.g., ``"italic"``). + fontWeight + The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a + number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and + ``"bold"`` = ``700``). + height + Height of the marks. + href + A URL to load upon mouse click. If defined, the mark acts as a hyperlink. + innerRadius + The inner radius in pixels of arc marks. ``innerRadius`` is an alias for + ``radius2``. + + **Default value:** ``0`` + interpolate + The line interpolation method to use for line and area marks. One of the following: + + * ``"linear"``: piecewise linear segments, as in a polyline. + * ``"linear-closed"``: close the linear segments to form a polygon. + * ``"step"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"step-before"``: alternate between vertical and horizontal segments, as in a + step function. + * ``"step-after"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"basis"``: a B-spline, with control point duplication on the ends. + * ``"basis-open"``: an open B-spline; may not intersect the start or end. + * ``"basis-closed"``: a closed B-spline, as in a loop. + * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends. + * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end, + but will intersect other control points. + * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop. + * ``"bundle"``: equivalent to basis, except the tension parameter is used to + straighten the spline. + * ``"monotone"``: cubic interpolation that preserves monotonicity in y. + invalid + Invalid data mode, which defines how the marks and corresponding scales should + represent invalid values (``null`` and ``NaN`` in continuous scales *without* + defined output for invalid values). + + * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and + *scales*. For path marks (for line, area, trail), this option will create paths + that connect valid points, as if the data rows with invalid values do not exist. + + * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at + invalid values. For non-path marks, this is equivalent to ``"filter"``. All + *scale* domains will *exclude* these filtered data points. + + * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid + values. Hide invalid values for non-path marks. All *scale* domains will + *include* these filtered data points (for both path and non-path marks). + + * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each + scale will use the output for invalid values defined in ``config.scale.invalid`` + or, if unspecified, by default invalid values will produce the same visual values + as zero (if the scale includes zero) or the minimum value (if the scale does not + include zero). + + * ``"break-paths-show-path-domains"`` (default) — This is equivalent to + ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and + ``"filter"`` for non-path marks. + + **Note**: If any channel's scale has an output for invalid values defined in + ``config.scale.invalid``, all values for the scales will be considered "valid" since + they can produce a reasonable output for the scales. Thus, fields for such channels + will not be filtered and will not cause path breaks. + limit + The maximum length of the text mark in pixels. The text value will be automatically + truncated if the rendered size exceeds the limit. + + **Default value:** ``0`` -- indicating no limit + line + A flag for overlaying line on top of area marks, or an object defining the + properties of the overlayed lines. + + * If this value is an empty object (``{}``) or ``true``, lines with default + properties will be used. + + * If this value is ``false``, no lines would be automatically added to area marks. + + **Default value:** ``false``. + lineBreak + A delimiter, such as a newline character, upon which to break text strings into + multiple lines. This property is ignored if the text is array-valued. + lineHeight + The line height in pixels (the spacing between subsequent lines of text) for + multi-line text marks. + opacity + The overall opacity (value between [0,1]). + + **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, + ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. + order + For line and trail marks, this ``order`` property can be set to ``null`` or + ``false`` to make the lines use the original order in the data sources. + orient + The orientation of a non-stacked bar, tick, area, and line charts. The value is + either horizontal (default) or vertical. + + * For bar, rule and tick, this determines whether the size of the bar and tick + should be applied to x or y dimension. + * For area, this property determines the orient property of the Vega output. + * For line and trail marks, this property determines the sort order of the points in + the line if ``config.sortLineBy`` is not specified. For stacked charts, this is + always determined by the orientation of the stack; therefore explicitly specified + value will be ignored. + outerRadius + The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``. + + **Default value:** ``0`` + padAngle + The angular padding applied to sides of the arc, in radians. + point + A flag for overlaying points on top of line or area marks, or an object defining the + properties of the overlayed points. + + * If this property is ``"transparent"``, transparent points will be used (for + enhancing tooltips and selections). + + * If this property is an empty object (``{}``) or ``true``, filled points with + default properties will be used. + + * If this property is ``false``, no points would be automatically added to line or + area marks. + + **Default value:** ``false``. + radius + For arc mark, the primary (outer) radius in pixels. + + For text marks, polar coordinate radial offset, in pixels, of the text from the + origin determined by the ``x`` and ``y`` properties. + + **Default value:** ``min(plot_width, plot_height)/2`` + radius2 + The secondary (inner) radius in pixels of arc marks. + + **Default value:** ``0`` + shape + Shape of the point marks. Supported values include: + + * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, + ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or + ``"triangle-left"``. + * the line symbol ``"stroke"`` + * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` + * a custom `SVG path string + `__ (For correct + sizing, custom shape paths should be defined within a square bounding box with + coordinates ranging from -1 to 1 along both the x and y dimensions.) + + **Default value:** ``"circle"`` + size + Default size for marks. + + * For ``point``/``circle``/``square``, this represents the pixel area of the marks. + Note that this value sets the area of the symbol; the side lengths will increase + with the square root of this value. + * For ``bar``, this represents the band size of the bar, in pixels. + * For ``text``, this represents the font size, in pixels. + + **Default value:** + + * ``30`` for point, circle, square marks; width/height's ``step`` + * ``2`` for bar marks with discrete dimensions; + * ``5`` for bar marks with continuous dimensions; + * ``11`` for text marks. + smooth + A boolean flag (default true) indicating if the image should be smoothed when + resized. If false, individual pixels should be scaled directly rather than + interpolated with smoothing. For SVG rendering, this option may not work in some + browsers due to lack of standardization. + startAngle + The start angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + stroke + Default stroke color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove stroke. + + **Default value:** (None) + strokeCap + The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or + ``"square"``. + + **Default value:** ``"butt"`` + strokeDash + An array of alternating stroke, space lengths for creating dashed or dotted lines. + strokeDashOffset + The offset (in pixels) into which to begin drawing with the stroke dash array. + strokeJoin + The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. + + **Default value:** ``"miter"`` + strokeMiterLimit + The miter limit at which to bevel a line join. + strokeOffset + The offset in pixels at which to draw the group stroke and fill. If unspecified, the + default behavior is to dynamically offset stroked groups such that 1 pixel stroke + widths align with the pixel grid. + strokeOpacity + The stroke opacity (value between [0,1]). + + **Default value:** ``1`` + strokeWidth + The stroke width, in pixels. + tension + Depending on the interpolation type, sets the tension parameter (for line and area + marks). + text + Placeholder text if the ``text`` channel is not specified + theta + * For arc marks, the arc length in radians if theta2 is not specified, otherwise the + start arc angle. (A value of 0 indicates up or “north”, increasing values proceed + clockwise.) + + * For text marks, polar coordinate angle in radians. + theta2 + The end angle of arc marks in radians. A value of 0 indicates up or “north”, + increasing values proceed clockwise. + timeUnitBandPosition + Default relative band position for a time unit. If set to ``0``, the marks will be + positioned at the beginning of the time unit band step. If set to ``0.5``, the marks + will be positioned in the middle of the time unit band step. + timeUnitBandSize + Default relative band size for a time unit. If set to ``1``, the bandwidth of the + marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the + marks will be half of the time unit band step. + tooltip + The tooltip text string to show upon mouse hover or an object defining which fields + should the tooltip be derived from. + + * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from + ``encoding`` will be used. + * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the + highlighted data point will be used. + * If set to ``null`` or ``false``, then no tooltip will be used. + + See the `tooltip `__ + documentation for a detailed discussion about tooltip in Vega-Lite. + + **Default value:** ``null`` + url + The URL of the image file for image marks. + width + Width of the marks. + x + X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without + specified ``x2`` or ``width``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2 + X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + y + Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without + specified ``y2`` or ``height``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2 + Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + """ + + align: Align_T + angle: float + aria: bool + ariaRole: str + ariaRoleDescription: str + aspect: bool + baseline: TextBaseline_T + blend: Blend_T + color: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T + cornerRadius: float + cornerRadiusBottomLeft: float + cornerRadiusBottomRight: float + cornerRadiusTopLeft: float + cornerRadiusTopRight: float + cursor: Cursor_T + description: str + dir: TextDirection_T + dx: float + dy: float + ellipsis: str + endAngle: float + fill: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None + fillOpacity: float + filled: bool + font: str + fontSize: float + fontStyle: str + fontWeight: FontWeight_T + height: float + href: str + innerRadius: float + interpolate: Interpolate_T + invalid: MarkInvalidDataMode_T | None + limit: float + line: bool | OverlayMarkDefKwds + lineBreak: str + lineHeight: float + opacity: float + order: bool | None + orient: Orientation_T + outerRadius: float + padAngle: float + point: bool | OverlayMarkDefKwds | Literal["transparent"] + radius: float + radius2: float + shape: str + size: float + smooth: bool + startAngle: float + stroke: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None + strokeCap: StrokeCap_T + strokeDash: Sequence[float] + strokeDashOffset: float + strokeJoin: StrokeJoin_T + strokeMiterLimit: float + strokeOffset: float + strokeOpacity: float + strokeWidth: float + tension: float + text: str | Sequence[str] + theta: float + theta2: float + timeUnitBandPosition: float + timeUnitBandSize: float + tooltip: str | bool | float | TooltipContentKwds | None + url: str + width: float + x: float | Literal["width"] + x2: float | Literal["width"] + y: float | Literal["height"] + y2: float | Literal["height"] + + +class AutoSizeParamsKwds(TypedDict, total=False): + """ + :class:`altair.AutoSizeParams` ``TypedDict`` wrapper. + + Parameters + ---------- + contains + Determines how size calculation should be performed, one of ``"content"`` or + ``"padding"``. The default setting (``"content"``) interprets the width and height + settings as the data rectangle (plotting) dimensions, to which padding is then + added. In contrast, the ``"padding"`` setting includes the padding within the view + size calculations, such that the width and height settings indicate the **total** + intended size of the view. + + **Default value**: ``"content"`` + resize + A boolean flag indicating if autosize layout should be re-calculated on every view + update. + + **Default value**: ``false`` + type + The sizing format type. One of ``"pad"``, ``"fit"``, ``"fit-x"``, ``"fit-y"``, or + ``"none"``. See the `autosize type + `__ documentation for + descriptions of each. + + **Default value**: ``"pad"`` + """ + + contains: Literal["content", "padding"] + resize: bool + type: AutosizeType_T + + +class AxisConfigKwds(TypedDict, total=False): + """ + :class:`altair.AxisConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + aria + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG group, removing the axis from the ARIA accessibility tree. + + **Default value:** ``true`` + bandPosition + An interpolation fraction indicating where, for ``band`` scales, axis ticks should + be positioned. A value of ``0`` places ticks at the left edge of their bands. A + value of ``0.5`` places ticks in the middle of their bands. + + **Default value:** ``0.5`` + description + A text description of this axis for `ARIA accessibility + `__ (SVG output + only). If the ``aria`` property is true, for SVG output the `"aria-label" attribute + `__ + will be set to this description. If the description is unspecified it will be + automatically generated. + disable + Disable axis by default. + domain + A boolean flag indicating if the domain (the axis baseline) should be included as + part of the axis. + + **Default value:** ``true`` + domainCap + The stroke cap for the domain line's ending style. One of ``"butt"``, ``"round"`` or + ``"square"``. + + **Default value:** ``"butt"`` + domainColor + Color of axis domain line. + + **Default value:** ``"gray"``. + domainDash + An array of alternating [stroke, space] lengths for dashed domain lines. + domainDashOffset + The pixel offset at which to start drawing with the domain dash array. + domainOpacity + Opacity of the axis domain line. + domainWidth + Stroke width of axis domain line + + **Default value:** ``1`` + format + When used with the default ``"number"`` and ``"time"`` format type, the text + formatting pattern for labels of guides (axes, legends, headers) and text marks. + + * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's + `number format pattern `__. + * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time + format pattern `__. + + See the `format documentation `__ + for more examples. + + When used with a `custom formatType + `__, this + value will be passed as ``format`` alongside ``datum.value`` to the registered + function. + + **Default value:** Derived from `numberFormat + `__ config for number + format and from `timeFormat + `__ config for time + format. + formatType + The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom + format type + `__. + + **Default value:** + + * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``. + * ``"number"`` for quantitative fields as well as ordinal and nominal fields without + ``timeUnit``. + grid + 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``. + gridCap + The stroke cap for grid lines' ending style. One of ``"butt"``, ``"round"`` or + ``"square"``. + + **Default value:** ``"butt"`` + gridColor + Color of gridlines. + + **Default value:** ``"lightGray"``. + gridDash + An array of alternating [stroke, space] lengths for dashed grid lines. + gridDashOffset + The pixel offset at which to start drawing with the grid dash array. + gridOpacity + The stroke opacity of grid (value between [0,1]) + + **Default value:** ``1`` + gridWidth + The grid width, in pixels. + + **Default value:** ``1`` + labelAlign + Horizontal text alignment of axis tick labels, overriding the default setting for + the current axis orientation. + labelAngle + The rotation angle of the axis labels. + + **Default value:** ``-90`` for nominal and ordinal fields; ``0`` otherwise. + labelBaseline + Vertical text baseline of axis tick labels, overriding the default setting for the + current axis orientation. One of ``"alphabetic"`` (default), ``"top"``, + ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The ``"line-top"`` + and ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but + are calculated relative to the *lineHeight* rather than *fontSize* alone. + labelBound + Indicates if labels should be hidden if they exceed the axis range. If ``false`` + (the default) no bounds overlap analysis is performed. If ``true``, labels will be + hidden if they exceed the axis range by more than 1 pixel. If this property is a + number, it specifies the pixel tolerance: the maximum amount by which a label + bounding box may exceed the axis range. + + **Default value:** ``false``. + labelColor + The color of the tick label, can be in hex color code or regular color name. + labelExpr + `Vega expression `__ for customizing + labels. + + **Note:** The label text and value can be assessed via the ``label`` and ``value`` + properties of the axis's backing ``datum`` object. + labelFlush + Indicates if the first and last axis labels should be aligned flush with the scale + range. Flush alignment for a horizontal axis will left-align the first label and + right-align the last label. For vertical axes, bottom and top text baselines are + applied instead. If this property is a number, it also indicates the number of + pixels by which to offset the first and last labels; for example, a value of 2 will + flush-align the first and last labels and also push them 2 pixels outward from the + center of the axis. The additional adjustment can sometimes help the labels better + visually group with corresponding axis ticks. + + **Default value:** ``true`` for axis of a continuous x-scale. Otherwise, ``false``. + labelFlushOffset + Indicates the number of pixels by which to offset flush-adjusted labels. For + example, a value of ``2`` will push flush-adjusted labels 2 pixels outward from the + center of the axis. Offsets can help the labels better visually group with + corresponding axis ticks. + + **Default value:** ``0``. + labelFont + The font of the tick label. + labelFontSize + The font size of the label, in pixels. + labelFontStyle + Font style of the title. + labelFontWeight + Font weight of axis tick labels. + labelLimit + Maximum allowed pixel width of axis tick labels. + + **Default value:** ``180`` + labelLineHeight + Line height in pixels for multi-line label text or label text with ``"line-top"`` or + ``"line-bottom"`` baseline. + labelOffset + Position offset in pixels to apply to labels, in addition to tickOffset. + + **Default value:** ``0`` + labelOpacity + The opacity of the labels. + labelOverlap + The strategy to use for resolving overlap of axis labels. If ``false`` (the + default), no overlap reduction is attempted. If set to ``true`` or ``"parity"``, a + strategy of removing every other label is used (this works well for standard linear + axes). If set to ``"greedy"``, a linear scan of the labels is performed, removing + any labels that overlaps with the last visible label (this often works better for + log-scaled axes). + + **Default value:** ``true`` for non-nominal fields with non-log scales; ``"greedy"`` + for log scales; otherwise ``false``. + labelPadding + The padding in pixels between labels and ticks. + + **Default value:** ``2`` + labelSeparation + The minimum separation that must be between label bounding boxes for them to be + considered non-overlapping (default ``0``). This property is ignored if + *labelOverlap* resolution is not enabled. + labels + A boolean flag indicating if labels should be included as part of the axis. + + **Default value:** ``true``. + maxExtent + The maximum extent in pixels that axis ticks and labels should use. This determines + a maximum offset value for axis titles. + + **Default value:** ``undefined``. + minExtent + The minimum extent in pixels that axis ticks and labels should use. This determines + a minimum offset value for axis titles. + + **Default value:** ``30`` for y-axis; ``undefined`` for x-axis. + offset + 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) + orient + 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., + a y-axis oriented towards the right edge of the chart). + + **Default value:** ``"bottom"`` for x-axes and ``"left"`` for y-axes. + position + The anchor position of the axis in pixels. For x-axes with top or bottom + orientation, this sets the axis group x coordinate. For y-axes with left or right + orientation, this sets the axis group y coordinate. + + **Default value**: ``0`` + style + A string or array of strings indicating the name of custom styles to apply to the + axis. A style is a named collection of axis property defined within the `style + configuration `__. If + style is an array, later styles will override earlier styles. + + **Default value:** (none) **Note:** Any specified style will augment the default + style. For example, an x-axis mark with ``"style": "foo"`` will use ``config.axisX`` + and ``config.style.foo`` (the specified style ``"foo"`` has higher precedence). + tickBand + For band scales, indicates if ticks and grid lines should be placed at the + ``"center"`` of a band (default) or at the band ``"extent"``s to indicate intervals + tickCap + The stroke cap for the tick lines' ending style. One of ``"butt"``, ``"round"`` or + ``"square"``. + + **Default value:** ``"butt"`` + tickColor + The color of the axis's tick. + + **Default value:** ``"gray"`` + tickCount + A desired number of ticks, for axes visualizing quantitative scales. The resulting + number may be different so that values are "nice" (multiples of 2, 5, 10) and lie + within the underlying scale's range. + + For scales of type ``"time"`` or ``"utc"``, the tick count can instead be a time + interval specifier. Legal string values are ``"millisecond"``, ``"second"``, + ``"minute"``, ``"hour"``, ``"day"``, ``"week"``, ``"month"``, and ``"year"``. + Alternatively, an object-valued interval specifier of the form ``{"interval": + "month", "step": 3}`` includes a desired number of interval steps. Here, ticks are + generated for each quarter (Jan, Apr, Jul, Oct) boundary. + + **Default value**: Determine using a formula ``ceil(width/40)`` for x and + ``ceil(height/40)`` for y. + tickDash + An array of alternating [stroke, space] lengths for dashed tick mark lines. + tickDashOffset + The pixel offset at which to start drawing with the tick mark dash array. + tickExtra + Boolean flag indicating if an extra axis tick should be added for the initial + position of the axis. This flag is useful for styling axes for ``band`` scales such + that ticks are placed on band boundaries rather in the middle of a band. Use in + conjunction with ``"bandPosition": 1`` and an axis ``"padding"`` value of ``0``. + tickMinStep + The minimum desired step between axis ticks, in terms of scale domain values. For + example, a value of ``1`` indicates that ticks should not be less than 1 unit apart. + If ``tickMinStep`` is specified, the ``tickCount`` value will be adjusted, if + necessary, to enforce the minimum step value. + tickOffset + Position offset in pixels to apply to ticks, labels, and gridlines. + tickOpacity + Opacity of the ticks. + tickRound + Boolean flag indicating if pixel position values should be rounded to the nearest + integer. + + **Default value:** ``true`` + tickSize + The size in pixels of axis ticks. + + **Default value:** ``5`` + tickWidth + The width, in pixels, of ticks. + + **Default value:** ``1`` + ticks + Boolean value that determines whether the axis should include ticks. + + **Default value:** ``true`` + title + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + titleAlign + Horizontal text alignment of axis titles. + titleAnchor + Text anchor position for placing axis titles. + titleAngle + Angle in degrees of axis titles. + titleBaseline + Vertical text baseline for axis titles. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The + ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and + ``"bottom"``, but are calculated relative to the *lineHeight* rather than *fontSize* + alone. + titleColor + Color of the title, can be in hex color code or regular color name. + titleFont + Font of the title. (e.g., ``"Helvetica Neue"``). + titleFontSize + Font size of the title. + titleFontStyle + Font style of the title. + titleFontWeight + Font weight of the title. This can be either a string (e.g ``"bold"``, ``"normal"``) + or a number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` + and ``"bold"`` = ``700``). + titleLimit + Maximum allowed pixel width of axis titles. + titleLineHeight + Line height in pixels for multi-line title text or title text with ``"line-top"`` or + ``"line-bottom"`` baseline. + titleOpacity + Opacity of the axis title. + titlePadding + The padding, in pixels, between title and axis. + titleX + X-coordinate of the axis title relative to the axis group. + titleY + Y-coordinate of the axis title relative to the axis group. + translate + Coordinate space translation offset for axis layout. By default, axes are translated + by a 0.5 pixel offset for both the x and y coordinates in order to align stroked + lines with the pixel grid. However, for vector graphics output these pixel-specific + adjustments may be undesirable, in which case translate can be changed (for example, + to zero). + + **Default value:** ``0.5`` + values + Explicitly set the visible axis tick values. + zindex + A non-negative integer indicating the z-index of the axis. If zindex is 0, axes + should be drawn behind all chart elements. To put them in front, set ``zindex`` to + ``1`` or more. + + **Default value:** ``0`` (behind the marks). + """ + + aria: bool + bandPosition: float + description: str + disable: bool + domain: bool + domainCap: StrokeCap_T + domainColor: ColorHex | ColorName_T | None + domainDash: Sequence[float] + domainDashOffset: float + domainOpacity: float + domainWidth: float + format: str + formatType: str + grid: bool + gridCap: StrokeCap_T + gridColor: ColorHex | ColorName_T | None + gridDash: Sequence[float] + gridDashOffset: float + gridOpacity: float + gridWidth: float + labelAlign: Align_T + labelAngle: float + labelBaseline: TextBaseline_T + labelBound: bool | float + labelColor: ColorHex | ColorName_T | None + labelExpr: str + labelFlush: bool | float + labelFlushOffset: float + labelFont: str + labelFontSize: float + labelFontStyle: str + labelFontWeight: FontWeight_T + labelLimit: float + labelLineHeight: float + labelOffset: float + labelOpacity: float + labelOverlap: bool | Literal["greedy", "parity"] + labelPadding: float + labelSeparation: float + labels: bool + maxExtent: float + minExtent: float + offset: float + orient: AxisOrient_T + position: float + style: str | Sequence[str] + tickBand: Literal["center", "extent"] + tickCap: StrokeCap_T + tickColor: ColorHex | ColorName_T | None + tickCount: float | TimeIntervalStepKwds | TimeInterval_T + tickDash: Sequence[float] + tickDashOffset: float + tickExtra: bool + tickMinStep: float + tickOffset: float + tickOpacity: float + tickRound: bool + tickSize: float + tickWidth: float + ticks: bool + title: str | Sequence[str] | None + titleAlign: Align_T + titleAnchor: TitleAnchor_T + titleAngle: float + titleBaseline: TextBaseline_T + titleColor: ColorHex | ColorName_T | None + titleFont: str + titleFontSize: float + titleFontStyle: str + titleFontWeight: FontWeight_T + titleLimit: float + titleLineHeight: float + titleOpacity: float + titlePadding: float + titleX: float + titleY: float + translate: float + values: Sequence[str] | Sequence[bool] | Sequence[float] | Sequence[DateTimeKwds] + zindex: float + + +class AxisResolveMapKwds(TypedDict, total=False): + """ + :class:`altair.AxisResolveMap` ``TypedDict`` wrapper. + + Parameters + ---------- + x + + y + + """ + + x: ResolveMode_T + y: ResolveMode_T + + +class BarConfigKwds(TypedDict, total=False): + """ + :class:`altair.BarConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + align + The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). + One of ``"left"``, ``"right"``, ``"center"``. + + **Note:** Expression reference is *not* supported for range marks. + angle + The rotation angle of the text, in degrees. + aria + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG element, removing the mark item from the ARIA accessibility tree. + ariaRole + Sets the type of user interface element of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "role" attribute. Warning: this + property is experimental and may be changed in the future. + ariaRoleDescription + A human-readable, author-localized description for the role of the mark item for + `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "aria-roledescription" attribute. + Warning: this property is experimental and may be changed in the future. + aspect + Whether to keep aspect ratio of image marks. + baseline + For text marks, the vertical text baseline. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an + expression reference that provides one of the valid values. The ``"line-top"`` and + ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are + calculated relative to the ``lineHeight`` rather than ``fontSize`` alone. + + For range marks, the vertical alignment of the marks. One of ``"top"``, + ``"middle"``, ``"bottom"``. + + **Note:** Expression reference is *not* supported for range marks. + binSpacing + Offset between bars for binned field. The ideal value for this is either 0 + (preferred by statisticians) or 1 (Vega-Lite default, D3 example style). + + **Default value:** ``1`` + blend + The color blend mode for drawing an item on its current background. Any valid `CSS + mix-blend-mode `__ + value can be used. + + __Default value:__ ``"source-over"`` + color + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + continuousBandSize + The default size of the bars on continuous scales. + + **Default value:** ``5`` + cornerRadius + The radius in pixels of rounded rectangles or arcs' corners. + + **Default value:** ``0`` + cornerRadiusBottomLeft + The radius in pixels of rounded rectangles' bottom left corner. + + **Default value:** ``0`` + cornerRadiusBottomRight + The radius in pixels of rounded rectangles' bottom right corner. + + **Default value:** ``0`` + cornerRadiusEnd + * For vertical bars, top-left and top-right corner radius. + + * For horizontal bars, top-right and bottom-right corner radius. + cornerRadiusTopLeft + The radius in pixels of rounded rectangles' top right corner. + + **Default value:** ``0`` + cornerRadiusTopRight + The radius in pixels of rounded rectangles' top left corner. + + **Default value:** ``0`` + cursor + The mouse cursor used over the mark. Any valid `CSS cursor type + `__ can be used. + description + A text description of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the `"aria-label" attribute + `__. + dir + The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` + (right-to-left). This property determines on which side is truncated in response to + the limit parameter. + + **Default value:** ``"ltr"`` + discreteBandSize + The default size of the bars with discrete dimensions. If unspecified, the default + size is ``step-2``, which provides 2 pixel offset between bars. + dx + The horizontal offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + dy + The vertical offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + ellipsis + The ellipsis string for text truncated in response to the limit parameter. + + **Default value:** ``"…"`` + endAngle + The end angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + fill + Default fill color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove fill. + + **Default value:** (None) + fillOpacity + The fill opacity (value between [0,1]). + + **Default value:** ``1`` + filled + Whether the mark's color should be used as fill color instead of stroke color. + + **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well + as ``geoshape`` marks for `graticule + `__ data sources; + otherwise, ``true``. + + **Note:** This property cannot be used in a `style config + `__. + font + The typeface to set the text in (e.g., ``"Helvetica Neue"``). + fontSize + The font size, in pixels. + + **Default value:** ``11`` + fontStyle + The font style (e.g., ``"italic"``). + fontWeight + The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a + number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and + ``"bold"`` = ``700``). + height + Height of the marks. + href + A URL to load upon mouse click. If defined, the mark acts as a hyperlink. + innerRadius + The inner radius in pixels of arc marks. ``innerRadius`` is an alias for + ``radius2``. + + **Default value:** ``0`` + interpolate + The line interpolation method to use for line and area marks. One of the following: + + * ``"linear"``: piecewise linear segments, as in a polyline. + * ``"linear-closed"``: close the linear segments to form a polygon. + * ``"step"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"step-before"``: alternate between vertical and horizontal segments, as in a + step function. + * ``"step-after"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"basis"``: a B-spline, with control point duplication on the ends. + * ``"basis-open"``: an open B-spline; may not intersect the start or end. + * ``"basis-closed"``: a closed B-spline, as in a loop. + * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends. + * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end, + but will intersect other control points. + * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop. + * ``"bundle"``: equivalent to basis, except the tension parameter is used to + straighten the spline. + * ``"monotone"``: cubic interpolation that preserves monotonicity in y. + invalid + Invalid data mode, which defines how the marks and corresponding scales should + represent invalid values (``null`` and ``NaN`` in continuous scales *without* + defined output for invalid values). + + * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and + *scales*. For path marks (for line, area, trail), this option will create paths + that connect valid points, as if the data rows with invalid values do not exist. + + * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at + invalid values. For non-path marks, this is equivalent to ``"filter"``. All + *scale* domains will *exclude* these filtered data points. + + * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid + values. Hide invalid values for non-path marks. All *scale* domains will + *include* these filtered data points (for both path and non-path marks). + + * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each + scale will use the output for invalid values defined in ``config.scale.invalid`` + or, if unspecified, by default invalid values will produce the same visual values + as zero (if the scale includes zero) or the minimum value (if the scale does not + include zero). + + * ``"break-paths-show-path-domains"`` (default) — This is equivalent to + ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and + ``"filter"`` for non-path marks. + + **Note**: If any channel's scale has an output for invalid values defined in + ``config.scale.invalid``, all values for the scales will be considered "valid" since + they can produce a reasonable output for the scales. Thus, fields for such channels + will not be filtered and will not cause path breaks. + limit + The maximum length of the text mark in pixels. The text value will be automatically + truncated if the rendered size exceeds the limit. + + **Default value:** ``0`` -- indicating no limit + lineBreak + A delimiter, such as a newline character, upon which to break text strings into + multiple lines. This property is ignored if the text is array-valued. + lineHeight + The line height in pixels (the spacing between subsequent lines of text) for + multi-line text marks. + minBandSize + The minimum band size for bar and rectangle marks. **Default value:** ``0.25`` + opacity + The overall opacity (value between [0,1]). + + **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, + ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. + order + For line and trail marks, this ``order`` property can be set to ``null`` or + ``false`` to make the lines use the original order in the data sources. + orient + The orientation of a non-stacked bar, tick, area, and line charts. The value is + either horizontal (default) or vertical. + + * For bar, rule and tick, this determines whether the size of the bar and tick + should be applied to x or y dimension. + * For area, this property determines the orient property of the Vega output. + * For line and trail marks, this property determines the sort order of the points in + the line if ``config.sortLineBy`` is not specified. For stacked charts, this is + always determined by the orientation of the stack; therefore explicitly specified + value will be ignored. + outerRadius + The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``. + + **Default value:** ``0`` + padAngle + The angular padding applied to sides of the arc, in radians. + radius + For arc mark, the primary (outer) radius in pixels. + + For text marks, polar coordinate radial offset, in pixels, of the text from the + origin determined by the ``x`` and ``y`` properties. + + **Default value:** ``min(plot_width, plot_height)/2`` + radius2 + The secondary (inner) radius in pixels of arc marks. + + **Default value:** ``0`` + shape + Shape of the point marks. Supported values include: + + * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, + ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or + ``"triangle-left"``. + * the line symbol ``"stroke"`` + * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` + * a custom `SVG path string + `__ (For correct + sizing, custom shape paths should be defined within a square bounding box with + coordinates ranging from -1 to 1 along both the x and y dimensions.) + + **Default value:** ``"circle"`` + size + Default size for marks. + + * For ``point``/``circle``/``square``, this represents the pixel area of the marks. + Note that this value sets the area of the symbol; the side lengths will increase + with the square root of this value. + * For ``bar``, this represents the band size of the bar, in pixels. + * For ``text``, this represents the font size, in pixels. + + **Default value:** + + * ``30`` for point, circle, square marks; width/height's ``step`` + * ``2`` for bar marks with discrete dimensions; + * ``5`` for bar marks with continuous dimensions; + * ``11`` for text marks. + smooth + A boolean flag (default true) indicating if the image should be smoothed when + resized. If false, individual pixels should be scaled directly rather than + interpolated with smoothing. For SVG rendering, this option may not work in some + browsers due to lack of standardization. + startAngle + The start angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + stroke + Default stroke color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove stroke. + + **Default value:** (None) + strokeCap + The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or + ``"square"``. + + **Default value:** ``"butt"`` + strokeDash + An array of alternating stroke, space lengths for creating dashed or dotted lines. + strokeDashOffset + The offset (in pixels) into which to begin drawing with the stroke dash array. + strokeJoin + The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. + + **Default value:** ``"miter"`` + strokeMiterLimit + The miter limit at which to bevel a line join. + strokeOffset + The offset in pixels at which to draw the group stroke and fill. If unspecified, the + default behavior is to dynamically offset stroked groups such that 1 pixel stroke + widths align with the pixel grid. + strokeOpacity + The stroke opacity (value between [0,1]). + + **Default value:** ``1`` + strokeWidth + The stroke width, in pixels. + tension + Depending on the interpolation type, sets the tension parameter (for line and area + marks). + text + Placeholder text if the ``text`` channel is not specified + theta + * For arc marks, the arc length in radians if theta2 is not specified, otherwise the + start arc angle. (A value of 0 indicates up or “north”, increasing values proceed + clockwise.) + + * For text marks, polar coordinate angle in radians. + theta2 + The end angle of arc marks in radians. A value of 0 indicates up or “north”, + increasing values proceed clockwise. + timeUnitBandPosition + Default relative band position for a time unit. If set to ``0``, the marks will be + positioned at the beginning of the time unit band step. If set to ``0.5``, the marks + will be positioned in the middle of the time unit band step. + timeUnitBandSize + Default relative band size for a time unit. If set to ``1``, the bandwidth of the + marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the + marks will be half of the time unit band step. + tooltip + The tooltip text string to show upon mouse hover or an object defining which fields + should the tooltip be derived from. + + * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from + ``encoding`` will be used. + * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the + highlighted data point will be used. + * If set to ``null`` or ``false``, then no tooltip will be used. + + See the `tooltip `__ + documentation for a detailed discussion about tooltip in Vega-Lite. + + **Default value:** ``null`` + url + The URL of the image file for image marks. + width + Width of the marks. + x + X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without + specified ``x2`` or ``width``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2 + X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + y + Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without + specified ``y2`` or ``height``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2 + Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + """ + + align: Align_T + angle: float + aria: bool + ariaRole: str + ariaRoleDescription: str + aspect: bool + baseline: TextBaseline_T + binSpacing: float + blend: Blend_T + color: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T + continuousBandSize: float + cornerRadius: float + cornerRadiusBottomLeft: float + cornerRadiusBottomRight: float + cornerRadiusEnd: float + cornerRadiusTopLeft: float + cornerRadiusTopRight: float + cursor: Cursor_T + description: str + dir: TextDirection_T + discreteBandSize: float + dx: float + dy: float + ellipsis: str + endAngle: float + fill: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None + fillOpacity: float + filled: bool + font: str + fontSize: float + fontStyle: str + fontWeight: FontWeight_T + height: float + href: str + innerRadius: float + interpolate: Interpolate_T + invalid: MarkInvalidDataMode_T | None + limit: float + lineBreak: str + lineHeight: float + minBandSize: float + opacity: float + order: bool | None + orient: Orientation_T + outerRadius: float + padAngle: float + radius: float + radius2: float + shape: str + size: float + smooth: bool + startAngle: float + stroke: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None + strokeCap: StrokeCap_T + strokeDash: Sequence[float] + strokeDashOffset: float + strokeJoin: StrokeJoin_T + strokeMiterLimit: float + strokeOffset: float + strokeOpacity: float + strokeWidth: float + tension: float + text: str | Sequence[str] + theta: float + theta2: float + timeUnitBandPosition: float + timeUnitBandSize: float + tooltip: str | bool | float | TooltipContentKwds | None + url: str + width: float + x: float | Literal["width"] + x2: float | Literal["width"] + y: float | Literal["height"] + y2: float | Literal["height"] + + +class BindCheckboxKwds(TypedDict, total=False): + """ + :class:`altair.BindCheckbox` ``TypedDict`` wrapper. + + Parameters + ---------- + input + + debounce + If defined, delays event handling until the specified milliseconds have elapsed + since the last event was fired. + element + An optional CSS selector string indicating the parent element to which the input + element should be added. By default, all input elements are added within the parent + container of the Vega view. + name + By default, the signal name is used to label input elements. This ``name`` property + can be used instead to specify a custom label for the bound signal. + """ + + input: Literal["checkbox"] + debounce: float + element: str + name: str + + +class BindDirectKwds(TypedDict, total=False): + """ + :class:`altair.BindDirect` ``TypedDict`` wrapper. + + Parameters + ---------- + element + An input element that exposes a *value* property and supports the `EventTarget + `__ interface, or a + CSS selector string to such an element. When the element updates and dispatches an + event, the *value* property will be used as the new, bound signal value. When the + signal updates independent of the element, the *value* property will be set to the + signal value and a new event will be dispatched on the element. + debounce + If defined, delays event handling until the specified milliseconds have elapsed + since the last event was fired. + event + The event (default ``"input"``) to listen for to track changes on the external + element. + """ + + element: str + debounce: float + event: str + + +class BindInputKwds(TypedDict, total=False): + """ + :class:`altair.BindInput` ``TypedDict`` wrapper. + + Parameters + ---------- + autocomplete + A hint for form autofill. See the `HTML autocomplete attribute + `__ for + additional information. + debounce + If defined, delays event handling until the specified milliseconds have elapsed + since the last event was fired. + element + An optional CSS selector string indicating the parent element to which the input + element should be added. By default, all input elements are added within the parent + container of the Vega view. + input + The type of input element to use. The valid values are ``"checkbox"``, ``"radio"``, + ``"range"``, ``"select"``, and any other legal `HTML form input type + `__. + name + By default, the signal name is used to label input elements. This ``name`` property + can be used instead to specify a custom label for the bound signal. + placeholder + Text that appears in the form control when it has no value set. + """ + + autocomplete: str + debounce: float + element: str + input: str + name: str + placeholder: str + + +class BindRadioSelectKwds(TypedDict, total=False): + """ + :class:`altair.BindRadioSelect` ``TypedDict`` wrapper. + + Parameters + ---------- + input + + options + An array of options to select from. + debounce + If defined, delays event handling until the specified milliseconds have elapsed + since the last event was fired. + element + An optional CSS selector string indicating the parent element to which the input + element should be added. By default, all input elements are added within the parent + container of the Vega view. + labels + An array of label strings to represent the ``options`` values. If unspecified, the + ``options`` value will be coerced to a string and used as the label. + name + By default, the signal name is used to label input elements. This ``name`` property + can be used instead to specify a custom label for the bound signal. + """ + + input: Literal["radio", "select"] + options: Sequence[Any] + debounce: float + element: str + labels: Sequence[str] + name: str + + +class BindRangeKwds(TypedDict, total=False): + """ + :class:`altair.BindRange` ``TypedDict`` wrapper. + + Parameters + ---------- + input + + debounce + If defined, delays event handling until the specified milliseconds have elapsed + since the last event was fired. + element + An optional CSS selector string indicating the parent element to which the input + element should be added. By default, all input elements are added within the parent + container of the Vega view. + max + Sets the maximum slider value. Defaults to the larger of the signal value and + ``100``. + min + Sets the minimum slider value. Defaults to the smaller of the signal value and + ``0``. + name + By default, the signal name is used to label input elements. This ``name`` property + can be used instead to specify a custom label for the bound signal. + step + Sets the minimum slider increment. If undefined, the step size will be automatically + determined based on the ``min`` and ``max`` values. + """ + + input: Literal["range"] + debounce: float + element: str + max: float + min: float + name: str + step: float + + +class BoxPlotConfigKwds(TypedDict, total=False): + """ + :class:`altair.BoxPlotConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + box + + extent + The extent of the whiskers. Available options include: + + * ``"min-max"``: min and max are the lower and upper whiskers respectively. + * A number representing multiple of the interquartile range. This number will be + multiplied by the IQR to determine whisker boundary, which spans from the smallest + data to the largest data within the range *[Q1 - k * IQR, Q3 + k * IQR]* where + *Q1* and *Q3* are the first and third quartiles while *IQR* is the interquartile + range (*Q3-Q1*). + + **Default value:** ``1.5``. + median + + outliers + + rule + + size + Size of the box and median tick of a box plot + ticks + + """ + + box: ( + bool + | BarConfigKwds + | AreaConfigKwds + | LineConfigKwds + | MarkConfigKwds + | RectConfigKwds + | TickConfigKwds + ) + extent: float | Literal["min-max"] + median: ( + bool + | BarConfigKwds + | AreaConfigKwds + | LineConfigKwds + | MarkConfigKwds + | RectConfigKwds + | TickConfigKwds + ) + outliers: ( + bool + | BarConfigKwds + | AreaConfigKwds + | LineConfigKwds + | MarkConfigKwds + | RectConfigKwds + | TickConfigKwds + ) + rule: ( + bool + | BarConfigKwds + | AreaConfigKwds + | LineConfigKwds + | MarkConfigKwds + | RectConfigKwds + | TickConfigKwds + ) + size: float + ticks: ( + bool + | BarConfigKwds + | AreaConfigKwds + | LineConfigKwds + | MarkConfigKwds + | RectConfigKwds + | TickConfigKwds + ) + + +class BrushConfigKwds(TypedDict, total=False): + """ + :class:`altair.BrushConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + cursor + The mouse cursor used over the interval mark. Any valid `CSS cursor type + `__ can be used. + fill + The fill color of the interval mark. + + **Default value:** ``"#333333"`` + fillOpacity + The fill opacity of the interval mark (a value between ``0`` and ``1``). + + **Default value:** ``0.125`` + stroke + The stroke color of the interval mark. + + **Default value:** ``"#ffffff"`` + strokeDash + An array of alternating stroke and space lengths, for creating dashed or dotted + lines. + strokeDashOffset + The offset (in pixels) with which to begin drawing the stroke dash array. + strokeOpacity + The stroke opacity of the interval mark (a value between ``0`` and ``1``). + strokeWidth + The stroke width of the interval mark. + """ + + cursor: Cursor_T + fill: ColorHex | ColorName_T + fillOpacity: float + stroke: ColorHex | ColorName_T + strokeDash: Sequence[float] + strokeDashOffset: float + strokeOpacity: float + strokeWidth: float + + +class CompositionConfigKwds(TypedDict, total=False): + """ + :class:`altair.CompositionConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + columns + The number of columns to include in the view composition layout. + + **Default value**: ``undefined`` -- An infinite number of columns (a single row) + will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the + ``column`` channel (for ``facet`` and ``repeat``). + + **Note**: + + 1) This property is only for: + + * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``) + * the ``facet`` and ``repeat`` operator with one field/repetition definition + (without row/column nesting) + + 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``) + and to using the ``row`` channel (for ``facet`` and ``repeat``). + spacing + The default spacing in pixels between composed sub-views. + + **Default value**: ``20`` + """ + + columns: float + spacing: float + + +class ConfigKwds(TypedDict, total=False): + """ + :class:`altair.Config` ``TypedDict`` wrapper. + + Parameters + ---------- + arc + Arc-specific Config + area + Area-Specific Config + aria + A boolean flag indicating if ARIA default attributes should be included for marks + and guides (SVG output only). If false, the ``"aria-hidden"`` attribute will be set + for all guides, removing them from the ARIA accessibility tree and Vega-Lite will + not generate default descriptions for marks. + + **Default value:** ``true``. + autosize + How the visualization size should be determined. If a string, should be one of + ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify + parameters for content sizing and automatic resizing. + + **Default value**: ``pad`` + axis + 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 `__. + axisBand + Config for axes with "band" scales. + axisBottom + Config for x-axis along the bottom edge of the chart. + axisDiscrete + Config for axes with "point" or "band" scales. + axisLeft + Config for y-axis along the left edge of the chart. + axisPoint + Config for axes with "point" scales. + axisQuantitative + Config for quantitative axes. + axisRight + Config for y-axis along the right edge of the chart. + axisTemporal + Config for temporal axes. + axisTop + Config for x-axis along the top edge of the chart. + axisX + X-axis specific config. + axisXBand + Config for x-axes with "band" scales. + axisXDiscrete + Config for x-axes with "point" or "band" scales. + axisXPoint + Config for x-axes with "point" scales. + axisXQuantitative + Config for x-quantitative axes. + axisXTemporal + Config for x-temporal axes. + axisY + Y-axis specific config. + axisYBand + Config for y-axes with "band" scales. + axisYDiscrete + Config for y-axes with "point" or "band" scales. + axisYPoint + Config for y-axes with "point" scales. + axisYQuantitative + Config for y-quantitative axes. + axisYTemporal + Config for y-temporal axes. + background + CSS color property to use as the background of the entire view. + + **Default value:** ``"white"`` + bar + Bar-Specific Config + boxplot + Box Config + circle + Circle-Specific Config + concat + Default configuration for all concatenation and repeat view composition operators + (``concat``, ``hconcat``, ``vconcat``, and ``repeat``) + countTitle + Default axis and legend title for count fields. + + **Default value:** ``'Count of Records``. + customFormatTypes + Allow the ``formatType`` property for text marks and guides to accept a custom + formatter function `registered as a Vega expression + `__. + errorband + ErrorBand Config + errorbar + ErrorBar Config + facet + Default configuration for the ``facet`` view composition operator + fieldTitle + Defines how Vega-Lite generates title for fields. There are three possible styles: + + * ``"verbal"`` (Default) - displays function in a verbal style (e.g., "Sum of + field", "Year-month of date", "field (binned)"). + * ``"function"`` - displays function using parentheses and capitalized texts (e.g., + "SUM(field)", "YEARMONTH(date)", "BIN(field)"). + * ``"plain"`` - displays only the field name without functions (e.g., "field", + "date", "field"). + font + Default font for all text marks, titles, and labels. + geoshape + Geoshape-Specific Config + header + Header configuration, which determines default properties for all `headers + `__. + + For a full list of header configuration options, please see the `corresponding + section of in the header documentation + `__. + headerColumn + Header configuration, which determines default properties for column `headers + `__. + + For a full list of header configuration options, please see the `corresponding + section of in the header documentation + `__. + headerFacet + Header configuration, which determines default properties for non-row/column facet + `headers `__. + + For a full list of header configuration options, please see the `corresponding + section of in the header documentation + `__. + headerRow + Header configuration, which determines default properties for row `headers + `__. + + For a full list of header configuration options, please see the `corresponding + section of in the header documentation + `__. + image + Image-specific Config + legend + 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 `__. + line + Line-Specific Config + lineBreak + A delimiter, such as a newline character, upon which to break text strings into + multiple lines. This property provides a global default for text marks, which is + overridden by mark or style config settings, and by the lineBreak mark encoding + channel. If signal-valued, either string or regular expression (regexp) values are + valid. + locale + Locale definitions for string parsing and formatting of number and date values. The + locale object should contain ``number`` and/or ``time`` properties with `locale + definitions `__. Locale definitions + provided in the config block may be overridden by the View constructor locale + option. + mark + Mark Config + normalizedNumberFormat + If normalizedNumberFormatType is not specified, D3 number format for axis labels, + text marks, and tooltips of normalized stacked fields (fields with ``stack: + "normalize"``). For example ``"s"`` for SI units. Use `D3's number format pattern + `__. + + If ``config.normalizedNumberFormatType`` is specified and + ``config.customFormatTypes`` is ``true``, this value will be passed as ``format`` + alongside ``datum.value`` to the ``config.numberFormatType`` function. **Default + value:** ``%`` + normalizedNumberFormatType + `Custom format type + `__ for + ``config.normalizedNumberFormat``. + + **Default value:** ``undefined`` -- This is equilvalent to call D3-format, which is + exposed as `format in Vega-Expression + `__. **Note:** You must also + set ``customFormatTypes`` to ``true`` to use this feature. + numberFormat + If numberFormatType is not specified, D3 number format for guide labels, text marks, + and tooltips of non-normalized fields (fields *without* ``stack: "normalize"``). For + example ``"s"`` for SI units. Use `D3's number format pattern + `__. + + If ``config.numberFormatType`` is specified and ``config.customFormatTypes`` is + ``true``, this value will be passed as ``format`` alongside ``datum.value`` to the + ``config.numberFormatType`` function. + numberFormatType + `Custom format type + `__ for + ``config.numberFormat``. + + **Default value:** ``undefined`` -- This is equilvalent to call D3-format, which is + exposed as `format in Vega-Expression + `__. **Note:** You must also + set ``customFormatTypes`` to ``true`` to use this feature. + padding + The default visualization padding, in pixels, from the edge of the visualization + canvas to the data rectangle. If a number, specifies padding for all sides. If an + object, the value should have the format ``{"left": 5, "top": 5, "right": 5, + "bottom": 5}`` to specify padding for each side of the visualization. + + **Default value**: ``5`` + params + Dynamic variables or selections that parameterize a visualization. + point + Point-Specific Config + projection + 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 + `__. + range + 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 + `__. + rect + Rect-Specific Config + rule + Rule-Specific Config + scale + 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 + An object hash for defining default properties for each type of selections. + square + Square-Specific Config + style + 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 + `__. + text + Text-Specific Config + tick + Tick-Specific Config + timeFormat + Default time format for raw time values (without time units) in text marks, legend + labels and header labels. + + **Default value:** ``"%b %d, %Y"`` **Note:** Axes automatically determine the format + for each label automatically so this config does not affect axes. + timeFormatType + `Custom format type + `__ for + ``config.timeFormat``. + + **Default value:** ``undefined`` -- This is equilvalent to call D3-time-format, + which is exposed as `timeFormat in Vega-Expression + `__. **Note:** You must + also set ``customFormatTypes`` to ``true`` and there must *not* be a ``timeUnit`` + defined to use this feature. + title + 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 `__. + tooltipFormat + Define `custom format configuration + `__ for tooltips. If + unspecified, default format config will be applied. + trail + Trail-Specific Config + view + Default properties for `single view plots + `__. + """ + + arc: RectConfigKwds + area: AreaConfigKwds + aria: bool + autosize: AutoSizeParamsKwds | AutosizeType_T + axis: AxisConfigKwds + axisBand: AxisConfigKwds + axisBottom: AxisConfigKwds + axisDiscrete: AxisConfigKwds + axisLeft: AxisConfigKwds + axisPoint: AxisConfigKwds + axisQuantitative: AxisConfigKwds + axisRight: AxisConfigKwds + axisTemporal: AxisConfigKwds + axisTop: AxisConfigKwds + axisX: AxisConfigKwds + axisXBand: AxisConfigKwds + axisXDiscrete: AxisConfigKwds + axisXPoint: AxisConfigKwds + axisXQuantitative: AxisConfigKwds + axisXTemporal: AxisConfigKwds + axisY: AxisConfigKwds + axisYBand: AxisConfigKwds + axisYDiscrete: AxisConfigKwds + axisYPoint: AxisConfigKwds + axisYQuantitative: AxisConfigKwds + axisYTemporal: AxisConfigKwds + background: ColorHex | ColorName_T + bar: BarConfigKwds + boxplot: BoxPlotConfigKwds + circle: MarkConfigKwds + concat: CompositionConfigKwds + countTitle: str + customFormatTypes: bool + errorband: ErrorBandConfigKwds + errorbar: ErrorBarConfigKwds + facet: CompositionConfigKwds + fieldTitle: Literal["verbal", "functional", "plain"] + font: str + geoshape: MarkConfigKwds + header: HeaderConfigKwds + headerColumn: HeaderConfigKwds + headerFacet: HeaderConfigKwds + headerRow: HeaderConfigKwds + image: RectConfigKwds + legend: LegendConfigKwds + line: LineConfigKwds + lineBreak: str + locale: LocaleKwds + mark: MarkConfigKwds + normalizedNumberFormat: str + normalizedNumberFormatType: str + numberFormat: str + numberFormatType: str + padding: float | PaddingKwds + params: Sequence[VariableParameterKwds | TopLevelSelectionParameterKwds] + point: MarkConfigKwds + projection: ProjectionConfigKwds + range: RangeConfigKwds + rect: RectConfigKwds + rule: MarkConfigKwds + scale: ScaleConfigKwds + selection: SelectionConfigKwds + square: MarkConfigKwds + style: StyleConfigIndexKwds + text: MarkConfigKwds + tick: TickConfigKwds + timeFormat: str + timeFormatType: str + title: TitleConfigKwds + tooltipFormat: FormatConfigKwds + trail: LineConfigKwds + view: ViewConfigKwds + + +class DateTimeKwds(TypedDict, total=False): + """ + :class:`altair.DateTime` ``TypedDict`` wrapper. + + Parameters + ---------- + date + Integer value representing the date (day of the month) from 1-31. + day + Value representing the day of a week. This can be one of: (1) integer value -- ``1`` + represents Monday; (2) case-insensitive day name (e.g., ``"Monday"``); (3) + case-insensitive, 3-character short day name (e.g., ``"Mon"``). + + **Warning:** A DateTime definition object with ``day``** should not be combined with + ``year``, ``quarter``, ``month``, or ``date``. + hours + Integer value representing the hour of a day from 0-23. + milliseconds + Integer value representing the millisecond segment of time. + minutes + Integer value representing the minute segment of time from 0-59. + month + One of: (1) integer value representing the month from ``1``-``12``. ``1`` represents + January; (2) case-insensitive month name (e.g., ``"January"``); (3) + case-insensitive, 3-character short month name (e.g., ``"Jan"``). + quarter + Integer value representing the quarter of the year (from 1-4). + seconds + Integer value representing the second segment (0-59) of a time value + utc + A boolean flag indicating if date time is in utc time. If false, the date time is in + local time + year + Integer value representing the year. + """ + + date: float + day: str | float + hours: float + milliseconds: float + minutes: float + month: str | float + quarter: float + seconds: float + utc: bool + year: float + + +class DerivedStreamKwds(TypedDict, total=False): + """ + :class:`altair.DerivedStream` ``TypedDict`` wrapper. + + Parameters + ---------- + stream + + between + + consume + + debounce + + filter + + markname + + marktype + + throttle + + """ + + stream: MergedStreamKwds | DerivedStreamKwds + between: Sequence[MergedStreamKwds | DerivedStreamKwds] + consume: bool + debounce: float + filter: str | Sequence[str] + markname: str + marktype: MarkType_T + throttle: float + + +class ErrorBandConfigKwds(TypedDict, total=False): + """ + :class:`altair.ErrorBandConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + band + + borders + + extent + The extent of the band. Available options include: + + * ``"ci"``: Extend the band to the confidence interval of the mean. + * ``"stderr"``: The size of band are set to the value of standard error, extending + from the mean. + * ``"stdev"``: The size of band are set to the value of standard deviation, + extending from the mean. + * ``"iqr"``: Extend the band to the q1 and q3. + + **Default value:** ``"stderr"``. + interpolate + The line interpolation method for the error band. One of the following: + + * ``"linear"``: piecewise linear segments, as in a polyline. + * ``"linear-closed"``: close the linear segments to form a polygon. + * ``"step"``: a piecewise constant function (a step function) consisting of + alternating horizontal and vertical lines. The y-value changes at the midpoint of + each pair of adjacent x-values. + * ``"step-before"``: a piecewise constant function (a step function) consisting of + alternating horizontal and vertical lines. The y-value changes before the x-value. + * ``"step-after"``: a piecewise constant function (a step function) consisting of + alternating horizontal and vertical lines. The y-value changes after the x-value. + * ``"basis"``: a B-spline, with control point duplication on the ends. + * ``"basis-open"``: an open B-spline; may not intersect the start or end. + * ``"basis-closed"``: a closed B-spline, as in a loop. + * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends. + * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end, + but will intersect other control points. + * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop. + * ``"bundle"``: equivalent to basis, except the tension parameter is used to + straighten the spline. + * ``"monotone"``: cubic interpolation that preserves monotonicity in y. + tension + The tension parameter for the interpolation type of the error band. + """ + + band: ( + bool + | BarConfigKwds + | AreaConfigKwds + | LineConfigKwds + | MarkConfigKwds + | RectConfigKwds + | TickConfigKwds + ) + borders: ( + bool + | BarConfigKwds + | AreaConfigKwds + | LineConfigKwds + | MarkConfigKwds + | RectConfigKwds + | TickConfigKwds + ) + extent: ErrorBarExtent_T + interpolate: Interpolate_T + tension: float + + +class ErrorBarConfigKwds(TypedDict, total=False): + """ + :class:`altair.ErrorBarConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + extent + The extent of the rule. Available options include: + + * ``"ci"``: Extend the rule to the confidence interval of the mean. + * ``"stderr"``: The size of rule are set to the value of standard error, extending + from the mean. + * ``"stdev"``: The size of rule are set to the value of standard deviation, + extending from the mean. + * ``"iqr"``: Extend the rule to the q1 and q3. + + **Default value:** ``"stderr"``. + rule + + size + Size of the ticks of an error bar + thickness + Thickness of the ticks and the bar of an error bar + ticks + + """ + + extent: ErrorBarExtent_T + rule: ( + bool + | BarConfigKwds + | AreaConfigKwds + | LineConfigKwds + | MarkConfigKwds + | RectConfigKwds + | TickConfigKwds + ) + size: float + thickness: float + ticks: ( + bool + | BarConfigKwds + | AreaConfigKwds + | LineConfigKwds + | MarkConfigKwds + | RectConfigKwds + | TickConfigKwds + ) + + +class FeatureGeometryGeoJsonPropertiesKwds(TypedDict, total=False): + """ + :class:`altair.FeatureGeometryGeoJsonProperties` ``TypedDict`` wrapper. + + Parameters + ---------- + geometry + The feature's geometry + properties + Properties associated with this feature. + type + Specifies the type of GeoJSON object. + bbox + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + id + A value that uniquely identifies this feature in a + https://tools.ietf.org/html/rfc7946#section-3.2. + """ + + geometry: ( + PointKwds + | PolygonKwds + | LineStringKwds + | MultiPointKwds + | MultiPolygonKwds + | MultiLineStringKwds + | GeometryCollectionKwds + ) + properties: None + type: Literal["Feature"] + bbox: Sequence[float] + id: str | float + + +class FormatConfigKwds(TypedDict, total=False): + """ + :class:`altair.FormatConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + normalizedNumberFormat + If normalizedNumberFormatType is not specified, D3 number format for axis labels, + text marks, and tooltips of normalized stacked fields (fields with ``stack: + "normalize"``). For example ``"s"`` for SI units. Use `D3's number format pattern + `__. + + If ``config.normalizedNumberFormatType`` is specified and + ``config.customFormatTypes`` is ``true``, this value will be passed as ``format`` + alongside ``datum.value`` to the ``config.numberFormatType`` function. **Default + value:** ``%`` + normalizedNumberFormatType + `Custom format type + `__ for + ``config.normalizedNumberFormat``. + + **Default value:** ``undefined`` -- This is equilvalent to call D3-format, which is + exposed as `format in Vega-Expression + `__. **Note:** You must also + set ``customFormatTypes`` to ``true`` to use this feature. + numberFormat + If numberFormatType is not specified, D3 number format for guide labels, text marks, + and tooltips of non-normalized fields (fields *without* ``stack: "normalize"``). For + example ``"s"`` for SI units. Use `D3's number format pattern + `__. + + If ``config.numberFormatType`` is specified and ``config.customFormatTypes`` is + ``true``, this value will be passed as ``format`` alongside ``datum.value`` to the + ``config.numberFormatType`` function. + numberFormatType + `Custom format type + `__ for + ``config.numberFormat``. + + **Default value:** ``undefined`` -- This is equilvalent to call D3-format, which is + exposed as `format in Vega-Expression + `__. **Note:** You must also + set ``customFormatTypes`` to ``true`` to use this feature. + timeFormat + Default time format for raw time values (without time units) in text marks, legend + labels and header labels. + + **Default value:** ``"%b %d, %Y"`` **Note:** Axes automatically determine the format + for each label automatically so this config does not affect axes. + timeFormatType + `Custom format type + `__ for + ``config.timeFormat``. + + **Default value:** ``undefined`` -- This is equilvalent to call D3-time-format, + which is exposed as `timeFormat in Vega-Expression + `__. **Note:** You must + also set ``customFormatTypes`` to ``true`` and there must *not* be a ``timeUnit`` + defined to use this feature. + """ + + normalizedNumberFormat: str + normalizedNumberFormatType: str + numberFormat: str + numberFormatType: str + timeFormat: str + timeFormatType: str + + +class GeoJsonFeatureKwds(TypedDict, total=False): + """ + :class:`altair.GeoJsonFeature` ``TypedDict`` wrapper. + + Parameters + ---------- + geometry + The feature's geometry + properties + Properties associated with this feature. + type + Specifies the type of GeoJSON object. + bbox + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + id + A value that uniquely identifies this feature in a + https://tools.ietf.org/html/rfc7946#section-3.2. + """ + + geometry: ( + PointKwds + | PolygonKwds + | LineStringKwds + | MultiPointKwds + | MultiPolygonKwds + | MultiLineStringKwds + | GeometryCollectionKwds + ) + properties: None + type: Literal["Feature"] + bbox: Sequence[float] + id: str | float + + +class GeoJsonFeatureCollectionKwds(TypedDict, total=False): + """ + :class:`altair.GeoJsonFeatureCollection` ``TypedDict`` wrapper. + + Parameters + ---------- + features + + type + Specifies the type of GeoJSON object. + bbox + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + """ + + features: Sequence[FeatureGeometryGeoJsonPropertiesKwds] + type: Literal["FeatureCollection"] + bbox: Sequence[float] + + +class GeometryCollectionKwds(TypedDict, total=False): + """ + :class:`altair.GeometryCollection` ``TypedDict`` wrapper. + + Parameters + ---------- + geometries + + type + Specifies the type of GeoJSON object. + bbox + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + """ + + geometries: Sequence[ + PointKwds + | PolygonKwds + | LineStringKwds + | MultiPointKwds + | MultiPolygonKwds + | MultiLineStringKwds + | GeometryCollectionKwds + ] + type: Literal["GeometryCollection"] + bbox: Sequence[float] + + +class GradientStopKwds(TypedDict, total=False): + """ + :class:`altair.GradientStop` ``TypedDict`` wrapper. + + Parameters + ---------- + color + The color value at this point in the gradient. + offset + The offset fraction for the color stop, indicating its position within the gradient. + """ + + color: ColorHex | ColorName_T + offset: float + + +class HeaderConfigKwds(TypedDict, total=False): + """ + :class:`altair.HeaderConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + format + When used with the default ``"number"`` and ``"time"`` format type, the text + formatting pattern for labels of guides (axes, legends, headers) and text marks. + + * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's + `number format pattern `__. + * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time + format pattern `__. + + See the `format documentation `__ + for more examples. + + When used with a `custom formatType + `__, this + value will be passed as ``format`` alongside ``datum.value`` to the registered + function. + + **Default value:** Derived from `numberFormat + `__ config for number + format and from `timeFormat + `__ config for time + format. + formatType + The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom + format type + `__. + + **Default value:** + + * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``. + * ``"number"`` for quantitative fields as well as ordinal and nominal fields without + ``timeUnit``. + labelAlign + Horizontal text alignment of header labels. One of ``"left"``, ``"center"``, or + ``"right"``. + labelAnchor + The anchor position for placing the labels. One of ``"start"``, ``"middle"``, or + ``"end"``. For example, with a label orientation of top these anchor positions map + to a left-, center-, or right-aligned label. + labelAngle + The rotation angle of the header labels. + + **Default value:** ``0`` for column header, ``-90`` for row header. + labelBaseline + The vertical text baseline for the header labels. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The + ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and + ``"bottom"``, but are calculated relative to the ``titleLineHeight`` rather than + ``titleFontSize`` alone. + labelColor + The color of the header label, can be in hex color code or regular color name. + labelExpr + `Vega expression `__ for customizing + labels. + + **Note:** The label text and value can be assessed via the ``label`` and ``value`` + properties of the header's backing ``datum`` object. + labelFont + The font of the header label. + labelFontSize + The font size of the header label, in pixels. + labelFontStyle + The font style of the header label. + labelFontWeight + The font weight of the header label. + labelLimit + The maximum length of the header label in pixels. The text value will be + automatically truncated if the rendered size exceeds the limit. + + **Default value:** ``0``, indicating no limit + labelLineHeight + Line height in pixels for multi-line header labels or title text with ``"line-top"`` + or ``"line-bottom"`` baseline. + labelOrient + The orientation of the header label. One of ``"top"``, ``"bottom"``, ``"left"`` or + ``"right"``. + labelPadding + The padding, in pixel, between facet header's label and the plot. + + **Default value:** ``10`` + labels + A boolean flag indicating if labels should be included as part of the header. + + **Default value:** ``true``. + orient + Shortcut for setting both labelOrient and titleOrient. + title + Set to null to disable title for the axis, legend, or header. + titleAlign + Horizontal text alignment (to the anchor) of header titles. + titleAnchor + 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. + titleAngle + The rotation angle of the header title. + + **Default value:** ``0``. + titleBaseline + The vertical text baseline for the header title. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The + ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and + ``"bottom"``, but are calculated relative to the ``titleLineHeight`` rather than + ``titleFontSize`` alone. + + **Default value:** ``"middle"`` + titleColor + Color of the header title, can be in hex color code or regular color name. + titleFont + Font of the header title. (e.g., ``"Helvetica Neue"``). + titleFontSize + Font size of the header title. + titleFontStyle + The font style of the header title. + titleFontWeight + Font weight of the header title. This can be either a string (e.g ``"bold"``, + ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where + ``"normal"`` = ``400`` and ``"bold"`` = ``700``). + titleLimit + The maximum length of the header title in pixels. The text value will be + automatically truncated if the rendered size exceeds the limit. + + **Default value:** ``0``, indicating no limit + titleLineHeight + Line height in pixels for multi-line header title text or title text with + ``"line-top"`` or ``"line-bottom"`` baseline. + titleOrient + The orientation of the header title. One of ``"top"``, ``"bottom"``, ``"left"`` or + ``"right"``. + titlePadding + The padding, in pixel, between facet header's title and the label. + + **Default value:** ``10`` + """ + + format: str + formatType: str + labelAlign: Align_T + labelAnchor: TitleAnchor_T + labelAngle: float + labelBaseline: TextBaseline_T + labelColor: ColorHex | ColorName_T + labelExpr: str + labelFont: str + labelFontSize: float + labelFontStyle: str + labelFontWeight: FontWeight_T + labelLimit: float + labelLineHeight: float + labelOrient: Orient_T + labelPadding: float + labels: bool + orient: Orient_T + title: None + titleAlign: Align_T + titleAnchor: TitleAnchor_T + titleAngle: float + titleBaseline: TextBaseline_T + titleColor: ColorHex | ColorName_T + titleFont: str + titleFontSize: float + titleFontStyle: str + titleFontWeight: FontWeight_T + titleLimit: float + titleLineHeight: float + titleOrient: Orient_T + titlePadding: float + + +class IntervalSelectionConfigKwds(TypedDict, total=False): + """ + :class:`altair.IntervalSelectionConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + type + Determines the default event processing and data query for the selection. Vega-Lite + currently supports two selection types: + + * ``"point"`` -- to select multiple discrete data values; the first value is + selected on ``click`` and additional values toggled on shift-click. + * ``"interval"`` -- to select a continuous range of data values on ``drag``. + clear + Clears the selection, emptying it of all values. This property can be a `Event + Stream `__ or ``false`` to disable + clear. + + **Default value:** ``dblclick``. + + **See also:** `clear examples + `__ in the + documentation. + encodings + An array of encoding channels. The corresponding data field values must match for a + data tuple to fall within the selection. + + **See also:** The `projection with encodings and fields section + `__ in the + documentation. + fields + An array of field names whose values must match for a data tuple to fall within the + selection. + + **See also:** The `projection with encodings and fields section + `__ in the + documentation. + mark + An interval selection also adds a rectangle mark to depict the extents of the + interval. The ``mark`` property can be used to customize the appearance of the mark. + + **See also:** `mark examples + `__ in the documentation. + on + A `Vega event stream `__ (object or + selector) that triggers the selection. For interval selections, the event stream + must specify a `start and end + `__. + + **See also:** `on examples + `__ in the documentation. + resolve + With layered and multi-view displays, a strategy that determines how selections' + data queries are resolved when applied in a filter transform, conditional encoding + rule, or scale domain. + + One of: + + * ``"global"`` -- only one brush exists for the entire SPLOM. When the user begins + to drag, any previous brushes are cleared, and a new one is constructed. + * ``"union"`` -- each cell contains its own brush, and points are highlighted if + they lie within *any* of these individual brushes. + * ``"intersect"`` -- each cell contains its own brush, and points are highlighted + only if they fall within *all* of these individual brushes. + + **Default value:** ``global``. + + **See also:** `resolve examples + `__ in the + documentation. + translate + When truthy, allows a user to interactively move an interval selection + back-and-forth. Can be ``true``, ``false`` (to disable panning), or a `Vega event + stream definition `__ which must + include a start and end event to trigger continuous panning. Discrete panning (e.g., + pressing the left/right arrow keys) will be supported in future versions. + + **Default value:** ``true``, which corresponds to ``[pointerdown, window:pointerup] + > window:pointermove!``. This default allows users to clicks and drags within an + interval selection to reposition it. + + **See also:** `translate examples + `__ in the + documentation. + zoom + When truthy, allows a user to interactively resize an interval selection. Can be + ``true``, ``false`` (to disable zooming), or a `Vega event stream definition + `__. Currently, only ``wheel`` + events are supported, but custom event streams can still be used to specify filters, + debouncing, and throttling. Future versions will expand the set of events that can + trigger this transformation. + + **Default value:** ``true``, which corresponds to ``wheel!``. This default allows + users to use the mouse wheel to resize an interval selection. + + **See also:** `zoom examples + `__ in the documentation. + """ + + type: Literal["interval"] + clear: str | bool | MergedStreamKwds | DerivedStreamKwds + encodings: Sequence[SingleDefUnitChannel_T] + fields: Sequence[str] + mark: BrushConfigKwds + on: str | MergedStreamKwds | DerivedStreamKwds + resolve: SelectionResolution_T + translate: str | bool + zoom: str | bool + + +class IntervalSelectionConfigWithoutTypeKwds(TypedDict, total=False): + """ + :class:`altair.IntervalSelectionConfigWithoutType` ``TypedDict`` wrapper. + + Parameters + ---------- + clear + Clears the selection, emptying it of all values. This property can be a `Event + Stream `__ or ``false`` to disable + clear. + + **Default value:** ``dblclick``. + + **See also:** `clear examples + `__ in the + documentation. + encodings + An array of encoding channels. The corresponding data field values must match for a + data tuple to fall within the selection. + + **See also:** The `projection with encodings and fields section + `__ in the + documentation. + fields + An array of field names whose values must match for a data tuple to fall within the + selection. + + **See also:** The `projection with encodings and fields section + `__ in the + documentation. + mark + An interval selection also adds a rectangle mark to depict the extents of the + interval. The ``mark`` property can be used to customize the appearance of the mark. + + **See also:** `mark examples + `__ in the documentation. + on + A `Vega event stream `__ (object or + selector) that triggers the selection. For interval selections, the event stream + must specify a `start and end + `__. + + **See also:** `on examples + `__ in the documentation. + resolve + With layered and multi-view displays, a strategy that determines how selections' + data queries are resolved when applied in a filter transform, conditional encoding + rule, or scale domain. + + One of: + + * ``"global"`` -- only one brush exists for the entire SPLOM. When the user begins + to drag, any previous brushes are cleared, and a new one is constructed. + * ``"union"`` -- each cell contains its own brush, and points are highlighted if + they lie within *any* of these individual brushes. + * ``"intersect"`` -- each cell contains its own brush, and points are highlighted + only if they fall within *all* of these individual brushes. + + **Default value:** ``global``. + + **See also:** `resolve examples + `__ in the + documentation. + translate + When truthy, allows a user to interactively move an interval selection + back-and-forth. Can be ``true``, ``false`` (to disable panning), or a `Vega event + stream definition `__ which must + include a start and end event to trigger continuous panning. Discrete panning (e.g., + pressing the left/right arrow keys) will be supported in future versions. + + **Default value:** ``true``, which corresponds to ``[pointerdown, window:pointerup] + > window:pointermove!``. This default allows users to clicks and drags within an + interval selection to reposition it. + + **See also:** `translate examples + `__ in the + documentation. + zoom + When truthy, allows a user to interactively resize an interval selection. Can be + ``true``, ``false`` (to disable zooming), or a `Vega event stream definition + `__. Currently, only ``wheel`` + events are supported, but custom event streams can still be used to specify filters, + debouncing, and throttling. Future versions will expand the set of events that can + trigger this transformation. + + **Default value:** ``true``, which corresponds to ``wheel!``. This default allows + users to use the mouse wheel to resize an interval selection. + + **See also:** `zoom examples + `__ in the documentation. + """ + + clear: str | bool | MergedStreamKwds | DerivedStreamKwds + encodings: Sequence[SingleDefUnitChannel_T] + fields: Sequence[str] + mark: BrushConfigKwds + on: str | MergedStreamKwds | DerivedStreamKwds + resolve: SelectionResolution_T + translate: str | bool + zoom: str | bool + + +class LegendConfigKwds(TypedDict, total=False): + """ + :class:`altair.LegendConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + aria + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG group, removing the legend from the ARIA accessibility tree. + + **Default value:** ``true`` + clipHeight + The height in pixels to clip symbol legend entries and limit their size. + columnPadding + The horizontal padding in pixels between symbol legend entries. + + **Default value:** ``10``. + columns + The number of columns in which to arrange symbol legend entries. A value of ``0`` or + lower indicates a single row with one column per entry. + cornerRadius + Corner radius for the full legend. + description + A text description of this legend for `ARIA accessibility + `__ (SVG output + only). If the ``aria`` property is true, for SVG output the `"aria-label" attribute + `__ + will be set to this description. If the description is unspecified it will be + automatically generated. + direction + The direction of the legend, one of ``"vertical"`` or ``"horizontal"``. + + **Default value:** + + * For top-/bottom-``orient``ed legends, ``"horizontal"`` + * For left-/right-``orient``ed legends, ``"vertical"`` + * For top/bottom-left/right-``orient``ed legends, ``"horizontal"`` for gradient + legends and ``"vertical"`` for symbol legends. + disable + Disable legend by default + fillColor + Background fill color for the full legend. + gradientDirection + The default direction (``"horizontal"`` or ``"vertical"``) for gradient legends. + + **Default value:** ``"vertical"``. + gradientHorizontalMaxLength + Max legend length for a horizontal gradient when ``config.legend.gradientLength`` is + undefined. + + **Default value:** ``200`` + gradientHorizontalMinLength + Min legend length for a horizontal gradient when ``config.legend.gradientLength`` is + undefined. + + **Default value:** ``100`` + gradientLabelLimit + The maximum allowed length in pixels of color ramp gradient labels. + gradientLabelOffset + Vertical offset in pixels for color ramp gradient labels. + + **Default value:** ``2``. + gradientLength + The length in pixels of the primary axis of a color gradient. This value corresponds + to the height of a vertical gradient or the width of a horizontal gradient. + + **Default value:** ``200``. + gradientOpacity + Opacity of the color gradient. + gradientStrokeColor + The color of the gradient stroke, can be in hex color code or regular color name. + + **Default value:** ``"lightGray"``. + gradientStrokeWidth + The width of the gradient stroke, in pixels. + + **Default value:** ``0``. + gradientThickness + The thickness in pixels of the color gradient. This value corresponds to the width + of a vertical gradient or the height of a horizontal gradient. + + **Default value:** ``16``. + gradientVerticalMaxLength + Max legend length for a vertical gradient when ``config.legend.gradientLength`` is + undefined. + + **Default value:** ``200`` + gradientVerticalMinLength + Min legend length for a vertical gradient when ``config.legend.gradientLength`` is + undefined. + + **Default value:** ``100`` + gridAlign + The alignment to apply to symbol legends rows and columns. The supported string + values are ``"all"``, ``"each"`` (the default), and ``none``. For more information, + see the `grid layout documentation `__. + + **Default value:** ``"each"``. + labelAlign + The alignment of the legend label, can be left, center, or right. + labelBaseline + The position of the baseline of legend label, can be ``"top"``, ``"middle"``, + ``"bottom"``, or ``"alphabetic"``. + + **Default value:** ``"middle"``. + labelColor + The color of the legend label, can be in hex color code or regular color name. + labelFont + The font of the legend label. + labelFontSize + The font size of legend label. + + **Default value:** ``10``. + labelFontStyle + The font style of legend label. + labelFontWeight + The font weight of legend label. + labelLimit + Maximum allowed pixel width of legend tick labels. + + **Default value:** ``160``. + labelOffset + The offset of the legend label. + + **Default value:** ``4``. + labelOpacity + Opacity of labels. + labelOverlap + The strategy to use for resolving overlap of labels in gradient legends. If + ``false``, no overlap reduction is attempted. If set to ``true`` or ``"parity"``, a + strategy of removing every other label is used. If set to ``"greedy"``, a linear + scan of the labels is performed, removing any label that overlaps with the last + visible label (this often works better for log-scaled axes). + + **Default value:** ``"greedy"`` for ``log scales otherwise ``true`. + labelPadding + Padding in pixels between the legend and legend labels. + labelSeparation + The minimum separation that must be between label bounding boxes for them to be + considered non-overlapping (default ``0``). This property is ignored if + *labelOverlap* resolution is not enabled. + layout + + legendX + Custom x-position for legend with orient "none". + legendY + Custom y-position for legend with orient "none". + offset + The offset in pixels by which to displace the legend from the data rectangle and + axes. + + **Default value:** ``18``. + orient + The orientation of the legend, which determines how the legend is positioned within + the scene. One of ``"left"``, ``"right"``, ``"top"``, ``"bottom"``, ``"top-left"``, + ``"top-right"``, ``"bottom-left"``, ``"bottom-right"``, ``"none"``. + + **Default value:** ``"right"`` + padding + The padding between the border and content of the legend group. + + **Default value:** ``0``. + rowPadding + The vertical padding in pixels between symbol legend entries. + + **Default value:** ``2``. + strokeColor + Border stroke color for the full legend. + strokeDash + Border stroke dash pattern for the full legend. + strokeWidth + Border stroke width for the full legend. + symbolBaseFillColor + Default fill color for legend symbols. Only applied if there is no ``"fill"`` scale + color encoding for the legend. + + **Default value:** ``"transparent"``. + symbolBaseStrokeColor + Default stroke color for legend symbols. Only applied if there is no ``"fill"`` + scale color encoding for the legend. + + **Default value:** ``"gray"``. + symbolDash + An array of alternating [stroke, space] lengths for dashed symbol strokes. + symbolDashOffset + The pixel offset at which to start drawing with the symbol stroke dash array. + symbolDirection + The default direction (``"horizontal"`` or ``"vertical"``) for symbol legends. + + **Default value:** ``"vertical"``. + symbolFillColor + The color of the legend symbol, + symbolLimit + The maximum number of allowed entries for a symbol legend. Additional entries will + be dropped. + symbolOffset + Horizontal pixel offset for legend symbols. + + **Default value:** ``0``. + symbolOpacity + Opacity of the legend symbols. + symbolSize + The size of the legend symbol, in pixels. + + **Default value:** ``100``. + symbolStrokeColor + Stroke color for legend symbols. + symbolStrokeWidth + The width of the symbol's stroke. + + **Default value:** ``1.5``. + symbolType + The symbol shape. One of the plotting shapes ``circle`` (default), ``square``, + ``cross``, ``diamond``, ``triangle-up``, ``triangle-down``, ``triangle-right``, or + ``triangle-left``, the line symbol ``stroke``, or one of the centered directional + shapes ``arrow``, ``wedge``, or ``triangle``. Alternatively, a custom `SVG path + string `__ can be + provided. For correct sizing, custom shape paths should be defined within a square + bounding box with coordinates ranging from -1 to 1 along both the x and y + dimensions. + + **Default value:** ``"circle"``. + tickCount + The desired number of tick values for quantitative legends. + title + Set to null to disable title for the axis, legend, or header. + titleAlign + Horizontal text alignment for legend titles. + + **Default value:** ``"left"``. + titleAnchor + Text anchor position for placing legend titles. + titleBaseline + Vertical text baseline for legend titles. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The + ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and + ``"bottom"``, but are calculated relative to the *lineHeight* rather than *fontSize* + alone. + + **Default value:** ``"top"``. + titleColor + The color of the legend title, can be in hex color code or regular color name. + titleFont + The font of the legend title. + titleFontSize + The font size of the legend title. + titleFontStyle + The font style of the legend title. + titleFontWeight + The font weight of the legend title. This can be either a string (e.g ``"bold"``, + ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where + ``"normal"`` = ``400`` and ``"bold"`` = ``700``). + titleLimit + Maximum allowed pixel width of legend titles. + + **Default value:** ``180``. + titleLineHeight + Line height in pixels for multi-line title text or title text with ``"line-top"`` or + ``"line-bottom"`` baseline. + titleOpacity + Opacity of the legend title. + titleOrient + Orientation of the legend title. + titlePadding + The padding, in pixels, between title and legend. + + **Default value:** ``5``. + unselectedOpacity + The opacity of unselected legend entries. + + **Default value:** 0.35. + zindex + The integer z-index indicating the layering of the legend group relative to other + axis, mark, and legend groups. + """ + + aria: bool + clipHeight: float + columnPadding: float + columns: float + cornerRadius: float + description: str + direction: Orientation_T + disable: bool + fillColor: ColorHex | ColorName_T | None + gradientDirection: Orientation_T + gradientHorizontalMaxLength: float + gradientHorizontalMinLength: float + gradientLabelLimit: float + gradientLabelOffset: float + gradientLength: float + gradientOpacity: float + gradientStrokeColor: ColorHex | ColorName_T | None + gradientStrokeWidth: float + gradientThickness: float + gradientVerticalMaxLength: float + gradientVerticalMinLength: float + gridAlign: LayoutAlign_T + labelAlign: Align_T + labelBaseline: TextBaseline_T + labelColor: ColorHex | ColorName_T | None + labelFont: str + labelFontSize: float + labelFontStyle: str + labelFontWeight: FontWeight_T + labelLimit: float + labelOffset: float + labelOpacity: float + labelOverlap: bool | Literal["greedy", "parity"] + labelPadding: float + labelSeparation: float + layout: Map + legendX: float + legendY: float + offset: float + orient: LegendOrient_T + padding: float + rowPadding: float + strokeColor: ColorHex | ColorName_T | None + strokeDash: Sequence[float] + strokeWidth: float + symbolBaseFillColor: ColorHex | ColorName_T | None + symbolBaseStrokeColor: ColorHex | ColorName_T | None + symbolDash: Sequence[float] + symbolDashOffset: float + symbolDirection: Orientation_T + symbolFillColor: ColorHex | ColorName_T | None + symbolLimit: float + symbolOffset: float + symbolOpacity: float + symbolSize: float + symbolStrokeColor: ColorHex | ColorName_T | None + symbolStrokeWidth: float + symbolType: str + tickCount: float | TimeIntervalStepKwds | TimeInterval_T + title: None + titleAlign: Align_T + titleAnchor: TitleAnchor_T + titleBaseline: TextBaseline_T + titleColor: ColorHex | ColorName_T | None + titleFont: str + titleFontSize: float + titleFontStyle: str + titleFontWeight: FontWeight_T + titleLimit: float + titleLineHeight: float + titleOpacity: float + titleOrient: Orient_T + titlePadding: float + unselectedOpacity: float + zindex: float + + +class LegendResolveMapKwds(TypedDict, total=False): + """ + :class:`altair.LegendResolveMap` ``TypedDict`` wrapper. + + Parameters + ---------- + angle + + color + + fill + + fillOpacity + + opacity + + shape + + size + + stroke + + strokeDash + + strokeOpacity + + strokeWidth + + """ + + angle: ResolveMode_T + color: ResolveMode_T + fill: ResolveMode_T + fillOpacity: ResolveMode_T + opacity: ResolveMode_T + shape: ResolveMode_T + size: ResolveMode_T + stroke: ResolveMode_T + strokeDash: ResolveMode_T + strokeOpacity: ResolveMode_T + strokeWidth: ResolveMode_T + + +class LegendStreamBindingKwds(TypedDict, total=False): + """ + :class:`altair.LegendStreamBinding` ``TypedDict`` wrapper. + + Parameters + ---------- + legend + + """ + + legend: str | MergedStreamKwds | DerivedStreamKwds + + +class LineConfigKwds(TypedDict, total=False): + """ + :class:`altair.LineConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + align + The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). + One of ``"left"``, ``"right"``, ``"center"``. + + **Note:** Expression reference is *not* supported for range marks. + angle + The rotation angle of the text, in degrees. + aria + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG element, removing the mark item from the ARIA accessibility tree. + ariaRole + Sets the type of user interface element of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "role" attribute. Warning: this + property is experimental and may be changed in the future. + ariaRoleDescription + A human-readable, author-localized description for the role of the mark item for + `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "aria-roledescription" attribute. + Warning: this property is experimental and may be changed in the future. + aspect + Whether to keep aspect ratio of image marks. + baseline + For text marks, the vertical text baseline. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an + expression reference that provides one of the valid values. The ``"line-top"`` and + ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are + calculated relative to the ``lineHeight`` rather than ``fontSize`` alone. + + For range marks, the vertical alignment of the marks. One of ``"top"``, + ``"middle"``, ``"bottom"``. + + **Note:** Expression reference is *not* supported for range marks. + blend + The color blend mode for drawing an item on its current background. Any valid `CSS + mix-blend-mode `__ + value can be used. + + __Default value:__ ``"source-over"`` + color + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + cornerRadius + The radius in pixels of rounded rectangles or arcs' corners. + + **Default value:** ``0`` + cornerRadiusBottomLeft + The radius in pixels of rounded rectangles' bottom left corner. + + **Default value:** ``0`` + cornerRadiusBottomRight + The radius in pixels of rounded rectangles' bottom right corner. + + **Default value:** ``0`` + cornerRadiusTopLeft + The radius in pixels of rounded rectangles' top right corner. + + **Default value:** ``0`` + cornerRadiusTopRight + The radius in pixels of rounded rectangles' top left corner. + + **Default value:** ``0`` + cursor + The mouse cursor used over the mark. Any valid `CSS cursor type + `__ can be used. + description + A text description of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the `"aria-label" attribute + `__. + dir + The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` + (right-to-left). This property determines on which side is truncated in response to + the limit parameter. + + **Default value:** ``"ltr"`` + dx + The horizontal offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + dy + The vertical offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + ellipsis + The ellipsis string for text truncated in response to the limit parameter. + + **Default value:** ``"…"`` + endAngle + The end angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + fill + Default fill color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove fill. + + **Default value:** (None) + fillOpacity + The fill opacity (value between [0,1]). + + **Default value:** ``1`` + filled + Whether the mark's color should be used as fill color instead of stroke color. + + **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well + as ``geoshape`` marks for `graticule + `__ data sources; + otherwise, ``true``. + + **Note:** This property cannot be used in a `style config + `__. + font + The typeface to set the text in (e.g., ``"Helvetica Neue"``). + fontSize + The font size, in pixels. + + **Default value:** ``11`` + fontStyle + The font style (e.g., ``"italic"``). + fontWeight + The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a + number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and + ``"bold"`` = ``700``). + height + Height of the marks. + href + A URL to load upon mouse click. If defined, the mark acts as a hyperlink. + innerRadius + The inner radius in pixels of arc marks. ``innerRadius`` is an alias for + ``radius2``. + + **Default value:** ``0`` + interpolate + The line interpolation method to use for line and area marks. One of the following: + + * ``"linear"``: piecewise linear segments, as in a polyline. + * ``"linear-closed"``: close the linear segments to form a polygon. + * ``"step"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"step-before"``: alternate between vertical and horizontal segments, as in a + step function. + * ``"step-after"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"basis"``: a B-spline, with control point duplication on the ends. + * ``"basis-open"``: an open B-spline; may not intersect the start or end. + * ``"basis-closed"``: a closed B-spline, as in a loop. + * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends. + * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end, + but will intersect other control points. + * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop. + * ``"bundle"``: equivalent to basis, except the tension parameter is used to + straighten the spline. + * ``"monotone"``: cubic interpolation that preserves monotonicity in y. + invalid + Invalid data mode, which defines how the marks and corresponding scales should + represent invalid values (``null`` and ``NaN`` in continuous scales *without* + defined output for invalid values). + + * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and + *scales*. For path marks (for line, area, trail), this option will create paths + that connect valid points, as if the data rows with invalid values do not exist. + + * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at + invalid values. For non-path marks, this is equivalent to ``"filter"``. All + *scale* domains will *exclude* these filtered data points. + + * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid + values. Hide invalid values for non-path marks. All *scale* domains will + *include* these filtered data points (for both path and non-path marks). + + * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each + scale will use the output for invalid values defined in ``config.scale.invalid`` + or, if unspecified, by default invalid values will produce the same visual values + as zero (if the scale includes zero) or the minimum value (if the scale does not + include zero). + + * ``"break-paths-show-path-domains"`` (default) — This is equivalent to + ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and + ``"filter"`` for non-path marks. + + **Note**: If any channel's scale has an output for invalid values defined in + ``config.scale.invalid``, all values for the scales will be considered "valid" since + they can produce a reasonable output for the scales. Thus, fields for such channels + will not be filtered and will not cause path breaks. + limit + The maximum length of the text mark in pixels. The text value will be automatically + truncated if the rendered size exceeds the limit. + + **Default value:** ``0`` -- indicating no limit + lineBreak + A delimiter, such as a newline character, upon which to break text strings into + multiple lines. This property is ignored if the text is array-valued. + lineHeight + The line height in pixels (the spacing between subsequent lines of text) for + multi-line text marks. + opacity + The overall opacity (value between [0,1]). + + **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, + ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. + order + For line and trail marks, this ``order`` property can be set to ``null`` or + ``false`` to make the lines use the original order in the data sources. + orient + The orientation of a non-stacked bar, tick, area, and line charts. The value is + either horizontal (default) or vertical. + + * For bar, rule and tick, this determines whether the size of the bar and tick + should be applied to x or y dimension. + * For area, this property determines the orient property of the Vega output. + * For line and trail marks, this property determines the sort order of the points in + the line if ``config.sortLineBy`` is not specified. For stacked charts, this is + always determined by the orientation of the stack; therefore explicitly specified + value will be ignored. + outerRadius + The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``. + + **Default value:** ``0`` + padAngle + The angular padding applied to sides of the arc, in radians. + point + A flag for overlaying points on top of line or area marks, or an object defining the + properties of the overlayed points. + + * If this property is ``"transparent"``, transparent points will be used (for + enhancing tooltips and selections). + + * If this property is an empty object (``{}``) or ``true``, filled points with + default properties will be used. + + * If this property is ``false``, no points would be automatically added to line or + area marks. + + **Default value:** ``false``. + radius + For arc mark, the primary (outer) radius in pixels. + + For text marks, polar coordinate radial offset, in pixels, of the text from the + origin determined by the ``x`` and ``y`` properties. + + **Default value:** ``min(plot_width, plot_height)/2`` + radius2 + The secondary (inner) radius in pixels of arc marks. + + **Default value:** ``0`` + shape + Shape of the point marks. Supported values include: + + * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, + ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or + ``"triangle-left"``. + * the line symbol ``"stroke"`` + * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` + * a custom `SVG path string + `__ (For correct + sizing, custom shape paths should be defined within a square bounding box with + coordinates ranging from -1 to 1 along both the x and y dimensions.) + + **Default value:** ``"circle"`` + size + Default size for marks. + + * For ``point``/``circle``/``square``, this represents the pixel area of the marks. + Note that this value sets the area of the symbol; the side lengths will increase + with the square root of this value. + * For ``bar``, this represents the band size of the bar, in pixels. + * For ``text``, this represents the font size, in pixels. + + **Default value:** + + * ``30`` for point, circle, square marks; width/height's ``step`` + * ``2`` for bar marks with discrete dimensions; + * ``5`` for bar marks with continuous dimensions; + * ``11`` for text marks. + smooth + A boolean flag (default true) indicating if the image should be smoothed when + resized. If false, individual pixels should be scaled directly rather than + interpolated with smoothing. For SVG rendering, this option may not work in some + browsers due to lack of standardization. + startAngle + The start angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + stroke + Default stroke color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove stroke. + + **Default value:** (None) + strokeCap + The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or + ``"square"``. + + **Default value:** ``"butt"`` + strokeDash + An array of alternating stroke, space lengths for creating dashed or dotted lines. + strokeDashOffset + The offset (in pixels) into which to begin drawing with the stroke dash array. + strokeJoin + The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. + + **Default value:** ``"miter"`` + strokeMiterLimit + The miter limit at which to bevel a line join. + strokeOffset + The offset in pixels at which to draw the group stroke and fill. If unspecified, the + default behavior is to dynamically offset stroked groups such that 1 pixel stroke + widths align with the pixel grid. + strokeOpacity + The stroke opacity (value between [0,1]). + + **Default value:** ``1`` + strokeWidth + The stroke width, in pixels. + tension + Depending on the interpolation type, sets the tension parameter (for line and area + marks). + text + Placeholder text if the ``text`` channel is not specified + theta + * For arc marks, the arc length in radians if theta2 is not specified, otherwise the + start arc angle. (A value of 0 indicates up or “north”, increasing values proceed + clockwise.) + + * For text marks, polar coordinate angle in radians. + theta2 + The end angle of arc marks in radians. A value of 0 indicates up or “north”, + increasing values proceed clockwise. + timeUnitBandPosition + Default relative band position for a time unit. If set to ``0``, the marks will be + positioned at the beginning of the time unit band step. If set to ``0.5``, the marks + will be positioned in the middle of the time unit band step. + timeUnitBandSize + Default relative band size for a time unit. If set to ``1``, the bandwidth of the + marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the + marks will be half of the time unit band step. + tooltip + The tooltip text string to show upon mouse hover or an object defining which fields + should the tooltip be derived from. + + * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from + ``encoding`` will be used. + * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the + highlighted data point will be used. + * If set to ``null`` or ``false``, then no tooltip will be used. + + See the `tooltip `__ + documentation for a detailed discussion about tooltip in Vega-Lite. + + **Default value:** ``null`` + url + The URL of the image file for image marks. + width + Width of the marks. + x + X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without + specified ``x2`` or ``width``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2 + X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + y + Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without + specified ``y2`` or ``height``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2 + Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + """ + + align: Align_T + angle: float + aria: bool + ariaRole: str + ariaRoleDescription: str + aspect: bool + baseline: TextBaseline_T + blend: Blend_T + color: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T + cornerRadius: float + cornerRadiusBottomLeft: float + cornerRadiusBottomRight: float + cornerRadiusTopLeft: float + cornerRadiusTopRight: float + cursor: Cursor_T + description: str + dir: TextDirection_T + dx: float + dy: float + ellipsis: str + endAngle: float + fill: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None + fillOpacity: float + filled: bool + font: str + fontSize: float + fontStyle: str + fontWeight: FontWeight_T + height: float + href: str + innerRadius: float + interpolate: Interpolate_T + invalid: MarkInvalidDataMode_T | None + limit: float + lineBreak: str + lineHeight: float + opacity: float + order: bool | None + orient: Orientation_T + outerRadius: float + padAngle: float + point: bool | OverlayMarkDefKwds | Literal["transparent"] + radius: float + radius2: float + shape: str + size: float + smooth: bool + startAngle: float + stroke: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None + strokeCap: StrokeCap_T + strokeDash: Sequence[float] + strokeDashOffset: float + strokeJoin: StrokeJoin_T + strokeMiterLimit: float + strokeOffset: float + strokeOpacity: float + strokeWidth: float + tension: float + text: str | Sequence[str] + theta: float + theta2: float + timeUnitBandPosition: float + timeUnitBandSize: float + tooltip: str | bool | float | TooltipContentKwds | None + url: str + width: float + x: float | Literal["width"] + x2: float | Literal["width"] + y: float | Literal["height"] + y2: float | Literal["height"] + + +class LineStringKwds(TypedDict, total=False): + """ + :class:`altair.LineString` ``TypedDict`` wrapper. + + Parameters + ---------- + coordinates + + type + Specifies the type of GeoJSON object. + bbox + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + """ + + coordinates: Sequence[Sequence[float]] + type: Literal["LineString"] + bbox: Sequence[float] + + +class LinearGradientKwds(TypedDict, total=False): + """ + :class:`altair.LinearGradient` ``TypedDict`` wrapper. + + Parameters + ---------- + gradient + The type of gradient. Use ``"linear"`` for a linear gradient. + stops + An array of gradient stops defining the gradient color sequence. + id + + x1 + The starting x-coordinate, in normalized [0, 1] coordinates, of the linear gradient. + + **Default value:** ``0`` + x2 + The ending x-coordinate, in normalized [0, 1] coordinates, of the linear gradient. + + **Default value:** ``1`` + y1 + The starting y-coordinate, in normalized [0, 1] coordinates, of the linear gradient. + + **Default value:** ``0`` + y2 + The ending y-coordinate, in normalized [0, 1] coordinates, of the linear gradient. + + **Default value:** ``0`` + """ + + gradient: Literal["linear"] + stops: Sequence[GradientStopKwds] + id: str + x1: float + x2: float + y1: float + y2: float + + +class LocaleKwds(TypedDict, total=False): + """ + :class:`altair.Locale` ``TypedDict`` wrapper. + + Parameters + ---------- + number + Locale definition for formatting numbers. + time + Locale definition for formatting dates and times. + """ + + number: NumberLocaleKwds + time: TimeLocaleKwds + + +class MarkConfigKwds(TypedDict, total=False): + """ + :class:`altair.MarkConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + align + The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). + One of ``"left"``, ``"right"``, ``"center"``. + + **Note:** Expression reference is *not* supported for range marks. + angle + The rotation angle of the text, in degrees. + aria + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG element, removing the mark item from the ARIA accessibility tree. + ariaRole + Sets the type of user interface element of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "role" attribute. Warning: this + property is experimental and may be changed in the future. + ariaRoleDescription + A human-readable, author-localized description for the role of the mark item for + `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "aria-roledescription" attribute. + Warning: this property is experimental and may be changed in the future. + aspect + Whether to keep aspect ratio of image marks. + baseline + For text marks, the vertical text baseline. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an + expression reference that provides one of the valid values. The ``"line-top"`` and + ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are + calculated relative to the ``lineHeight`` rather than ``fontSize`` alone. + + For range marks, the vertical alignment of the marks. One of ``"top"``, + ``"middle"``, ``"bottom"``. + + **Note:** Expression reference is *not* supported for range marks. + blend + The color blend mode for drawing an item on its current background. Any valid `CSS + mix-blend-mode `__ + value can be used. + + __Default value:__ ``"source-over"`` + color + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + cornerRadius + The radius in pixels of rounded rectangles or arcs' corners. + + **Default value:** ``0`` + cornerRadiusBottomLeft + The radius in pixels of rounded rectangles' bottom left corner. + + **Default value:** ``0`` + cornerRadiusBottomRight + The radius in pixels of rounded rectangles' bottom right corner. + + **Default value:** ``0`` + cornerRadiusTopLeft + The radius in pixels of rounded rectangles' top right corner. + + **Default value:** ``0`` + cornerRadiusTopRight + The radius in pixels of rounded rectangles' top left corner. + + **Default value:** ``0`` + cursor + The mouse cursor used over the mark. Any valid `CSS cursor type + `__ can be used. + description + A text description of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the `"aria-label" attribute + `__. + dir + The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` + (right-to-left). This property determines on which side is truncated in response to + the limit parameter. + + **Default value:** ``"ltr"`` + dx + The horizontal offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + dy + The vertical offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + ellipsis + The ellipsis string for text truncated in response to the limit parameter. + + **Default value:** ``"…"`` + endAngle + The end angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + fill + Default fill color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove fill. + + **Default value:** (None) + fillOpacity + The fill opacity (value between [0,1]). + + **Default value:** ``1`` + filled + Whether the mark's color should be used as fill color instead of stroke color. + + **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well + as ``geoshape`` marks for `graticule + `__ data sources; + otherwise, ``true``. + + **Note:** This property cannot be used in a `style config + `__. + font + The typeface to set the text in (e.g., ``"Helvetica Neue"``). + fontSize + The font size, in pixels. + + **Default value:** ``11`` + fontStyle + The font style (e.g., ``"italic"``). + fontWeight + The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a + number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and + ``"bold"`` = ``700``). + height + Height of the marks. + href + A URL to load upon mouse click. If defined, the mark acts as a hyperlink. + innerRadius + The inner radius in pixels of arc marks. ``innerRadius`` is an alias for + ``radius2``. + + **Default value:** ``0`` + interpolate + The line interpolation method to use for line and area marks. One of the following: + + * ``"linear"``: piecewise linear segments, as in a polyline. + * ``"linear-closed"``: close the linear segments to form a polygon. + * ``"step"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"step-before"``: alternate between vertical and horizontal segments, as in a + step function. + * ``"step-after"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"basis"``: a B-spline, with control point duplication on the ends. + * ``"basis-open"``: an open B-spline; may not intersect the start or end. + * ``"basis-closed"``: a closed B-spline, as in a loop. + * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends. + * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end, + but will intersect other control points. + * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop. + * ``"bundle"``: equivalent to basis, except the tension parameter is used to + straighten the spline. + * ``"monotone"``: cubic interpolation that preserves monotonicity in y. + invalid + Invalid data mode, which defines how the marks and corresponding scales should + represent invalid values (``null`` and ``NaN`` in continuous scales *without* + defined output for invalid values). + + * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and + *scales*. For path marks (for line, area, trail), this option will create paths + that connect valid points, as if the data rows with invalid values do not exist. + + * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at + invalid values. For non-path marks, this is equivalent to ``"filter"``. All + *scale* domains will *exclude* these filtered data points. + + * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid + values. Hide invalid values for non-path marks. All *scale* domains will + *include* these filtered data points (for both path and non-path marks). + + * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each + scale will use the output for invalid values defined in ``config.scale.invalid`` + or, if unspecified, by default invalid values will produce the same visual values + as zero (if the scale includes zero) or the minimum value (if the scale does not + include zero). + + * ``"break-paths-show-path-domains"`` (default) — This is equivalent to + ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and + ``"filter"`` for non-path marks. + + **Note**: If any channel's scale has an output for invalid values defined in + ``config.scale.invalid``, all values for the scales will be considered "valid" since + they can produce a reasonable output for the scales. Thus, fields for such channels + will not be filtered and will not cause path breaks. + limit + The maximum length of the text mark in pixels. The text value will be automatically + truncated if the rendered size exceeds the limit. + + **Default value:** ``0`` -- indicating no limit + lineBreak + A delimiter, such as a newline character, upon which to break text strings into + multiple lines. This property is ignored if the text is array-valued. + lineHeight + The line height in pixels (the spacing between subsequent lines of text) for + multi-line text marks. + opacity + The overall opacity (value between [0,1]). + + **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, + ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. + order + For line and trail marks, this ``order`` property can be set to ``null`` or + ``false`` to make the lines use the original order in the data sources. + orient + The orientation of a non-stacked bar, tick, area, and line charts. The value is + either horizontal (default) or vertical. + + * For bar, rule and tick, this determines whether the size of the bar and tick + should be applied to x or y dimension. + * For area, this property determines the orient property of the Vega output. + * For line and trail marks, this property determines the sort order of the points in + the line if ``config.sortLineBy`` is not specified. For stacked charts, this is + always determined by the orientation of the stack; therefore explicitly specified + value will be ignored. + outerRadius + The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``. + + **Default value:** ``0`` + padAngle + The angular padding applied to sides of the arc, in radians. + radius + For arc mark, the primary (outer) radius in pixels. + + For text marks, polar coordinate radial offset, in pixels, of the text from the + origin determined by the ``x`` and ``y`` properties. + + **Default value:** ``min(plot_width, plot_height)/2`` + radius2 + The secondary (inner) radius in pixels of arc marks. + + **Default value:** ``0`` + shape + Shape of the point marks. Supported values include: + + * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, + ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or + ``"triangle-left"``. + * the line symbol ``"stroke"`` + * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` + * a custom `SVG path string + `__ (For correct + sizing, custom shape paths should be defined within a square bounding box with + coordinates ranging from -1 to 1 along both the x and y dimensions.) + + **Default value:** ``"circle"`` + size + Default size for marks. + + * For ``point``/``circle``/``square``, this represents the pixel area of the marks. + Note that this value sets the area of the symbol; the side lengths will increase + with the square root of this value. + * For ``bar``, this represents the band size of the bar, in pixels. + * For ``text``, this represents the font size, in pixels. + + **Default value:** + + * ``30`` for point, circle, square marks; width/height's ``step`` + * ``2`` for bar marks with discrete dimensions; + * ``5`` for bar marks with continuous dimensions; + * ``11`` for text marks. + smooth + A boolean flag (default true) indicating if the image should be smoothed when + resized. If false, individual pixels should be scaled directly rather than + interpolated with smoothing. For SVG rendering, this option may not work in some + browsers due to lack of standardization. + startAngle + The start angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + stroke + Default stroke color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove stroke. + + **Default value:** (None) + strokeCap + The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or + ``"square"``. + + **Default value:** ``"butt"`` + strokeDash + An array of alternating stroke, space lengths for creating dashed or dotted lines. + strokeDashOffset + The offset (in pixels) into which to begin drawing with the stroke dash array. + strokeJoin + The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. + + **Default value:** ``"miter"`` + strokeMiterLimit + The miter limit at which to bevel a line join. + strokeOffset + The offset in pixels at which to draw the group stroke and fill. If unspecified, the + default behavior is to dynamically offset stroked groups such that 1 pixel stroke + widths align with the pixel grid. + strokeOpacity + The stroke opacity (value between [0,1]). + + **Default value:** ``1`` + strokeWidth + The stroke width, in pixels. + tension + Depending on the interpolation type, sets the tension parameter (for line and area + marks). + text + Placeholder text if the ``text`` channel is not specified + theta + * For arc marks, the arc length in radians if theta2 is not specified, otherwise the + start arc angle. (A value of 0 indicates up or “north”, increasing values proceed + clockwise.) + + * For text marks, polar coordinate angle in radians. + theta2 + The end angle of arc marks in radians. A value of 0 indicates up or “north”, + increasing values proceed clockwise. + timeUnitBandPosition + Default relative band position for a time unit. If set to ``0``, the marks will be + positioned at the beginning of the time unit band step. If set to ``0.5``, the marks + will be positioned in the middle of the time unit band step. + timeUnitBandSize + Default relative band size for a time unit. If set to ``1``, the bandwidth of the + marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the + marks will be half of the time unit band step. + tooltip + The tooltip text string to show upon mouse hover or an object defining which fields + should the tooltip be derived from. + + * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from + ``encoding`` will be used. + * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the + highlighted data point will be used. + * If set to ``null`` or ``false``, then no tooltip will be used. + + See the `tooltip `__ + documentation for a detailed discussion about tooltip in Vega-Lite. + + **Default value:** ``null`` + url + The URL of the image file for image marks. + width + Width of the marks. + x + X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without + specified ``x2`` or ``width``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2 + X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + y + Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without + specified ``y2`` or ``height``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2 + Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + """ + + align: Align_T + angle: float + aria: bool + ariaRole: str + ariaRoleDescription: str + aspect: bool + baseline: TextBaseline_T + blend: Blend_T + color: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T + cornerRadius: float + cornerRadiusBottomLeft: float + cornerRadiusBottomRight: float + cornerRadiusTopLeft: float + cornerRadiusTopRight: float + cursor: Cursor_T + description: str + dir: TextDirection_T + dx: float + dy: float + ellipsis: str + endAngle: float + fill: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None + fillOpacity: float + filled: bool + font: str + fontSize: float + fontStyle: str + fontWeight: FontWeight_T + height: float + href: str + innerRadius: float + interpolate: Interpolate_T + invalid: MarkInvalidDataMode_T | None + limit: float + lineBreak: str + lineHeight: float + opacity: float + order: bool | None + orient: Orientation_T + outerRadius: float + padAngle: float + radius: float + radius2: float + shape: str + size: float + smooth: bool + startAngle: float + stroke: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None + strokeCap: StrokeCap_T + strokeDash: Sequence[float] + strokeDashOffset: float + strokeJoin: StrokeJoin_T + strokeMiterLimit: float + strokeOffset: float + strokeOpacity: float + strokeWidth: float + tension: float + text: str | Sequence[str] + theta: float + theta2: float + timeUnitBandPosition: float + timeUnitBandSize: float + tooltip: str | bool | float | TooltipContentKwds | None + url: str + width: float + x: float | Literal["width"] + x2: float | Literal["width"] + y: float | Literal["height"] + y2: float | Literal["height"] + + +class MergedStreamKwds(TypedDict, total=False): + """ + :class:`altair.MergedStream` ``TypedDict`` wrapper. + + Parameters + ---------- + merge + + between + + consume + + debounce + + filter + + markname + + marktype + + throttle + + """ + + merge: Sequence[MergedStreamKwds | DerivedStreamKwds] + between: Sequence[MergedStreamKwds | DerivedStreamKwds] + consume: bool + debounce: float + filter: str | Sequence[str] + markname: str + marktype: MarkType_T + throttle: float + + +class MultiLineStringKwds(TypedDict, total=False): + """ + :class:`altair.MultiLineString` ``TypedDict`` wrapper. + + Parameters + ---------- + coordinates + + type + Specifies the type of GeoJSON object. + bbox + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + """ + + coordinates: Sequence[Sequence[Sequence[float]]] + type: Literal["MultiLineString"] + bbox: Sequence[float] + + +class MultiPointKwds(TypedDict, total=False): + """ + :class:`altair.MultiPoint` ``TypedDict`` wrapper. + + Parameters + ---------- + coordinates + + type + Specifies the type of GeoJSON object. + bbox + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + """ + + coordinates: Sequence[Sequence[float]] + type: Literal["MultiPoint"] + bbox: Sequence[float] + + +class MultiPolygonKwds(TypedDict, total=False): + """ + :class:`altair.MultiPolygon` ``TypedDict`` wrapper. + + Parameters + ---------- + coordinates + + type + Specifies the type of GeoJSON object. + bbox + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + """ + + coordinates: Sequence[Sequence[Sequence[Sequence[float]]]] + type: Literal["MultiPolygon"] + bbox: Sequence[float] + + +class NumberLocaleKwds(TypedDict, total=False): + """ + :class:`altair.NumberLocale` ``TypedDict`` wrapper. + + Parameters + ---------- + currency + The currency prefix and suffix (e.g., ["$", ""]). + decimal + The decimal point (e.g., "."). + grouping + The array of group sizes (e.g., [3]), cycled as needed. + thousands + The group separator (e.g., ","). + minus + The minus sign (defaults to hyphen-minus, "-"). + nan + The not-a-number value (defaults to "NaN"). + numerals + An array of ten strings to replace the numerals 0-9. + percent + The percent sign (defaults to "%"). + """ + + currency: Sequence[str] + decimal: str + grouping: Sequence[float] + thousands: str + minus: str + nan: str + numerals: Sequence[str] + percent: str + + +class OverlayMarkDefKwds(TypedDict, total=False): + """ + :class:`altair.OverlayMarkDef` ``TypedDict`` wrapper. + + Parameters + ---------- + align + The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). + One of ``"left"``, ``"right"``, ``"center"``. + + **Note:** Expression reference is *not* supported for range marks. + angle + The rotation angle of the text, in degrees. + aria + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG element, removing the mark item from the ARIA accessibility tree. + ariaRole + Sets the type of user interface element of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "role" attribute. Warning: this + property is experimental and may be changed in the future. + ariaRoleDescription + A human-readable, author-localized description for the role of the mark item for + `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "aria-roledescription" attribute. + Warning: this property is experimental and may be changed in the future. + aspect + Whether to keep aspect ratio of image marks. + baseline + For text marks, the vertical text baseline. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an + expression reference that provides one of the valid values. The ``"line-top"`` and + ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are + calculated relative to the ``lineHeight`` rather than ``fontSize`` alone. + + For range marks, the vertical alignment of the marks. One of ``"top"``, + ``"middle"``, ``"bottom"``. + + **Note:** Expression reference is *not* supported for range marks. + blend + The color blend mode for drawing an item on its current background. Any valid `CSS + mix-blend-mode `__ + value can be used. + + __Default value:__ ``"source-over"`` + clip + Whether a mark be clipped to the enclosing group's width and height. + color + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + cornerRadius + The radius in pixels of rounded rectangles or arcs' corners. + + **Default value:** ``0`` + cornerRadiusBottomLeft + The radius in pixels of rounded rectangles' bottom left corner. + + **Default value:** ``0`` + cornerRadiusBottomRight + The radius in pixels of rounded rectangles' bottom right corner. + + **Default value:** ``0`` + cornerRadiusTopLeft + The radius in pixels of rounded rectangles' top right corner. + + **Default value:** ``0`` + cornerRadiusTopRight + The radius in pixels of rounded rectangles' top left corner. + + **Default value:** ``0`` + cursor + The mouse cursor used over the mark. Any valid `CSS cursor type + `__ can be used. + description + A text description of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the `"aria-label" attribute + `__. + dir + The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` + (right-to-left). This property determines on which side is truncated in response to + the limit parameter. + + **Default value:** ``"ltr"`` + dx + The horizontal offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + dy + The vertical offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + ellipsis + The ellipsis string for text truncated in response to the limit parameter. + + **Default value:** ``"…"`` + endAngle + The end angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + fill + Default fill color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove fill. + + **Default value:** (None) + fillOpacity + The fill opacity (value between [0,1]). + + **Default value:** ``1`` + filled + Whether the mark's color should be used as fill color instead of stroke color. + + **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well + as ``geoshape`` marks for `graticule + `__ data sources; + otherwise, ``true``. + + **Note:** This property cannot be used in a `style config + `__. + font + The typeface to set the text in (e.g., ``"Helvetica Neue"``). + fontSize + The font size, in pixels. + + **Default value:** ``11`` + fontStyle + The font style (e.g., ``"italic"``). + fontWeight + The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a + number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and + ``"bold"`` = ``700``). + height + Height of the marks. + href + A URL to load upon mouse click. If defined, the mark acts as a hyperlink. + innerRadius + The inner radius in pixels of arc marks. ``innerRadius`` is an alias for + ``radius2``. + + **Default value:** ``0`` + interpolate + The line interpolation method to use for line and area marks. One of the following: + + * ``"linear"``: piecewise linear segments, as in a polyline. + * ``"linear-closed"``: close the linear segments to form a polygon. + * ``"step"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"step-before"``: alternate between vertical and horizontal segments, as in a + step function. + * ``"step-after"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"basis"``: a B-spline, with control point duplication on the ends. + * ``"basis-open"``: an open B-spline; may not intersect the start or end. + * ``"basis-closed"``: a closed B-spline, as in a loop. + * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends. + * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end, + but will intersect other control points. + * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop. + * ``"bundle"``: equivalent to basis, except the tension parameter is used to + straighten the spline. + * ``"monotone"``: cubic interpolation that preserves monotonicity in y. + invalid + Invalid data mode, which defines how the marks and corresponding scales should + represent invalid values (``null`` and ``NaN`` in continuous scales *without* + defined output for invalid values). + + * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and + *scales*. For path marks (for line, area, trail), this option will create paths + that connect valid points, as if the data rows with invalid values do not exist. + + * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at + invalid values. For non-path marks, this is equivalent to ``"filter"``. All + *scale* domains will *exclude* these filtered data points. + + * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid + values. Hide invalid values for non-path marks. All *scale* domains will + *include* these filtered data points (for both path and non-path marks). + + * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each + scale will use the output for invalid values defined in ``config.scale.invalid`` + or, if unspecified, by default invalid values will produce the same visual values + as zero (if the scale includes zero) or the minimum value (if the scale does not + include zero). + + * ``"break-paths-show-path-domains"`` (default) — This is equivalent to + ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and + ``"filter"`` for non-path marks. + + **Note**: If any channel's scale has an output for invalid values defined in + ``config.scale.invalid``, all values for the scales will be considered "valid" since + they can produce a reasonable output for the scales. Thus, fields for such channels + will not be filtered and will not cause path breaks. + limit + The maximum length of the text mark in pixels. The text value will be automatically + truncated if the rendered size exceeds the limit. + + **Default value:** ``0`` -- indicating no limit + lineBreak + A delimiter, such as a newline character, upon which to break text strings into + multiple lines. This property is ignored if the text is array-valued. + lineHeight + The line height in pixels (the spacing between subsequent lines of text) for + multi-line text marks. + opacity + The overall opacity (value between [0,1]). + + **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, + ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. + order + For line and trail marks, this ``order`` property can be set to ``null`` or + ``false`` to make the lines use the original order in the data sources. + orient + The orientation of a non-stacked bar, tick, area, and line charts. The value is + either horizontal (default) or vertical. + + * For bar, rule and tick, this determines whether the size of the bar and tick + should be applied to x or y dimension. + * For area, this property determines the orient property of the Vega output. + * For line and trail marks, this property determines the sort order of the points in + the line if ``config.sortLineBy`` is not specified. For stacked charts, this is + always determined by the orientation of the stack; therefore explicitly specified + value will be ignored. + outerRadius + The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``. + + **Default value:** ``0`` + padAngle + The angular padding applied to sides of the arc, in radians. + radius + For arc mark, the primary (outer) radius in pixels. + + For text marks, polar coordinate radial offset, in pixels, of the text from the + origin determined by the ``x`` and ``y`` properties. + + **Default value:** ``min(plot_width, plot_height)/2`` + radius2 + The secondary (inner) radius in pixels of arc marks. + + **Default value:** ``0`` + radius2Offset + Offset for radius2. + radiusOffset + Offset for radius. + shape + Shape of the point marks. Supported values include: + + * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, + ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or + ``"triangle-left"``. + * the line symbol ``"stroke"`` + * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` + * a custom `SVG path string + `__ (For correct + sizing, custom shape paths should be defined within a square bounding box with + coordinates ranging from -1 to 1 along both the x and y dimensions.) + + **Default value:** ``"circle"`` + size + Default size for marks. + + * For ``point``/``circle``/``square``, this represents the pixel area of the marks. + Note that this value sets the area of the symbol; the side lengths will increase + with the square root of this value. + * For ``bar``, this represents the band size of the bar, in pixels. + * For ``text``, this represents the font size, in pixels. + + **Default value:** + + * ``30`` for point, circle, square marks; width/height's ``step`` + * ``2`` for bar marks with discrete dimensions; + * ``5`` for bar marks with continuous dimensions; + * ``11`` for text marks. + smooth + A boolean flag (default true) indicating if the image should be smoothed when + resized. If false, individual pixels should be scaled directly rather than + interpolated with smoothing. For SVG rendering, this option may not work in some + browsers due to lack of standardization. + startAngle + The start angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + stroke + Default stroke color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove stroke. + + **Default value:** (None) + strokeCap + The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or + ``"square"``. + + **Default value:** ``"butt"`` + strokeDash + An array of alternating stroke, space lengths for creating dashed or dotted lines. + strokeDashOffset + The offset (in pixels) into which to begin drawing with the stroke dash array. + strokeJoin + The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. + + **Default value:** ``"miter"`` + strokeMiterLimit + The miter limit at which to bevel a line join. + strokeOffset + The offset in pixels at which to draw the group stroke and fill. If unspecified, the + default behavior is to dynamically offset stroked groups such that 1 pixel stroke + widths align with the pixel grid. + strokeOpacity + The stroke opacity (value between [0,1]). + + **Default value:** ``1`` + strokeWidth + The stroke width, in pixels. + style + 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 ``config.style.foo`` (the specified style ``"foo"`` has + higher precedence). + tension + Depending on the interpolation type, sets the tension parameter (for line and area + marks). + text + Placeholder text if the ``text`` channel is not specified + theta + * For arc marks, the arc length in radians if theta2 is not specified, otherwise the + start arc angle. (A value of 0 indicates up or “north”, increasing values proceed + clockwise.) + + * For text marks, polar coordinate angle in radians. + theta2 + The end angle of arc marks in radians. A value of 0 indicates up or “north”, + increasing values proceed clockwise. + theta2Offset + Offset for theta2. + thetaOffset + Offset for theta. + timeUnitBandPosition + Default relative band position for a time unit. If set to ``0``, the marks will be + positioned at the beginning of the time unit band step. If set to ``0.5``, the marks + will be positioned in the middle of the time unit band step. + timeUnitBandSize + Default relative band size for a time unit. If set to ``1``, the bandwidth of the + marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the + marks will be half of the time unit band step. + tooltip + The tooltip text string to show upon mouse hover or an object defining which fields + should the tooltip be derived from. + + * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from + ``encoding`` will be used. + * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the + highlighted data point will be used. + * If set to ``null`` or ``false``, then no tooltip will be used. + + See the `tooltip `__ + documentation for a detailed discussion about tooltip in Vega-Lite. + + **Default value:** ``null`` + url + The URL of the image file for image marks. + width + Width of the marks. + x + X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without + specified ``x2`` or ``width``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2 + X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2Offset + Offset for x2-position. + xOffset + Offset for x-position. + y + Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without + specified ``y2`` or ``height``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2 + Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2Offset + Offset for y2-position. + yOffset + Offset for y-position. + """ + + align: Align_T + angle: float + aria: bool + ariaRole: str + ariaRoleDescription: str + aspect: bool + baseline: TextBaseline_T + blend: Blend_T + clip: bool + color: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T + cornerRadius: float + cornerRadiusBottomLeft: float + cornerRadiusBottomRight: float + cornerRadiusTopLeft: float + cornerRadiusTopRight: float + cursor: Cursor_T + description: str + dir: TextDirection_T + dx: float + dy: float + ellipsis: str + endAngle: float + fill: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None + fillOpacity: float + filled: bool + font: str + fontSize: float + fontStyle: str + fontWeight: FontWeight_T + height: float + href: str + innerRadius: float + interpolate: Interpolate_T + invalid: MarkInvalidDataMode_T | None + limit: float + lineBreak: str + lineHeight: float + opacity: float + order: bool | None + orient: Orientation_T + outerRadius: float + padAngle: float + radius: float + radius2: float + radius2Offset: float + radiusOffset: float + shape: str + size: float + smooth: bool + startAngle: float + stroke: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None + strokeCap: StrokeCap_T + strokeDash: Sequence[float] + strokeDashOffset: float + strokeJoin: StrokeJoin_T + strokeMiterLimit: float + strokeOffset: float + strokeOpacity: float + strokeWidth: float + style: str | Sequence[str] + tension: float + text: str | Sequence[str] + theta: float + theta2: float + theta2Offset: float + thetaOffset: float + timeUnitBandPosition: float + timeUnitBandSize: float + tooltip: str | bool | float | TooltipContentKwds | None + url: str + width: float + x: float | Literal["width"] + x2: float | Literal["width"] + x2Offset: float + xOffset: float + y: float | Literal["height"] + y2: float | Literal["height"] + y2Offset: float + yOffset: float + + +class PointKwds(TypedDict, total=False): + """ + :class:`altair.Point` ``TypedDict`` wrapper. + + Parameters + ---------- + coordinates + A Position is an array of coordinates. + https://tools.ietf.org/html/rfc7946#section-3.1.1 Array should contain between two + and three elements. The previous GeoJSON specification allowed more elements (e.g., + which could be used to represent M values), but the current specification only + allows X, Y, and (optionally) Z to be defined. + type + Specifies the type of GeoJSON object. + bbox + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + """ + + coordinates: Sequence[float] + type: Literal["Point"] + bbox: Sequence[float] + + +class PointSelectionConfigKwds(TypedDict, total=False): + """ + :class:`altair.PointSelectionConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + type + Determines the default event processing and data query for the selection. Vega-Lite + currently supports two selection types: + + * ``"point"`` -- to select multiple discrete data values; the first value is + selected on ``click`` and additional values toggled on shift-click. + * ``"interval"`` -- to select a continuous range of data values on ``drag``. + clear + Clears the selection, emptying it of all values. This property can be a `Event + Stream `__ or ``false`` to disable + clear. + + **Default value:** ``dblclick``. + + **See also:** `clear examples + `__ in the + documentation. + encodings + An array of encoding channels. The corresponding data field values must match for a + data tuple to fall within the selection. + + **See also:** The `projection with encodings and fields section + `__ in the + documentation. + fields + An array of field names whose values must match for a data tuple to fall within the + selection. + + **See also:** The `projection with encodings and fields section + `__ in the + documentation. + nearest + When true, an invisible voronoi diagram is computed to accelerate discrete + selection. The data value *nearest* the mouse cursor is added to the selection. + + **Default value:** ``false``, which means that data values must be interacted with + directly (e.g., clicked on) to be added to the selection. + + **See also:** `nearest examples + `__ documentation. + on + A `Vega event stream `__ (object or + selector) that triggers the selection. For interval selections, the event stream + must specify a `start and end + `__. + + **See also:** `on examples + `__ in the documentation. + resolve + With layered and multi-view displays, a strategy that determines how selections' + data queries are resolved when applied in a filter transform, conditional encoding + rule, or scale domain. + + One of: + + * ``"global"`` -- only one brush exists for the entire SPLOM. When the user begins + to drag, any previous brushes are cleared, and a new one is constructed. + * ``"union"`` -- each cell contains its own brush, and points are highlighted if + they lie within *any* of these individual brushes. + * ``"intersect"`` -- each cell contains its own brush, and points are highlighted + only if they fall within *all* of these individual brushes. + + **Default value:** ``global``. + + **See also:** `resolve examples + `__ in the + documentation. + toggle + Controls whether data values should be toggled (inserted or removed from a point + selection) or only ever inserted into point selections. + + One of: + + * ``true`` -- the default behavior, which corresponds to ``"event.shiftKey"``. As a + result, data values are toggled when the user interacts with the shift-key + pressed. + * ``false`` -- disables toggling behaviour; the selection will only ever contain a + single data value corresponding to the most recent interaction. + * A `Vega expression `__ which is + re-evaluated as the user interacts. If the expression evaluates to ``true``, the + data value is toggled into or out of the point selection. If the expression + evaluates to ``false``, the point selection is first cleared, and the data value + is then inserted. For example, setting the value to the Vega expression ``"true"`` + will toggle data values without the user pressing the shift-key. + + **Default value:** ``true`` + + **See also:** `toggle examples + `__ in the + documentation. + """ + + type: Literal["point"] + clear: str | bool | MergedStreamKwds | DerivedStreamKwds + encodings: Sequence[SingleDefUnitChannel_T] + fields: Sequence[str] + nearest: bool + on: str | MergedStreamKwds | DerivedStreamKwds + resolve: SelectionResolution_T + toggle: str | bool + + +class PointSelectionConfigWithoutTypeKwds(TypedDict, total=False): + """ + :class:`altair.PointSelectionConfigWithoutType` ``TypedDict`` wrapper. + + Parameters + ---------- + clear + Clears the selection, emptying it of all values. This property can be a `Event + Stream `__ or ``false`` to disable + clear. + + **Default value:** ``dblclick``. + + **See also:** `clear examples + `__ in the + documentation. + encodings + An array of encoding channels. The corresponding data field values must match for a + data tuple to fall within the selection. + + **See also:** The `projection with encodings and fields section + `__ in the + documentation. + fields + An array of field names whose values must match for a data tuple to fall within the + selection. + + **See also:** The `projection with encodings and fields section + `__ in the + documentation. + nearest + When true, an invisible voronoi diagram is computed to accelerate discrete + selection. The data value *nearest* the mouse cursor is added to the selection. + + **Default value:** ``false``, which means that data values must be interacted with + directly (e.g., clicked on) to be added to the selection. + + **See also:** `nearest examples + `__ documentation. + on + A `Vega event stream `__ (object or + selector) that triggers the selection. For interval selections, the event stream + must specify a `start and end + `__. + + **See also:** `on examples + `__ in the documentation. + resolve + With layered and multi-view displays, a strategy that determines how selections' + data queries are resolved when applied in a filter transform, conditional encoding + rule, or scale domain. + + One of: + + * ``"global"`` -- only one brush exists for the entire SPLOM. When the user begins + to drag, any previous brushes are cleared, and a new one is constructed. + * ``"union"`` -- each cell contains its own brush, and points are highlighted if + they lie within *any* of these individual brushes. + * ``"intersect"`` -- each cell contains its own brush, and points are highlighted + only if they fall within *all* of these individual brushes. + + **Default value:** ``global``. + + **See also:** `resolve examples + `__ in the + documentation. + toggle + Controls whether data values should be toggled (inserted or removed from a point + selection) or only ever inserted into point selections. + + One of: + + * ``true`` -- the default behavior, which corresponds to ``"event.shiftKey"``. As a + result, data values are toggled when the user interacts with the shift-key + pressed. + * ``false`` -- disables toggling behaviour; the selection will only ever contain a + single data value corresponding to the most recent interaction. + * A `Vega expression `__ which is + re-evaluated as the user interacts. If the expression evaluates to ``true``, the + data value is toggled into or out of the point selection. If the expression + evaluates to ``false``, the point selection is first cleared, and the data value + is then inserted. For example, setting the value to the Vega expression ``"true"`` + will toggle data values without the user pressing the shift-key. + + **Default value:** ``true`` + + **See also:** `toggle examples + `__ in the + documentation. + """ + + clear: str | bool | MergedStreamKwds | DerivedStreamKwds + encodings: Sequence[SingleDefUnitChannel_T] + fields: Sequence[str] + nearest: bool + on: str | MergedStreamKwds | DerivedStreamKwds + resolve: SelectionResolution_T + toggle: str | bool + + +class PolygonKwds(TypedDict, total=False): + """ + :class:`altair.Polygon` ``TypedDict`` wrapper. + + Parameters + ---------- + coordinates + + type + Specifies the type of GeoJSON object. + bbox + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + """ + + coordinates: Sequence[Sequence[Sequence[float]]] + type: Literal["Polygon"] + bbox: Sequence[float] + + +class ProjectionKwds(TypedDict, total=False): + """ + :class:`altair.Projection` ``TypedDict`` wrapper. + + Parameters + ---------- + center + The projection's center, a two-element array of longitude and latitude in degrees. + + **Default value:** ``[0, 0]`` + clipAngle + The projection's clipping circle radius to the specified angle in degrees. If + ``null``, switches to `antimeridian `__ cutting + rather than small-circle clipping. + clipExtent + The projection's viewport clip extent to the specified bounds in pixels. The extent + bounds are specified as an array ``[[x0, y0], [x1, y1]]``, where ``x0`` is the + left-side of the viewport, ``y0`` is the top, ``x1`` is the right and ``y1`` is the + bottom. If ``null``, no viewport clipping is performed. + coefficient + The coefficient parameter for the ``hammer`` projection. + + **Default value:** ``2`` + distance + For the ``satellite`` projection, the distance from the center of the sphere to the + point of view, as a proportion of the sphere's radius. The recommended maximum clip + angle for a given ``distance`` is acos(1 / distance) converted to degrees. If tilt + is also applied, then more conservative clipping may be necessary. + + **Default value:** ``2.0`` + extent + + fit + + fraction + The fraction parameter for the ``bottomley`` projection. + + **Default value:** ``0.5``, corresponding to a sin(ψ) where ψ = π/6. + lobes + The number of lobes in projections that support multi-lobe views: ``berghaus``, + ``gingery``, or ``healpix``. The default value varies based on the projection type. + parallel + The parallel parameter for projections that support it: ``armadillo``, ``bonne``, + ``craig``, ``cylindricalEqualArea``, ``cylindricalStereographic``, + ``hammerRetroazimuthal``, ``loximuthal``, or ``rectangularPolyconic``. The default + value varies based on the projection type. + parallels + For conic projections, the `two standard parallels + `__ that define the map layout. + The default depends on the specific conic projection used. + pointRadius + The default radius (in pixels) to use when drawing GeoJSON ``Point`` and + ``MultiPoint`` geometries. This parameter sets a constant default value. To modify + the point radius in response to data, see the corresponding parameter of the GeoPath + and GeoShape transforms. + + **Default value:** ``4.5`` + precision + The threshold for the projection's `adaptive resampling + `__ to the specified value in pixels. This + value corresponds to the `Douglas-Peucker distance + `__. + If precision is not specified, returns the projection's current resampling precision + which defaults to ``√0.5 ≅ 0.70710…``. + radius + The radius parameter for the ``airy`` or ``gingery`` projection. The default value + varies based on the projection type. + ratio + The ratio parameter for the ``hill``, ``hufnagel``, or ``wagner`` projections. The + default value varies based on the projection type. + reflectX + Sets whether or not the x-dimension is reflected (negated) in the output. + reflectY + Sets whether or not the y-dimension is reflected (negated) in the output. + rotate + The projection's three-axis rotation to the specified angles, which must be a two- + or three-element array of numbers [``lambda``, ``phi``, ``gamma``] specifying the + rotation angles in degrees about each spherical axis. (These correspond to yaw, + pitch and roll.) + + **Default value:** ``[0, 0, 0]`` + scale + The projection's scale (zoom) factor, overriding automatic fitting. The default + scale is projection-specific. The scale factor corresponds linearly to the distance + between projected points; however, scale factor values are not equivalent across + projections. + size + Used in conjunction with fit, provides the width and height in pixels of the area to + which the projection should be automatically fit. + spacing + The spacing parameter for the ``lagrange`` projection. + + **Default value:** ``0.5`` + tilt + The tilt angle (in degrees) for the ``satellite`` projection. + + **Default value:** ``0``. + translate + The projection's translation offset as a two-element array ``[tx, ty]``. + type + The cartographic projection to use. This value is case-insensitive, for example + ``"albers"`` and ``"Albers"`` indicate the same projection type. You can find all + valid projection types `in the documentation + `__. + + **Default value:** ``equalEarth`` + """ + + center: Sequence[float] + clipAngle: float + clipExtent: Sequence[Sequence[float]] + coefficient: float + distance: float + extent: Sequence[Sequence[float]] + fit: ( + GeoJsonFeatureKwds + | GeoJsonFeatureCollectionKwds + | Sequence[GeoJsonFeatureKwds] + | Sequence[ + GeoJsonFeatureKwds + | GeoJsonFeatureCollectionKwds + | Sequence[GeoJsonFeatureKwds] + ] + ) + fraction: float + lobes: float + parallel: float + parallels: Sequence[float] + pointRadius: float + precision: float + radius: float + ratio: float + reflectX: bool + reflectY: bool + rotate: Sequence[float] + scale: float + size: Sequence[float] + spacing: float + tilt: float + translate: Sequence[float] + type: ProjectionType_T + + +class ProjectionConfigKwds(TypedDict, total=False): + """ + :class:`altair.ProjectionConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + center + The projection's center, a two-element array of longitude and latitude in degrees. + + **Default value:** ``[0, 0]`` + clipAngle + The projection's clipping circle radius to the specified angle in degrees. If + ``null``, switches to `antimeridian `__ cutting + rather than small-circle clipping. + clipExtent + The projection's viewport clip extent to the specified bounds in pixels. The extent + bounds are specified as an array ``[[x0, y0], [x1, y1]]``, where ``x0`` is the + left-side of the viewport, ``y0`` is the top, ``x1`` is the right and ``y1`` is the + bottom. If ``null``, no viewport clipping is performed. + coefficient + The coefficient parameter for the ``hammer`` projection. + + **Default value:** ``2`` + distance + For the ``satellite`` projection, the distance from the center of the sphere to the + point of view, as a proportion of the sphere's radius. The recommended maximum clip + angle for a given ``distance`` is acos(1 / distance) converted to degrees. If tilt + is also applied, then more conservative clipping may be necessary. + + **Default value:** ``2.0`` + extent + + fit + + fraction + The fraction parameter for the ``bottomley`` projection. + + **Default value:** ``0.5``, corresponding to a sin(ψ) where ψ = π/6. + lobes + The number of lobes in projections that support multi-lobe views: ``berghaus``, + ``gingery``, or ``healpix``. The default value varies based on the projection type. + parallel + The parallel parameter for projections that support it: ``armadillo``, ``bonne``, + ``craig``, ``cylindricalEqualArea``, ``cylindricalStereographic``, + ``hammerRetroazimuthal``, ``loximuthal``, or ``rectangularPolyconic``. The default + value varies based on the projection type. + parallels + For conic projections, the `two standard parallels + `__ that define the map layout. + The default depends on the specific conic projection used. + pointRadius + The default radius (in pixels) to use when drawing GeoJSON ``Point`` and + ``MultiPoint`` geometries. This parameter sets a constant default value. To modify + the point radius in response to data, see the corresponding parameter of the GeoPath + and GeoShape transforms. + + **Default value:** ``4.5`` + precision + The threshold for the projection's `adaptive resampling + `__ to the specified value in pixels. This + value corresponds to the `Douglas-Peucker distance + `__. + If precision is not specified, returns the projection's current resampling precision + which defaults to ``√0.5 ≅ 0.70710…``. + radius + The radius parameter for the ``airy`` or ``gingery`` projection. The default value + varies based on the projection type. + ratio + The ratio parameter for the ``hill``, ``hufnagel``, or ``wagner`` projections. The + default value varies based on the projection type. + reflectX + Sets whether or not the x-dimension is reflected (negated) in the output. + reflectY + Sets whether or not the y-dimension is reflected (negated) in the output. + rotate + The projection's three-axis rotation to the specified angles, which must be a two- + or three-element array of numbers [``lambda``, ``phi``, ``gamma``] specifying the + rotation angles in degrees about each spherical axis. (These correspond to yaw, + pitch and roll.) + + **Default value:** ``[0, 0, 0]`` + scale + The projection's scale (zoom) factor, overriding automatic fitting. The default + scale is projection-specific. The scale factor corresponds linearly to the distance + between projected points; however, scale factor values are not equivalent across + projections. + size + Used in conjunction with fit, provides the width and height in pixels of the area to + which the projection should be automatically fit. + spacing + The spacing parameter for the ``lagrange`` projection. + + **Default value:** ``0.5`` + tilt + The tilt angle (in degrees) for the ``satellite`` projection. + + **Default value:** ``0``. + translate + The projection's translation offset as a two-element array ``[tx, ty]``. + type + The cartographic projection to use. This value is case-insensitive, for example + ``"albers"`` and ``"Albers"`` indicate the same projection type. You can find all + valid projection types `in the documentation + `__. + + **Default value:** ``equalEarth`` + """ + + center: Sequence[float] + clipAngle: float + clipExtent: Sequence[Sequence[float]] + coefficient: float + distance: float + extent: Sequence[Sequence[float]] + fit: ( + GeoJsonFeatureKwds + | GeoJsonFeatureCollectionKwds + | Sequence[GeoJsonFeatureKwds] + | Sequence[ + GeoJsonFeatureKwds + | GeoJsonFeatureCollectionKwds + | Sequence[GeoJsonFeatureKwds] + ] + ) + fraction: float + lobes: float + parallel: float + parallels: Sequence[float] + pointRadius: float + precision: float + radius: float + ratio: float + reflectX: bool + reflectY: bool + rotate: Sequence[float] + scale: float + size: Sequence[float] + spacing: float + tilt: float + translate: Sequence[float] + type: ProjectionType_T + + +class RadialGradientKwds(TypedDict, total=False): + """ + :class:`altair.RadialGradient` ``TypedDict`` wrapper. + + Parameters + ---------- + gradient + The type of gradient. Use ``"radial"`` for a radial gradient. + stops + An array of gradient stops defining the gradient color sequence. + id + + r1 + The radius length, in normalized [0, 1] coordinates, of the inner circle for the + gradient. + + **Default value:** ``0`` + r2 + The radius length, in normalized [0, 1] coordinates, of the outer circle for the + gradient. + + **Default value:** ``0.5`` + x1 + The x-coordinate, in normalized [0, 1] coordinates, for the center of the inner + circle for the gradient. + + **Default value:** ``0.5`` + x2 + The x-coordinate, in normalized [0, 1] coordinates, for the center of the outer + circle for the gradient. + + **Default value:** ``0.5`` + y1 + The y-coordinate, in normalized [0, 1] coordinates, for the center of the inner + circle for the gradient. + + **Default value:** ``0.5`` + y2 + The y-coordinate, in normalized [0, 1] coordinates, for the center of the outer + circle for the gradient. + + **Default value:** ``0.5`` + """ + + gradient: Literal["radial"] + stops: Sequence[GradientStopKwds] + id: str + r1: float + r2: float + x1: float + x2: float + y1: float + y2: float + + +class RangeConfigKwds(TypedDict, total=False): + """ + :class:`altair.RangeConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + category + Default `color scheme `__ for categorical + data. + diverging + Default `color scheme `__ for diverging + quantitative ramps. + heatmap + Default `color scheme `__ for + quantitative heatmaps. + ordinal + Default `color scheme `__ for + rank-ordered data. + ramp + Default `color scheme `__ for sequential + quantitative ramps. + symbol + Array of `symbol `__ names or paths + for the default shape palette. + """ + + category: ( + Sequence[ColorHex | ColorName_T] + | Sequence[str | bool | float | Sequence[float] | None] + | RangeEnum_T + ) + diverging: ( + Sequence[ColorHex | ColorName_T] + | Sequence[str | bool | float | Sequence[float] | None] + | RangeEnum_T + ) + heatmap: ( + Sequence[ColorHex | ColorName_T] + | Sequence[str | bool | float | Sequence[float] | None] + | RangeEnum_T + ) + ordinal: ( + Sequence[ColorHex | ColorName_T] + | Sequence[str | bool | float | Sequence[float] | None] + | RangeEnum_T + ) + ramp: ( + Sequence[ColorHex | ColorName_T] + | Sequence[str | bool | float | Sequence[float] | None] + | RangeEnum_T + ) + symbol: Sequence[str] + + +class RectConfigKwds(TypedDict, total=False): + """ + :class:`altair.RectConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + align + The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). + One of ``"left"``, ``"right"``, ``"center"``. + + **Note:** Expression reference is *not* supported for range marks. + angle + The rotation angle of the text, in degrees. + aria + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG element, removing the mark item from the ARIA accessibility tree. + ariaRole + Sets the type of user interface element of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "role" attribute. Warning: this + property is experimental and may be changed in the future. + ariaRoleDescription + A human-readable, author-localized description for the role of the mark item for + `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "aria-roledescription" attribute. + Warning: this property is experimental and may be changed in the future. + aspect + Whether to keep aspect ratio of image marks. + baseline + For text marks, the vertical text baseline. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an + expression reference that provides one of the valid values. The ``"line-top"`` and + ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are + calculated relative to the ``lineHeight`` rather than ``fontSize`` alone. + + For range marks, the vertical alignment of the marks. One of ``"top"``, + ``"middle"``, ``"bottom"``. + + **Note:** Expression reference is *not* supported for range marks. + binSpacing + Offset between bars for binned field. The ideal value for this is either 0 + (preferred by statisticians) or 1 (Vega-Lite default, D3 example style). + + **Default value:** ``1`` + blend + The color blend mode for drawing an item on its current background. Any valid `CSS + mix-blend-mode `__ + value can be used. + + __Default value:__ ``"source-over"`` + color + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + continuousBandSize + The default size of the bars on continuous scales. + + **Default value:** ``5`` + cornerRadius + The radius in pixels of rounded rectangles or arcs' corners. + + **Default value:** ``0`` + cornerRadiusBottomLeft + The radius in pixels of rounded rectangles' bottom left corner. + + **Default value:** ``0`` + cornerRadiusBottomRight + The radius in pixels of rounded rectangles' bottom right corner. + + **Default value:** ``0`` + cornerRadiusTopLeft + The radius in pixels of rounded rectangles' top right corner. + + **Default value:** ``0`` + cornerRadiusTopRight + The radius in pixels of rounded rectangles' top left corner. + + **Default value:** ``0`` + cursor + The mouse cursor used over the mark. Any valid `CSS cursor type + `__ can be used. + description + A text description of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the `"aria-label" attribute + `__. + dir + The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` + (right-to-left). This property determines on which side is truncated in response to + the limit parameter. + + **Default value:** ``"ltr"`` + discreteBandSize + The default size of the bars with discrete dimensions. If unspecified, the default + size is ``step-2``, which provides 2 pixel offset between bars. + dx + The horizontal offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + dy + The vertical offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + ellipsis + The ellipsis string for text truncated in response to the limit parameter. + + **Default value:** ``"…"`` + endAngle + The end angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + fill + Default fill color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove fill. + + **Default value:** (None) + fillOpacity + The fill opacity (value between [0,1]). + + **Default value:** ``1`` + filled + Whether the mark's color should be used as fill color instead of stroke color. + + **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well + as ``geoshape`` marks for `graticule + `__ data sources; + otherwise, ``true``. + + **Note:** This property cannot be used in a `style config + `__. + font + The typeface to set the text in (e.g., ``"Helvetica Neue"``). + fontSize + The font size, in pixels. + + **Default value:** ``11`` + fontStyle + The font style (e.g., ``"italic"``). + fontWeight + The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a + number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and + ``"bold"`` = ``700``). + height + Height of the marks. + href + A URL to load upon mouse click. If defined, the mark acts as a hyperlink. + innerRadius + The inner radius in pixels of arc marks. ``innerRadius`` is an alias for + ``radius2``. + + **Default value:** ``0`` + interpolate + The line interpolation method to use for line and area marks. One of the following: + + * ``"linear"``: piecewise linear segments, as in a polyline. + * ``"linear-closed"``: close the linear segments to form a polygon. + * ``"step"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"step-before"``: alternate between vertical and horizontal segments, as in a + step function. + * ``"step-after"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"basis"``: a B-spline, with control point duplication on the ends. + * ``"basis-open"``: an open B-spline; may not intersect the start or end. + * ``"basis-closed"``: a closed B-spline, as in a loop. + * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends. + * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end, + but will intersect other control points. + * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop. + * ``"bundle"``: equivalent to basis, except the tension parameter is used to + straighten the spline. + * ``"monotone"``: cubic interpolation that preserves monotonicity in y. + invalid + Invalid data mode, which defines how the marks and corresponding scales should + represent invalid values (``null`` and ``NaN`` in continuous scales *without* + defined output for invalid values). + + * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and + *scales*. For path marks (for line, area, trail), this option will create paths + that connect valid points, as if the data rows with invalid values do not exist. + + * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at + invalid values. For non-path marks, this is equivalent to ``"filter"``. All + *scale* domains will *exclude* these filtered data points. + + * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid + values. Hide invalid values for non-path marks. All *scale* domains will + *include* these filtered data points (for both path and non-path marks). + + * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each + scale will use the output for invalid values defined in ``config.scale.invalid`` + or, if unspecified, by default invalid values will produce the same visual values + as zero (if the scale includes zero) or the minimum value (if the scale does not + include zero). + + * ``"break-paths-show-path-domains"`` (default) — This is equivalent to + ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and + ``"filter"`` for non-path marks. + + **Note**: If any channel's scale has an output for invalid values defined in + ``config.scale.invalid``, all values for the scales will be considered "valid" since + they can produce a reasonable output for the scales. Thus, fields for such channels + will not be filtered and will not cause path breaks. + limit + The maximum length of the text mark in pixels. The text value will be automatically + truncated if the rendered size exceeds the limit. + + **Default value:** ``0`` -- indicating no limit + lineBreak + A delimiter, such as a newline character, upon which to break text strings into + multiple lines. This property is ignored if the text is array-valued. + lineHeight + The line height in pixels (the spacing between subsequent lines of text) for + multi-line text marks. + minBandSize + The minimum band size for bar and rectangle marks. **Default value:** ``0.25`` + opacity + The overall opacity (value between [0,1]). + + **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, + ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. + order + For line and trail marks, this ``order`` property can be set to ``null`` or + ``false`` to make the lines use the original order in the data sources. + orient + The orientation of a non-stacked bar, tick, area, and line charts. The value is + either horizontal (default) or vertical. + + * For bar, rule and tick, this determines whether the size of the bar and tick + should be applied to x or y dimension. + * For area, this property determines the orient property of the Vega output. + * For line and trail marks, this property determines the sort order of the points in + the line if ``config.sortLineBy`` is not specified. For stacked charts, this is + always determined by the orientation of the stack; therefore explicitly specified + value will be ignored. + outerRadius + The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``. + + **Default value:** ``0`` + padAngle + The angular padding applied to sides of the arc, in radians. + radius + For arc mark, the primary (outer) radius in pixels. + + For text marks, polar coordinate radial offset, in pixels, of the text from the + origin determined by the ``x`` and ``y`` properties. + + **Default value:** ``min(plot_width, plot_height)/2`` + radius2 + The secondary (inner) radius in pixels of arc marks. + + **Default value:** ``0`` + shape + Shape of the point marks. Supported values include: + + * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, + ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or + ``"triangle-left"``. + * the line symbol ``"stroke"`` + * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` + * a custom `SVG path string + `__ (For correct + sizing, custom shape paths should be defined within a square bounding box with + coordinates ranging from -1 to 1 along both the x and y dimensions.) + + **Default value:** ``"circle"`` + size + Default size for marks. + + * For ``point``/``circle``/``square``, this represents the pixel area of the marks. + Note that this value sets the area of the symbol; the side lengths will increase + with the square root of this value. + * For ``bar``, this represents the band size of the bar, in pixels. + * For ``text``, this represents the font size, in pixels. + + **Default value:** + + * ``30`` for point, circle, square marks; width/height's ``step`` + * ``2`` for bar marks with discrete dimensions; + * ``5`` for bar marks with continuous dimensions; + * ``11`` for text marks. + smooth + A boolean flag (default true) indicating if the image should be smoothed when + resized. If false, individual pixels should be scaled directly rather than + interpolated with smoothing. For SVG rendering, this option may not work in some + browsers due to lack of standardization. + startAngle + The start angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + stroke + Default stroke color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove stroke. + + **Default value:** (None) + strokeCap + The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or + ``"square"``. + + **Default value:** ``"butt"`` + strokeDash + An array of alternating stroke, space lengths for creating dashed or dotted lines. + strokeDashOffset + The offset (in pixels) into which to begin drawing with the stroke dash array. + strokeJoin + The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. + + **Default value:** ``"miter"`` + strokeMiterLimit + The miter limit at which to bevel a line join. + strokeOffset + The offset in pixels at which to draw the group stroke and fill. If unspecified, the + default behavior is to dynamically offset stroked groups such that 1 pixel stroke + widths align with the pixel grid. + strokeOpacity + The stroke opacity (value between [0,1]). + + **Default value:** ``1`` + strokeWidth + The stroke width, in pixels. + tension + Depending on the interpolation type, sets the tension parameter (for line and area + marks). + text + Placeholder text if the ``text`` channel is not specified + theta + * For arc marks, the arc length in radians if theta2 is not specified, otherwise the + start arc angle. (A value of 0 indicates up or “north”, increasing values proceed + clockwise.) + + * For text marks, polar coordinate angle in radians. + theta2 + The end angle of arc marks in radians. A value of 0 indicates up or “north”, + increasing values proceed clockwise. + timeUnitBandPosition + Default relative band position for a time unit. If set to ``0``, the marks will be + positioned at the beginning of the time unit band step. If set to ``0.5``, the marks + will be positioned in the middle of the time unit band step. + timeUnitBandSize + Default relative band size for a time unit. If set to ``1``, the bandwidth of the + marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the + marks will be half of the time unit band step. + tooltip + The tooltip text string to show upon mouse hover or an object defining which fields + should the tooltip be derived from. + + * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from + ``encoding`` will be used. + * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the + highlighted data point will be used. + * If set to ``null`` or ``false``, then no tooltip will be used. + + See the `tooltip `__ + documentation for a detailed discussion about tooltip in Vega-Lite. + + **Default value:** ``null`` + url + The URL of the image file for image marks. + width + Width of the marks. + x + X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without + specified ``x2`` or ``width``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2 + X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + y + Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without + specified ``y2`` or ``height``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2 + Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + """ + + align: Align_T + angle: float + aria: bool + ariaRole: str + ariaRoleDescription: str + aspect: bool + baseline: TextBaseline_T + binSpacing: float + blend: Blend_T + color: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T + continuousBandSize: float + cornerRadius: float + cornerRadiusBottomLeft: float + cornerRadiusBottomRight: float + cornerRadiusTopLeft: float + cornerRadiusTopRight: float + cursor: Cursor_T + description: str + dir: TextDirection_T + discreteBandSize: float + dx: float + dy: float + ellipsis: str + endAngle: float + fill: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None + fillOpacity: float + filled: bool + font: str + fontSize: float + fontStyle: str + fontWeight: FontWeight_T + height: float + href: str + innerRadius: float + interpolate: Interpolate_T + invalid: MarkInvalidDataMode_T | None + limit: float + lineBreak: str + lineHeight: float + minBandSize: float + opacity: float + order: bool | None + orient: Orientation_T + outerRadius: float + padAngle: float + radius: float + radius2: float + shape: str + size: float + smooth: bool + startAngle: float + stroke: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None + strokeCap: StrokeCap_T + strokeDash: Sequence[float] + strokeDashOffset: float + strokeJoin: StrokeJoin_T + strokeMiterLimit: float + strokeOffset: float + strokeOpacity: float + strokeWidth: float + tension: float + text: str | Sequence[str] + theta: float + theta2: float + timeUnitBandPosition: float + timeUnitBandSize: float + tooltip: str | bool | float | TooltipContentKwds | None + url: str + width: float + x: float | Literal["width"] + x2: float | Literal["width"] + y: float | Literal["height"] + y2: float | Literal["height"] + + +class ResolveKwds(TypedDict, total=False): + """ + :class:`altair.Resolve` ``TypedDict`` wrapper. + + Parameters + ---------- + axis + + legend + + scale + + """ + + axis: AxisResolveMapKwds + legend: LegendResolveMapKwds + scale: ScaleResolveMapKwds + + +class ScaleConfigKwds(TypedDict, total=False): + """ + :class:`altair.ScaleConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + bandPaddingInner + Default inner padding for ``x`` and ``y`` band scales. + + **Default value:** + + * ``nestedOffsetPaddingInner`` for x/y scales with nested x/y offset scales. + * ``barBandPaddingInner`` for bar marks (``0.1`` by default) + * ``rectBandPaddingInner`` for rect and other marks (``0`` by default) + bandPaddingOuter + Default outer padding for ``x`` and ``y`` band scales. + + **Default value:** ``paddingInner/2`` (which makes *width/height = number of unique + values * step*) + bandWithNestedOffsetPaddingInner + Default inner padding for ``x`` and ``y`` band scales with nested ``xOffset`` and + ``yOffset`` encoding. + + **Default value:** ``0.2`` + bandWithNestedOffsetPaddingOuter + Default outer padding for ``x`` and ``y`` band scales with nested ``xOffset`` and + ``yOffset`` encoding. + + **Default value:** ``0.2`` + barBandPaddingInner + Default inner padding for ``x`` and ``y`` band-ordinal scales of ``"bar"`` marks. + + **Default value:** ``0.1`` + clamp + If true, values that exceed the data domain are clamped to either the minimum or + maximum range value + continuousPadding + Default padding for continuous x/y scales. + + **Default:** The bar width for continuous x-scale of a vertical bar and continuous + y-scale of a horizontal bar.; ``0`` otherwise. + invalid + An object that defines scale outputs per channel for invalid values (nulls and NaNs + on a continuous scale). + + * The keys in this object are the scale channels. + * The values is either ``"zero-or-min"`` (use zero if the scale includes zero or min + value otherwise) or a value definition ``{value: ...}``. + + *Example:* Setting this ``config.scale.invalid`` property to ``{color: {value: + '#aaa'}}`` will make the visualization color all invalid values with '#aaa'. + + See [https://vega.github.io/vega-lite/docs/invalid-data.html](Invalid Data Docs) for + more details. + maxBandSize + The default max value for mapping quantitative fields to bar's size/bandSize. + + If undefined (default), we will use the axis's size (width or height) - 1. + maxFontSize + The default max value for mapping quantitative fields to text's size/fontSize scale. + + **Default value:** ``40`` + maxOpacity + Default max opacity for mapping a field to opacity. + + **Default value:** ``0.8`` + maxSize + Default max value for point size scale. + maxStrokeWidth + Default max strokeWidth for the scale of strokeWidth for rule and line marks and of + size for trail marks. + + **Default value:** ``4`` + minBandSize + The default min value for mapping quantitative fields to bar and tick's + size/bandSize scale. + + **Default value:** ``2`` + minFontSize + The default min value for mapping quantitative fields to text's size/fontSize scale. + + **Default value:** ``8`` + minOpacity + Default minimum opacity for mapping a field to opacity. + + **Default value:** ``0.3`` + minSize + Default minimum value for point size scale. + + **Default value:** ``9`` + minStrokeWidth + Default minimum strokeWidth for the scale of strokeWidth for rule and line marks and + of size for trail marks. + + **Default value:** ``1`` + offsetBandPaddingInner + Default padding inner for xOffset/yOffset's band scales. + + **Default Value:** ``0`` + offsetBandPaddingOuter + Default padding outer for xOffset/yOffset's band scales. + + **Default Value:** ``0`` + pointPadding + Default outer padding for ``x`` and ``y`` point-ordinal scales. + + **Default value:** ``0.5`` (which makes *width/height = number of unique values * + step*) + quantileCount + Default range cardinality for `quantile + `__ scale. + + **Default value:** ``4`` + quantizeCount + Default range cardinality for `quantize + `__ scale. + + **Default value:** ``4`` + rectBandPaddingInner + Default inner padding for ``x`` and ``y`` band-ordinal scales of ``"rect"`` marks. + + **Default value:** ``0`` + round + If true, rounds numeric output values to integers. This can be helpful for snapping + to the pixel grid. (Only available for ``x``, ``y``, and ``size`` scales.) + tickBandPaddingInner + Default inner padding for ``x`` and ``y`` band-ordinal scales of ``"tick"`` marks. + + **Default value:** ``0.25`` + useUnaggregatedDomain + Use the source data range before aggregation as scale domain instead of aggregated + data for aggregate axis. + + This is equivalent to setting ``domain`` to ``"unaggregate"`` for aggregated + *quantitative* fields by default. + + This property only works with aggregate functions that produce values within the raw + data domain (``"mean"``, ``"average"``, ``"median"``, ``"q1"``, ``"q3"``, ``"min"``, + ``"max"``). For other aggregations that produce values outside of the raw data + domain (e.g. ``"count"``, ``"sum"``), this property is ignored. + + **Default value:** ``false`` + xReverse + Reverse x-scale by default (useful for right-to-left charts). + zero + Default ``scale.zero`` for `continuous + `__ scales except for + (1) x/y-scales of non-ranged bar or area charts and (2) size scales. + + **Default value:** ``true`` + """ + + bandPaddingInner: float + bandPaddingOuter: float + bandWithNestedOffsetPaddingInner: float + bandWithNestedOffsetPaddingOuter: float + barBandPaddingInner: float + clamp: bool + continuousPadding: float + invalid: ScaleInvalidDataConfigKwds + maxBandSize: float + maxFontSize: float + maxOpacity: float + maxSize: float + maxStrokeWidth: float + minBandSize: float + minFontSize: float + minOpacity: float + minSize: float + minStrokeWidth: float + offsetBandPaddingInner: float + offsetBandPaddingOuter: float + pointPadding: float + quantileCount: float + quantizeCount: float + rectBandPaddingInner: float + round: bool + tickBandPaddingInner: float + useUnaggregatedDomain: bool + xReverse: bool + zero: bool + + +class ScaleInvalidDataConfigKwds(TypedDict, total=False): + """ + :class:`altair.ScaleInvalidDataConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + angle + + color + + fill + + fillOpacity + + opacity + + radius + + shape + + size + + stroke + + strokeDash + + strokeOpacity + + strokeWidth + + theta + + x + + xOffset + + y + + yOffset + + """ + + angle: Value[float] | Literal["zero-or-min"] + color: ( + Literal["zero-or-min"] + | Value[ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T] + ) + fill: ( + Literal["zero-or-min"] + | Value[ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None] + ) + fillOpacity: Value[float] | Literal["zero-or-min"] + opacity: Value[float] | Literal["zero-or-min"] + radius: Value[float] | Literal["zero-or-min"] + shape: Value[str] | Literal["zero-or-min"] + size: Value[float] | Literal["zero-or-min"] + stroke: ( + Literal["zero-or-min"] + | Value[ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None] + ) + strokeDash: Literal["zero-or-min"] | Value[Sequence[float]] + strokeOpacity: Value[float] | Literal["zero-or-min"] + strokeWidth: Value[float] | Literal["zero-or-min"] + theta: Value[float] | Literal["zero-or-min"] + x: Literal["zero-or-min"] | Value[float | Literal["width"]] + xOffset: Value[float] | Literal["zero-or-min"] + y: Literal["zero-or-min"] | Value[float | Literal["height"]] + yOffset: Value[float] | Literal["zero-or-min"] + + +class ScaleResolveMapKwds(TypedDict, total=False): + """ + :class:`altair.ScaleResolveMap` ``TypedDict`` wrapper. + + Parameters + ---------- + angle + + color + + fill + + fillOpacity + + opacity + + radius + + shape + + size + + stroke + + strokeDash + + strokeOpacity + + strokeWidth + + theta + + x + + xOffset + + y + + yOffset + + """ + + angle: ResolveMode_T + color: ResolveMode_T + fill: ResolveMode_T + fillOpacity: ResolveMode_T + opacity: ResolveMode_T + radius: ResolveMode_T + shape: ResolveMode_T + size: ResolveMode_T + stroke: ResolveMode_T + strokeDash: ResolveMode_T + strokeOpacity: ResolveMode_T + strokeWidth: ResolveMode_T + theta: ResolveMode_T + x: ResolveMode_T + xOffset: ResolveMode_T + y: ResolveMode_T + yOffset: ResolveMode_T + + +class SelectionConfigKwds(TypedDict, total=False): + """ + :class:`altair.SelectionConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + interval + 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. + point + The default definition for a `point + `__ selection. All + properties and transformations for a point selection definition (except ``type``) + may be specified here. + + For instance, setting ``point`` to ``{"on": "dblclick"}`` populates point selections + on double-click by default. + """ + + interval: IntervalSelectionConfigWithoutTypeKwds + point: PointSelectionConfigWithoutTypeKwds + + +class StepKwds(TypedDict, closed=True, total=False): # type: ignore[call-arg] + """ + :class:`altair.Step` ``TypedDict`` wrapper. + + Parameters + ---------- + step + The size (width/height) per discrete step. + + Notes + ----- + The following keys may be specified as string literals **only**: + + ['for'] + + See `PEP728`_ for type checker compatibility. + + .. _PEP728: + https://peps.python.org/pep-0728/#reference-implementation + """ + + step: float + __extra_items__: StepFor_T + + +class StyleConfigIndexKwds(TypedDict, closed=True, total=False): # type: ignore[call-arg] + """ + :class:`altair.StyleConfigIndex` ``TypedDict`` wrapper. + + Parameters + ---------- + arc + Arc-specific Config + area + Area-Specific Config + bar + Bar-Specific Config + circle + Circle-Specific Config + geoshape + Geoshape-Specific Config + image + Image-specific Config + line + Line-Specific Config + mark + Mark Config + point + Point-Specific Config + rect + Rect-Specific Config + rule + Rule-Specific Config + square + Square-Specific Config + text + Text-Specific Config + tick + Tick-Specific Config + trail + Trail-Specific Config + + Notes + ----- + The following keys may be specified as string literals **only**: + + ['group-subtitle', 'group-title', 'guide-label', 'guide-title'] + + See `PEP728`_ for type checker compatibility. + + .. _PEP728: + https://peps.python.org/pep-0728/#reference-implementation + """ + + arc: RectConfigKwds + area: AreaConfigKwds + bar: BarConfigKwds + circle: MarkConfigKwds + geoshape: MarkConfigKwds + image: RectConfigKwds + line: LineConfigKwds + mark: MarkConfigKwds + point: MarkConfigKwds + rect: RectConfigKwds + rule: MarkConfigKwds + square: MarkConfigKwds + text: MarkConfigKwds + tick: TickConfigKwds + trail: LineConfigKwds + __extra_items__: MarkConfigKwds + + +class TickConfigKwds(TypedDict, total=False): + """ + :class:`altair.TickConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + align + The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). + One of ``"left"``, ``"right"``, ``"center"``. + + **Note:** Expression reference is *not* supported for range marks. + angle + The rotation angle of the text, in degrees. + aria + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG element, removing the mark item from the ARIA accessibility tree. + ariaRole + Sets the type of user interface element of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "role" attribute. Warning: this + property is experimental and may be changed in the future. + ariaRoleDescription + A human-readable, author-localized description for the role of the mark item for + `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "aria-roledescription" attribute. + Warning: this property is experimental and may be changed in the future. + aspect + Whether to keep aspect ratio of image marks. + bandSize + The width of the ticks. + + **Default value:** 3/4 of step (width step for horizontal ticks and height step for + vertical ticks). + baseline + For text marks, the vertical text baseline. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an + expression reference that provides one of the valid values. The ``"line-top"`` and + ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are + calculated relative to the ``lineHeight`` rather than ``fontSize`` alone. + + For range marks, the vertical alignment of the marks. One of ``"top"``, + ``"middle"``, ``"bottom"``. + + **Note:** Expression reference is *not* supported for range marks. + blend + The color blend mode for drawing an item on its current background. Any valid `CSS + mix-blend-mode `__ + value can be used. + + __Default value:__ ``"source-over"`` + color + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + cornerRadius + The radius in pixels of rounded rectangles or arcs' corners. + + **Default value:** ``0`` + cornerRadiusBottomLeft + The radius in pixels of rounded rectangles' bottom left corner. + + **Default value:** ``0`` + cornerRadiusBottomRight + The radius in pixels of rounded rectangles' bottom right corner. + + **Default value:** ``0`` + cornerRadiusTopLeft + The radius in pixels of rounded rectangles' top right corner. + + **Default value:** ``0`` + cornerRadiusTopRight + The radius in pixels of rounded rectangles' top left corner. + + **Default value:** ``0`` + cursor + The mouse cursor used over the mark. Any valid `CSS cursor type + `__ can be used. + description + A text description of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the `"aria-label" attribute + `__. + dir + The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` + (right-to-left). This property determines on which side is truncated in response to + the limit parameter. + + **Default value:** ``"ltr"`` + dx + The horizontal offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + dy + The vertical offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + ellipsis + The ellipsis string for text truncated in response to the limit parameter. + + **Default value:** ``"…"`` + endAngle + The end angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + fill + Default fill color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove fill. + + **Default value:** (None) + fillOpacity + The fill opacity (value between [0,1]). + + **Default value:** ``1`` + filled + Whether the mark's color should be used as fill color instead of stroke color. + + **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well + as ``geoshape`` marks for `graticule + `__ data sources; + otherwise, ``true``. + + **Note:** This property cannot be used in a `style config + `__. + font + The typeface to set the text in (e.g., ``"Helvetica Neue"``). + fontSize + The font size, in pixels. + + **Default value:** ``11`` + fontStyle + The font style (e.g., ``"italic"``). + fontWeight + The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a + number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and + ``"bold"`` = ``700``). + height + Height of the marks. + href + A URL to load upon mouse click. If defined, the mark acts as a hyperlink. + innerRadius + The inner radius in pixels of arc marks. ``innerRadius`` is an alias for + ``radius2``. + + **Default value:** ``0`` + interpolate + The line interpolation method to use for line and area marks. One of the following: + + * ``"linear"``: piecewise linear segments, as in a polyline. + * ``"linear-closed"``: close the linear segments to form a polygon. + * ``"step"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"step-before"``: alternate between vertical and horizontal segments, as in a + step function. + * ``"step-after"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"basis"``: a B-spline, with control point duplication on the ends. + * ``"basis-open"``: an open B-spline; may not intersect the start or end. + * ``"basis-closed"``: a closed B-spline, as in a loop. + * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends. + * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end, + but will intersect other control points. + * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop. + * ``"bundle"``: equivalent to basis, except the tension parameter is used to + straighten the spline. + * ``"monotone"``: cubic interpolation that preserves monotonicity in y. + invalid + Invalid data mode, which defines how the marks and corresponding scales should + represent invalid values (``null`` and ``NaN`` in continuous scales *without* + defined output for invalid values). + + * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and + *scales*. For path marks (for line, area, trail), this option will create paths + that connect valid points, as if the data rows with invalid values do not exist. + + * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at + invalid values. For non-path marks, this is equivalent to ``"filter"``. All + *scale* domains will *exclude* these filtered data points. + + * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid + values. Hide invalid values for non-path marks. All *scale* domains will + *include* these filtered data points (for both path and non-path marks). + + * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each + scale will use the output for invalid values defined in ``config.scale.invalid`` + or, if unspecified, by default invalid values will produce the same visual values + as zero (if the scale includes zero) or the minimum value (if the scale does not + include zero). + + * ``"break-paths-show-path-domains"`` (default) — This is equivalent to + ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and + ``"filter"`` for non-path marks. + + **Note**: If any channel's scale has an output for invalid values defined in + ``config.scale.invalid``, all values for the scales will be considered "valid" since + they can produce a reasonable output for the scales. Thus, fields for such channels + will not be filtered and will not cause path breaks. + limit + The maximum length of the text mark in pixels. The text value will be automatically + truncated if the rendered size exceeds the limit. + + **Default value:** ``0`` -- indicating no limit + lineBreak + A delimiter, such as a newline character, upon which to break text strings into + multiple lines. This property is ignored if the text is array-valued. + lineHeight + The line height in pixels (the spacing between subsequent lines of text) for + multi-line text marks. + opacity + The overall opacity (value between [0,1]). + + **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, + ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. + order + For line and trail marks, this ``order`` property can be set to ``null`` or + ``false`` to make the lines use the original order in the data sources. + orient + The orientation of a non-stacked bar, tick, area, and line charts. The value is + either horizontal (default) or vertical. + + * For bar, rule and tick, this determines whether the size of the bar and tick + should be applied to x or y dimension. + * For area, this property determines the orient property of the Vega output. + * For line and trail marks, this property determines the sort order of the points in + the line if ``config.sortLineBy`` is not specified. For stacked charts, this is + always determined by the orientation of the stack; therefore explicitly specified + value will be ignored. + outerRadius + The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``. + + **Default value:** ``0`` + padAngle + The angular padding applied to sides of the arc, in radians. + radius + For arc mark, the primary (outer) radius in pixels. + + For text marks, polar coordinate radial offset, in pixels, of the text from the + origin determined by the ``x`` and ``y`` properties. + + **Default value:** ``min(plot_width, plot_height)/2`` + radius2 + The secondary (inner) radius in pixels of arc marks. + + **Default value:** ``0`` + shape + Shape of the point marks. Supported values include: + + * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, + ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or + ``"triangle-left"``. + * the line symbol ``"stroke"`` + * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` + * a custom `SVG path string + `__ (For correct + sizing, custom shape paths should be defined within a square bounding box with + coordinates ranging from -1 to 1 along both the x and y dimensions.) + + **Default value:** ``"circle"`` + size + Default size for marks. + + * For ``point``/``circle``/``square``, this represents the pixel area of the marks. + Note that this value sets the area of the symbol; the side lengths will increase + with the square root of this value. + * For ``bar``, this represents the band size of the bar, in pixels. + * For ``text``, this represents the font size, in pixels. + + **Default value:** + + * ``30`` for point, circle, square marks; width/height's ``step`` + * ``2`` for bar marks with discrete dimensions; + * ``5`` for bar marks with continuous dimensions; + * ``11`` for text marks. + smooth + A boolean flag (default true) indicating if the image should be smoothed when + resized. If false, individual pixels should be scaled directly rather than + interpolated with smoothing. For SVG rendering, this option may not work in some + browsers due to lack of standardization. + startAngle + The start angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + stroke + Default stroke color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove stroke. + + **Default value:** (None) + strokeCap + The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or + ``"square"``. + + **Default value:** ``"butt"`` + strokeDash + An array of alternating stroke, space lengths for creating dashed or dotted lines. + strokeDashOffset + The offset (in pixels) into which to begin drawing with the stroke dash array. + strokeJoin + The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. + + **Default value:** ``"miter"`` + strokeMiterLimit + The miter limit at which to bevel a line join. + strokeOffset + The offset in pixels at which to draw the group stroke and fill. If unspecified, the + default behavior is to dynamically offset stroked groups such that 1 pixel stroke + widths align with the pixel grid. + strokeOpacity + The stroke opacity (value between [0,1]). + + **Default value:** ``1`` + strokeWidth + The stroke width, in pixels. + tension + Depending on the interpolation type, sets the tension parameter (for line and area + marks). + text + Placeholder text if the ``text`` channel is not specified + theta + * For arc marks, the arc length in radians if theta2 is not specified, otherwise the + start arc angle. (A value of 0 indicates up or “north”, increasing values proceed + clockwise.) + + * For text marks, polar coordinate angle in radians. + theta2 + The end angle of arc marks in radians. A value of 0 indicates up or “north”, + increasing values proceed clockwise. + thickness + Thickness of the tick mark. + + **Default value:** ``1`` + timeUnitBandPosition + Default relative band position for a time unit. If set to ``0``, the marks will be + positioned at the beginning of the time unit band step. If set to ``0.5``, the marks + will be positioned in the middle of the time unit band step. + timeUnitBandSize + Default relative band size for a time unit. If set to ``1``, the bandwidth of the + marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the + marks will be half of the time unit band step. + tooltip + The tooltip text string to show upon mouse hover or an object defining which fields + should the tooltip be derived from. + + * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from + ``encoding`` will be used. + * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the + highlighted data point will be used. + * If set to ``null`` or ``false``, then no tooltip will be used. + + See the `tooltip `__ + documentation for a detailed discussion about tooltip in Vega-Lite. + + **Default value:** ``null`` + url + The URL of the image file for image marks. + width + Width of the marks. + x + X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without + specified ``x2`` or ``width``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2 + X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + y + Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without + specified ``y2`` or ``height``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2 + Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + """ + + align: Align_T + angle: float + aria: bool + ariaRole: str + ariaRoleDescription: str + aspect: bool + bandSize: float + baseline: TextBaseline_T + blend: Blend_T + color: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T + cornerRadius: float + cornerRadiusBottomLeft: float + cornerRadiusBottomRight: float + cornerRadiusTopLeft: float + cornerRadiusTopRight: float + cursor: Cursor_T + description: str + dir: TextDirection_T + dx: float + dy: float + ellipsis: str + endAngle: float + fill: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None + fillOpacity: float + filled: bool + font: str + fontSize: float + fontStyle: str + fontWeight: FontWeight_T + height: float + href: str + innerRadius: float + interpolate: Interpolate_T + invalid: MarkInvalidDataMode_T | None + limit: float + lineBreak: str + lineHeight: float + opacity: float + order: bool | None + orient: Orientation_T + outerRadius: float + padAngle: float + radius: float + radius2: float + shape: str + size: float + smooth: bool + startAngle: float + stroke: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None + strokeCap: StrokeCap_T + strokeDash: Sequence[float] + strokeDashOffset: float + strokeJoin: StrokeJoin_T + strokeMiterLimit: float + strokeOffset: float + strokeOpacity: float + strokeWidth: float + tension: float + text: str | Sequence[str] + theta: float + theta2: float + thickness: float + timeUnitBandPosition: float + timeUnitBandSize: float + tooltip: str | bool | float | TooltipContentKwds | None + url: str + width: float + x: float | Literal["width"] + x2: float | Literal["width"] + y: float | Literal["height"] + y2: float | Literal["height"] + + +class TimeIntervalStepKwds(TypedDict, total=False): + """ + :class:`altair.TimeIntervalStep` ``TypedDict`` wrapper. + + Parameters + ---------- + interval + + step + + """ + + interval: TimeInterval_T + step: float + + +class TimeLocaleKwds(TypedDict, total=False): + """ + :class:`altair.TimeLocale` ``TypedDict`` wrapper. + + Parameters + ---------- + date + The date (%x) format specifier (e.g., "%m/%d/%Y"). + dateTime + The date and time (%c) format specifier (e.g., "%a %b %e %X %Y"). + days + The full names of the weekdays, starting with Sunday. + months + The full names of the months (starting with January). + periods + The A.M. and P.M. equivalents (e.g., ["AM", "PM"]). + shortDays + The abbreviated names of the weekdays, starting with Sunday. + shortMonths + The abbreviated names of the months (starting with January). + time + The time (%X) format specifier (e.g., "%H:%M:%S"). + """ + + date: str + dateTime: str + days: Sequence[str] + months: Sequence[str] + periods: Sequence[str] + shortDays: Sequence[str] + shortMonths: Sequence[str] + time: str + + +class TitleConfigKwds(TypedDict, total=False): + """ + :class:`altair.TitleConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + align + Horizontal text alignment for title text. One of ``"left"``, ``"center"``, or + ``"right"``. + anchor + The anchor position for placing the title and subtitle text. 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. + angle + Angle in degrees of title and subtitle text. + aria + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG group, removing the title from the ARIA accessibility tree. + + **Default value:** ``true`` + baseline + Vertical text baseline for title and subtitle text. One of ``"alphabetic"`` + (default), ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or + ``"line-bottom"``. The ``"line-top"`` and ``"line-bottom"`` values operate similarly + to ``"top"`` and ``"bottom"``, but are calculated relative to the *lineHeight* + rather than *fontSize* alone. + color + Text color for title text. + dx + Delta offset for title and subtitle text x-coordinate. + dy + Delta offset for title and subtitle text y-coordinate. + font + Font name for title text. + fontSize + Font size in pixels for title text. + fontStyle + Font style for title text. + fontWeight + Font weight for title text. This can be either a string (e.g ``"bold"``, + ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where + ``"normal"`` = ``400`` and ``"bold"`` = ``700``). + frame + The reference frame for the anchor position, one of ``"bounds"`` (to anchor relative + to the full bounding box) or ``"group"`` (to anchor relative to the group width or + height). + limit + The maximum allowed length in pixels of title and subtitle text. + lineHeight + Line height in pixels for multi-line title text or title text with ``"line-top"`` or + ``"line-bottom"`` baseline. + offset + The orthogonal offset in pixels by which to displace the title group from its + position along the edge of the chart. + orient + Default title orientation (``"top"``, ``"bottom"``, ``"left"``, or ``"right"``) + subtitleColor + Text color for subtitle text. + subtitleFont + Font name for subtitle text. + subtitleFontSize + Font size in pixels for subtitle text. + subtitleFontStyle + Font style for subtitle text. + subtitleFontWeight + Font weight for subtitle text. This can be either a string (e.g ``"bold"``, + ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where + ``"normal"`` = ``400`` and ``"bold"`` = ``700``). + subtitleLineHeight + Line height in pixels for multi-line subtitle text. + subtitlePadding + The padding in pixels between title and subtitle text. + zindex + The integer z-index indicating the layering of the title group relative to other + axis, mark, and legend groups. + + **Default value:** ``0``. + """ + + align: Align_T + anchor: TitleAnchor_T + angle: float + aria: bool + baseline: TextBaseline_T + color: ColorHex | ColorName_T | None + dx: float + dy: float + font: str + fontSize: float + fontStyle: str + fontWeight: FontWeight_T + frame: str | TitleFrame_T + limit: float + lineHeight: float + offset: float + orient: TitleOrient_T + subtitleColor: ColorHex | ColorName_T | None + subtitleFont: str + subtitleFontSize: float + subtitleFontStyle: str + subtitleFontWeight: FontWeight_T + subtitleLineHeight: float + subtitlePadding: float + zindex: float + + +class TitleParamsKwds(TypedDict, total=False): + """ + :class:`altair.TitleParams` ``TypedDict`` wrapper. + + Parameters + ---------- + text + The title text. + align + Horizontal text alignment for title text. One of ``"left"``, ``"center"``, or + ``"right"``. + anchor + 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"``. + angle + Angle in degrees of title and subtitle text. + aria + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG group, removing the title from the ARIA accessibility tree. + + **Default value:** ``true`` + baseline + Vertical text baseline for title and subtitle text. One of ``"alphabetic"`` + (default), ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or + ``"line-bottom"``. The ``"line-top"`` and ``"line-bottom"`` values operate similarly + to ``"top"`` and ``"bottom"``, but are calculated relative to the *lineHeight* + rather than *fontSize* alone. + color + Text color for title text. + dx + Delta offset for title and subtitle text x-coordinate. + dy + Delta offset for title and subtitle text y-coordinate. + font + Font name for title text. + fontSize + Font size in pixels for title text. + fontStyle + Font style for title text. + fontWeight + Font weight for title text. This can be either a string (e.g ``"bold"``, + ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where + ``"normal"`` = ``400`` and ``"bold"`` = ``700``). + frame + The reference frame for the anchor position, one of ``"bounds"`` (to anchor relative + to the full bounding box) or ``"group"`` (to anchor relative to the group width or + height). + limit + The maximum allowed length in pixels of title and subtitle text. + lineHeight + Line height in pixels for multi-line title text or title text with ``"line-top"`` or + ``"line-bottom"`` baseline. + offset + The orthogonal offset in pixels by which to displace the title group from its + position along the edge of the chart. + orient + Default title orientation (``"top"``, ``"bottom"``, ``"left"``, or ``"right"``) + style + A `mark style property `__ + to apply to the title text mark. + + **Default value:** ``"group-title"``. + subtitle + The subtitle Text. + subtitleColor + Text color for subtitle text. + subtitleFont + Font name for subtitle text. + subtitleFontSize + Font size in pixels for subtitle text. + subtitleFontStyle + Font style for subtitle text. + subtitleFontWeight + Font weight for subtitle text. This can be either a string (e.g ``"bold"``, + ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where + ``"normal"`` = ``400`` and ``"bold"`` = ``700``). + subtitleLineHeight + Line height in pixels for multi-line subtitle text. + subtitlePadding + The padding in pixels between title and subtitle text. + zindex + The integer z-index indicating the layering of the title group relative to other + axis, mark and legend groups. + + **Default value:** ``0``. + """ + + text: str | Sequence[str] + align: Align_T + anchor: TitleAnchor_T + angle: float + aria: bool + baseline: TextBaseline_T + color: ColorHex | ColorName_T | None + dx: float + dy: float + font: str + fontSize: float + fontStyle: str + fontWeight: FontWeight_T + frame: str | TitleFrame_T + limit: float + lineHeight: float + offset: float + orient: TitleOrient_T + style: str | Sequence[str] + subtitle: str | Sequence[str] + subtitleColor: ColorHex | ColorName_T | None + subtitleFont: str + subtitleFontSize: float + subtitleFontStyle: str + subtitleFontWeight: FontWeight_T + subtitleLineHeight: float + subtitlePadding: float + zindex: float + + +class TooltipContentKwds(TypedDict, total=False): + """ + :class:`altair.TooltipContent` ``TypedDict`` wrapper. + + Parameters + ---------- + content + + """ + + content: Literal["encoding", "data"] + + +class TopLevelSelectionParameterKwds(TypedDict, total=False): + """ + :class:`altair.TopLevelSelectionParameter` ``TypedDict`` wrapper. + + Parameters + ---------- + name + Required. A unique name for the selection parameter. Selection names should be valid + JavaScript identifiers: they should contain only alphanumeric characters (or "$", or + "_") and may not start with a digit. Reserved keywords that may not be used as + parameter names are "datum", "event", "item", and "parent". + select + Determines the default event processing and data query for the selection. Vega-Lite + currently supports two selection types: + + * ``"point"`` -- to select multiple discrete data values; the first value is + selected on ``click`` and additional values toggled on shift-click. + * ``"interval"`` -- to select a continuous range of data values on ``drag``. + bind + When set, a selection is populated by input elements (also known as dynamic query + widgets) or by interacting with the corresponding legend. Direct manipulation + interaction is disabled by default; to re-enable it, set the selection's `on + `__ + property. + + Legend bindings are restricted to selections that only specify a single field or + encoding. + + Query widget binding takes the form of Vega's `input element binding definition + `__ or can be a mapping between + projected field/encodings and binding definitions. + + **See also:** `bind `__ + documentation. + value + Initialize the selection with a mapping between `projected channels or field names + `__ and initial + values. + + **See also:** `init `__ + documentation. + views + By default, top-level selections are applied to every view in the visualization. If + this property is specified, selections will only be applied to views with the given + names. + """ + + name: str + select: PointSelectionConfigKwds | IntervalSelectionConfigKwds | SelectionType_T + bind: ( + BindInputKwds + | BindRangeKwds + | BindDirectKwds + | BindCheckboxKwds + | BindRadioSelectKwds + | LegendStreamBindingKwds + | Literal["legend", "scales"] + ) + value: DateTimeKwds | Sequence[Map] | PrimitiveValue_T + views: Sequence[str] + + +class VariableParameterKwds(TypedDict, total=False): + """ + :class:`altair.VariableParameter` ``TypedDict`` wrapper. + + Parameters + ---------- + name + A unique name for the variable parameter. Parameter names should be valid JavaScript + identifiers: they should contain only alphanumeric characters (or "$", or "_") and + may not start with a digit. Reserved keywords that may not be used as parameter + names are "datum", "event", "item", and "parent". + bind + Binds the parameter to an external input element such as a slider, selection list or + radio button group. + expr + An expression for the value of the parameter. This expression may include other + parameters, in which case the parameter will automatically update in response to + upstream parameter changes. + react + A boolean flag (default ``true``) indicating if the update expression should be + automatically re-evaluated when any upstream signal dependencies update. If + ``false``, the update expression will not register any dependencies on other + signals, even for initialization. + + **Default value:** ``true`` + value + The `initial value `__ of the + parameter. + + **Default value:** ``undefined`` + """ + + name: str + bind: ( + BindInputKwds + | BindRangeKwds + | BindDirectKwds + | BindCheckboxKwds + | BindRadioSelectKwds + ) + expr: str + react: bool + value: Any + + +class ViewBackgroundKwds(TypedDict, total=False): + """ + :class:`altair.ViewBackground` ``TypedDict`` wrapper. + + Parameters + ---------- + cornerRadius + The radius in pixels of rounded rectangles or arcs' corners. + + **Default value:** ``0`` + cursor + The mouse cursor used over the view. Any valid `CSS cursor type + `__ can be used. + fill + The fill color. + + **Default value:** ``undefined`` + fillOpacity + The fill opacity (value between [0,1]). + + **Default value:** ``1`` + opacity + The overall opacity (value between [0,1]). + + **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, + ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. + stroke + The stroke color. + + **Default value:** ``"#ddd"`` + strokeCap + The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or + ``"square"``. + + **Default value:** ``"butt"`` + strokeDash + An array of alternating stroke, space lengths for creating dashed or dotted lines. + strokeDashOffset + The offset (in pixels) into which to begin drawing with the stroke dash array. + strokeJoin + The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. + + **Default value:** ``"miter"`` + strokeMiterLimit + The miter limit at which to bevel a line join. + strokeOpacity + The stroke opacity (value between [0,1]). + + **Default value:** ``1`` + strokeWidth + The stroke width, in pixels. + style + A string or array of strings indicating the name of custom styles to apply to the + view background. 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. + + **Default value:** ``"cell"`` **Note:** Any specified view background properties + will augment the default style. + """ + + cornerRadius: float + cursor: Cursor_T + fill: ColorHex | ColorName_T | None + fillOpacity: float + opacity: float + stroke: ColorHex | ColorName_T | None + strokeCap: StrokeCap_T + strokeDash: Sequence[float] + strokeDashOffset: float + strokeJoin: StrokeJoin_T + strokeMiterLimit: float + strokeOpacity: float + strokeWidth: float + style: str | Sequence[str] + + +class ViewConfigKwds(TypedDict, total=False): + """ + :class:`altair.ViewConfig` ``TypedDict`` wrapper. + + Parameters + ---------- + clip + Whether the view should be clipped. + continuousHeight + The default height when the plot has a continuous y-field for x or latitude, or has + arc marks. + + **Default value:** ``200`` + continuousWidth + The default width when the plot has a continuous field for x or longitude, or has + arc marks. + + **Default value:** ``200`` + cornerRadius + The radius in pixels of rounded rectangles or arcs' corners. + + **Default value:** ``0`` + cursor + The mouse cursor used over the view. Any valid `CSS cursor type + `__ can be used. + discreteHeight + The default height when the plot has non arc marks and either a discrete y-field or + no y-field. The height can be either a number indicating a fixed height or an object + in the form of ``{step: number}`` defining the height per discrete step. + + **Default value:** a step size based on ``config.view.step``. + discreteWidth + The default width when the plot has non-arc marks and either a discrete x-field or + no x-field. The width can be either a number indicating a fixed width or an object + in the form of ``{step: number}`` defining the width per discrete step. + + **Default value:** a step size based on ``config.view.step``. + fill + The fill color. + + **Default value:** ``undefined`` + fillOpacity + The fill opacity (value between [0,1]). + + **Default value:** ``1`` + opacity + The overall opacity (value between [0,1]). + + **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, + ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. + step + Default step size for x-/y- discrete fields. + stroke + The stroke color. + + **Default value:** ``"#ddd"`` + strokeCap + The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or + ``"square"``. + + **Default value:** ``"butt"`` + strokeDash + An array of alternating stroke, space lengths for creating dashed or dotted lines. + strokeDashOffset + The offset (in pixels) into which to begin drawing with the stroke dash array. + strokeJoin + The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. + + **Default value:** ``"miter"`` + strokeMiterLimit + The miter limit at which to bevel a line join. + strokeOpacity + The stroke opacity (value between [0,1]). + + **Default value:** ``1`` + strokeWidth + The stroke width, in pixels. + """ + + clip: bool + continuousHeight: float + continuousWidth: float + cornerRadius: float + cursor: Cursor_T + discreteHeight: float + discreteWidth: float + fill: ColorHex | ColorName_T | None + fillOpacity: float + opacity: float + step: float + stroke: ColorHex | ColorName_T | None + strokeCap: StrokeCap_T + strokeDash: Sequence[float] + strokeDashOffset: float + strokeJoin: StrokeJoin_T + strokeMiterLimit: float + strokeOpacity: float + strokeWidth: float + + +class ThemeConfig(TypedDict, total=False): + """ + Top-Level Configuration ``TypedDict`` for creating a consistent theme. + + Parameters + ---------- + align + The alignment to apply to grid rows and columns. The supported string values are + ``"all"``, ``"each"``, and ``"none"``. + + * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply + placed one after the other. + * For ``"each"``, subviews will be aligned into a clean grid structure, but each row + or column may be of variable size. + * For ``"all"``, subviews will be aligned and each row or column will be sized + identically based on the maximum observed size. String values for this property + will be applied to both grid rows and columns. + + Alternatively, an object value of the form ``{"row": string, "column": string}`` can + be used to supply different alignments for rows and columns. + + **Default value:** ``"all"``. + autosize + How the visualization size should be determined. If a string, should be one of + ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify + parameters for content sizing and automatic resizing. + + **Default value**: ``pad`` + background + CSS color property to use as the background of the entire view. + + **Default value:** ``"white"`` + bounds + The bounds calculation method to use for determining the extent of a sub-plot. One + of ``full`` (the default) or ``flush``. + + * If set to ``full``, the entire calculated bounds (including axes, title, and + legend) will be used. + * If set to ``flush``, only the specified width and height values for the sub-view + will be used. The ``flush`` setting can be useful when attempting to place + sub-plots without axes or legends into a uniform grid structure. + + **Default value:** ``"full"`` + center + Boolean flag indicating if subviews should be centered relative to their respective + rows or columns. + + An object value of the form ``{"row": boolean, "column": boolean}`` can be used to + supply different centering values for rows and columns. + + **Default value:** ``false`` + config + Vega-Lite configuration object. This property can only be defined at the top-level + of a specification. + description + Description of this mark for commenting purpose. + height + The height of a visualization. + + * For a plot with a continuous y-field, height should be a number. + * For a plot with either a discrete y-field or no y-field, height can be either a + number indicating a fixed height or an object in the form of ``{step: number}`` + defining the height per discrete step. (No y-field is equivalent to having one + discrete step.) + * To enable responsive sizing on height, it should be set to ``"container"``. + + **Default value:** Based on ``config.view.continuousHeight`` for a plot with a + continuous y-field and ``config.view.discreteHeight`` otherwise. + + **Note:** For plots with `row and column channels + `__, this represents the + height of a single view and the ``"container"`` option cannot be used. + + **See also:** `height `__ + documentation. + name + Name of the visualization for later reference. + padding + The default visualization padding, in pixels, from the edge of the visualization + canvas to the data rectangle. If a number, specifies padding for all sides. If an + object, the value should have the format ``{"left": 5, "top": 5, "right": 5, + "bottom": 5}`` to specify padding for each side of the visualization. + + **Default value**: ``5`` + params + An array of parameters that may either be simple variables, or more complex + selections that map user input to data queries. + projection + An object defining properties of geographic projection, which will be applied to + ``shape`` path for ``"geoshape"`` marks and to ``latitude`` and ``"longitude"`` + channels for other marks. + resolve + Scale, axis, and legend resolutions for view composition specifications. + spacing + The spacing in pixels between sub-views of the composition operator. An object of + the form ``{"row": number, "column": number}`` can be used to set different spacing + values for rows and columns. + + **Default value**: Depends on ``"spacing"`` property of `the view composition + configuration `__ + (``20`` by default) + title + Title for the plot. + usermeta + Optional metadata that will be passed to Vega. This object is completely ignored by + Vega and Vega-Lite and can be used for custom metadata. + view + An object defining the view background's fill and stroke. + + **Default value:** none (transparent) + width + The width of a visualization. + + * For a plot with a continuous x-field, width should be a number. + * For a plot with either a discrete x-field or no x-field, width can be either a + number indicating a fixed width or an object in the form of ``{step: number}`` + defining the width per discrete step. (No x-field is equivalent to having one + discrete step.) + * To enable responsive sizing on width, it should be set to ``"container"``. + + **Default value:** Based on ``config.view.continuousWidth`` for a plot with a + continuous x-field and ``config.view.discreteWidth`` otherwise. + + **Note:** For plots with `row and column channels + `__, this represents the + width of a single view and the ``"container"`` option cannot be used. + + **See also:** `width `__ + documentation. + """ + + align: RowColKwds[LayoutAlign_T] | LayoutAlign_T + autosize: AutoSizeParamsKwds | AutosizeType_T + background: ColorHex | ColorName_T + bounds: Literal["full", "flush"] + center: bool | RowColKwds[bool] + config: ConfigKwds + description: str + height: float | StepKwds | Literal["container"] + name: str + padding: float | PaddingKwds + params: Sequence[VariableParameterKwds | TopLevelSelectionParameterKwds] + projection: ProjectionKwds + resolve: ResolveKwds + spacing: float | RowColKwds[float] + title: str | Sequence[str] | TitleParamsKwds + usermeta: Map + view: ViewBackgroundKwds + width: float | StepKwds | Literal["container"] diff --git a/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/_typing.py b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/_typing.py new file mode 100644 index 0000000000000000000000000000000000000000..fd6383ad7baca41d5cbfea79fd44b85a59f0ee66 --- /dev/null +++ b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/_typing.py @@ -0,0 +1,1153 @@ +# The contents of this file are automatically written by +# tools/generate_schema_wrapper.py. Do not modify directly. + +from __future__ import annotations + +import re +import sys +from collections.abc import Mapping, Sequence +from datetime import date, datetime +from typing import Annotated, Any, Generic, Literal, TypeVar, Union, get_args + +if sys.version_info >= (3, 14): # https://peps.python.org/pep-0728/ + from typing import TypedDict +else: + from typing_extensions import TypedDict + +if sys.version_info >= (3, 13): + from typing import TypeIs +else: + from typing_extensions import TypeIs + +if sys.version_info >= (3, 12): + from typing import TypeAliasType +else: + from typing_extensions import TypeAliasType + +if sys.version_info >= (3, 11): + from typing import LiteralString +else: + from typing_extensions import LiteralString + +if sys.version_info >= (3, 10): + from typing import TypeAlias +else: + from typing_extensions import TypeAlias + + +__all__ = [ + "AggregateOp_T", + "Align_T", + "AllSortString_T", + "AutosizeType_T", + "AxisOrient_T", + "BinnedTimeUnit_T", + "Blend_T", + "BoxPlot_T", + "ColorHex", + "ColorName_T", + "ColorScheme_T", + "CompositeMark_T", + "Cursor_T", + "ErrorBand_T", + "ErrorBarExtent_T", + "ErrorBar_T", + "FontWeight_T", + "ImputeMethod_T", + "Interpolate_T", + "LayoutAlign_T", + "LegendOrient_T", + "Map", + "MarkInvalidDataMode_T", + "MarkType_T", + "Mark_T", + "MultiTimeUnit_T", + "NonArgAggregateOp_T", + "OneOrSeq", + "Orient_T", + "Orientation_T", + "PaddingKwds", + "PrimitiveValue_T", + "ProjectionType_T", + "RangeEnum_T", + "ResolveMode_T", + "RowColKwds", + "ScaleInterpolateEnum_T", + "ScaleType_T", + "SelectionResolution_T", + "SelectionType_T", + "SingleDefUnitChannel_T", + "SingleTimeUnit_T", + "SortByChannel_T", + "SortOrder_T", + "StackOffset_T", + "StandardType_T", + "StepFor_T", + "StrokeCap_T", + "StrokeJoin_T", + "Temporal", + "TextBaseline_T", + "TextDirection_T", + "TimeInterval_T", + "TitleAnchor_T", + "TitleFrame_T", + "TitleOrient_T", + "TypeForShape_T", + "Type_T", + "Value", + "VegaThemes", + "WindowOnlyOp_T", + "is_color_hex", +] + + +T = TypeVar("T") +OneOrSeq = TypeAliasType("OneOrSeq", Union[T, Sequence[T]], type_params=(T,)) +""" +One of ``T`` specified type(s), or a `Sequence` of such. + +Examples +-------- +The parameters ``short``, ``long`` accept the same range of types:: + + # ruff: noqa: UP006, UP007 + + def func( + short: OneOrSeq[str | bool | float], + long: Union[str, bool, float, Sequence[Union[str, bool, float]], + ): ... +""" + + +class Value(TypedDict, Generic[T]): + """ + A `Generic`_ single item ``dict``. + + Parameters + ---------- + value: T + Wrapped value. + + .. _Generic: + https://typing.readthedocs.io/en/latest/spec/generics.html#generics + """ + + value: T + + +ColorHex = Annotated[ + LiteralString, + re.compile(r"#[0-9a-f]{2}[0-9a-f]{2}[0-9a-f]{2}([0-9a-f]{2})?", re.IGNORECASE), +] +""" +A `hexadecimal`_ color code. + +Corresponds to the ``json-schema`` string format: + + {"format": "color-hex", "type": "string"} + +Examples +-------- +: + + "#f0f8ff" + "#7fffd4" + "#000000" + "#0000FF" + "#0000ff80" + +.. _hexadecimal: + https://www.w3schools.com/html/html_colors_hex.asp +""" + + +def is_color_hex(obj: Any) -> TypeIs[ColorHex]: + """Return ``True`` if the object is a hexadecimal color code.""" + # NOTE: Extracts compiled pattern from metadata, + # to avoid defining in multiple places. + it = iter(get_args(ColorHex)) + next(it) + pattern: re.Pattern[str] = next(it) + return bool(pattern.fullmatch(obj)) + + +class RowColKwds(TypedDict, Generic[T], total=False): + """ + A `Generic`_ two-item ``dict``. + + Parameters + ---------- + column: T + row: T + + .. _Generic: + https://typing.readthedocs.io/en/latest/spec/generics.html#generics + """ + + column: T + row: T + + +class PaddingKwds(TypedDict, total=False): + bottom: float + left: float + right: float + top: float + + +Temporal: TypeAlias = Union[date, datetime] + +VegaThemes: TypeAlias = Literal[ + "carbong10", + "carbong100", + "carbong90", + "carbonwhite", + "dark", + "excel", + "fivethirtyeight", + "ggplot2", + "googlecharts", + "latimes", + "powerbi", + "quartz", + "urbaninstitute", + "vox", +] +Map: TypeAlias = Mapping[str, Any] +PrimitiveValue_T: TypeAlias = Union[str, bool, float, None] +AggregateOp_T: TypeAlias = Literal[ + "argmax", + "argmin", + "average", + "count", + "distinct", + "max", + "mean", + "median", + "min", + "missing", + "product", + "q1", + "q3", + "ci0", + "ci1", + "stderr", + "stdev", + "stdevp", + "sum", + "valid", + "values", + "variance", + "variancep", + "exponential", + "exponentialb", +] +Align_T: TypeAlias = Literal["left", "center", "right"] +AllSortString_T: TypeAlias = Literal[ + "ascending", + "descending", + "x", + "y", + "color", + "fill", + "stroke", + "strokeWidth", + "size", + "shape", + "fillOpacity", + "strokeOpacity", + "opacity", + "text", + "-x", + "-y", + "-color", + "-fill", + "-stroke", + "-strokeWidth", + "-size", + "-shape", + "-fillOpacity", + "-strokeOpacity", + "-opacity", + "-text", +] +AutosizeType_T: TypeAlias = Literal["pad", "none", "fit", "fit-x", "fit-y"] +AxisOrient_T: TypeAlias = Literal["top", "bottom", "left", "right"] +BinnedTimeUnit_T: TypeAlias = Literal[ + "binnedyear", + "binnedyearquarter", + "binnedyearquartermonth", + "binnedyearmonth", + "binnedyearmonthdate", + "binnedyearmonthdatehours", + "binnedyearmonthdatehoursminutes", + "binnedyearmonthdatehoursminutesseconds", + "binnedyearweek", + "binnedyearweekday", + "binnedyearweekdayhours", + "binnedyearweekdayhoursminutes", + "binnedyearweekdayhoursminutesseconds", + "binnedyeardayofyear", + "binnedutcyear", + "binnedutcyearquarter", + "binnedutcyearquartermonth", + "binnedutcyearmonth", + "binnedutcyearmonthdate", + "binnedutcyearmonthdatehours", + "binnedutcyearmonthdatehoursminutes", + "binnedutcyearmonthdatehoursminutesseconds", + "binnedutcyearweek", + "binnedutcyearweekday", + "binnedutcyearweekdayhours", + "binnedutcyearweekdayhoursminutes", + "binnedutcyearweekdayhoursminutesseconds", + "binnedutcyeardayofyear", +] +Blend_T: TypeAlias = Literal[ + None, + "multiply", + "screen", + "overlay", + "darken", + "lighten", + "color-dodge", + "color-burn", + "hard-light", + "soft-light", + "difference", + "exclusion", + "hue", + "saturation", + "color", + "luminosity", +] +BoxPlot_T: TypeAlias = Literal["boxplot"] +ColorName_T: TypeAlias = Literal[ + "black", + "silver", + "gray", + "white", + "maroon", + "red", + "purple", + "fuchsia", + "green", + "lime", + "olive", + "yellow", + "navy", + "blue", + "teal", + "aqua", + "orange", + "aliceblue", + "antiquewhite", + "aquamarine", + "azure", + "beige", + "bisque", + "blanchedalmond", + "blueviolet", + "brown", + "burlywood", + "cadetblue", + "chartreuse", + "chocolate", + "coral", + "cornflowerblue", + "cornsilk", + "crimson", + "cyan", + "darkblue", + "darkcyan", + "darkgoldenrod", + "darkgray", + "darkgreen", + "darkgrey", + "darkkhaki", + "darkmagenta", + "darkolivegreen", + "darkorange", + "darkorchid", + "darkred", + "darksalmon", + "darkseagreen", + "darkslateblue", + "darkslategray", + "darkslategrey", + "darkturquoise", + "darkviolet", + "deeppink", + "deepskyblue", + "dimgray", + "dimgrey", + "dodgerblue", + "firebrick", + "floralwhite", + "forestgreen", + "gainsboro", + "ghostwhite", + "gold", + "goldenrod", + "greenyellow", + "grey", + "honeydew", + "hotpink", + "indianred", + "indigo", + "ivory", + "khaki", + "lavender", + "lavenderblush", + "lawngreen", + "lemonchiffon", + "lightblue", + "lightcoral", + "lightcyan", + "lightgoldenrodyellow", + "lightgray", + "lightgreen", + "lightgrey", + "lightpink", + "lightsalmon", + "lightseagreen", + "lightskyblue", + "lightslategray", + "lightslategrey", + "lightsteelblue", + "lightyellow", + "limegreen", + "linen", + "magenta", + "mediumaquamarine", + "mediumblue", + "mediumorchid", + "mediumpurple", + "mediumseagreen", + "mediumslateblue", + "mediumspringgreen", + "mediumturquoise", + "mediumvioletred", + "midnightblue", + "mintcream", + "mistyrose", + "moccasin", + "navajowhite", + "oldlace", + "olivedrab", + "orangered", + "orchid", + "palegoldenrod", + "palegreen", + "paleturquoise", + "palevioletred", + "papayawhip", + "peachpuff", + "peru", + "pink", + "plum", + "powderblue", + "rosybrown", + "royalblue", + "saddlebrown", + "salmon", + "sandybrown", + "seagreen", + "seashell", + "sienna", + "skyblue", + "slateblue", + "slategray", + "slategrey", + "snow", + "springgreen", + "steelblue", + "tan", + "thistle", + "tomato", + "turquoise", + "violet", + "wheat", + "whitesmoke", + "yellowgreen", + "rebeccapurple", +] +ColorScheme_T: TypeAlias = Literal[ + "accent", + "category10", + "category20", + "category20b", + "category20c", + "dark2", + "paired", + "pastel1", + "pastel2", + "set1", + "set2", + "set3", + "tableau10", + "tableau20", + "blues", + "tealblues", + "teals", + "greens", + "browns", + "greys", + "purples", + "warmgreys", + "reds", + "oranges", + "turbo", + "viridis", + "inferno", + "magma", + "plasma", + "cividis", + "bluegreen", + "bluegreen-3", + "bluegreen-4", + "bluegreen-5", + "bluegreen-6", + "bluegreen-7", + "bluegreen-8", + "bluegreen-9", + "bluepurple", + "bluepurple-3", + "bluepurple-4", + "bluepurple-5", + "bluepurple-6", + "bluepurple-7", + "bluepurple-8", + "bluepurple-9", + "goldgreen", + "goldgreen-3", + "goldgreen-4", + "goldgreen-5", + "goldgreen-6", + "goldgreen-7", + "goldgreen-8", + "goldgreen-9", + "goldorange", + "goldorange-3", + "goldorange-4", + "goldorange-5", + "goldorange-6", + "goldorange-7", + "goldorange-8", + "goldorange-9", + "goldred", + "goldred-3", + "goldred-4", + "goldred-5", + "goldred-6", + "goldred-7", + "goldred-8", + "goldred-9", + "greenblue", + "greenblue-3", + "greenblue-4", + "greenblue-5", + "greenblue-6", + "greenblue-7", + "greenblue-8", + "greenblue-9", + "orangered", + "orangered-3", + "orangered-4", + "orangered-5", + "orangered-6", + "orangered-7", + "orangered-8", + "orangered-9", + "purplebluegreen", + "purplebluegreen-3", + "purplebluegreen-4", + "purplebluegreen-5", + "purplebluegreen-6", + "purplebluegreen-7", + "purplebluegreen-8", + "purplebluegreen-9", + "purpleblue", + "purpleblue-3", + "purpleblue-4", + "purpleblue-5", + "purpleblue-6", + "purpleblue-7", + "purpleblue-8", + "purpleblue-9", + "purplered", + "purplered-3", + "purplered-4", + "purplered-5", + "purplered-6", + "purplered-7", + "purplered-8", + "purplered-9", + "redpurple", + "redpurple-3", + "redpurple-4", + "redpurple-5", + "redpurple-6", + "redpurple-7", + "redpurple-8", + "redpurple-9", + "yellowgreenblue", + "yellowgreenblue-3", + "yellowgreenblue-4", + "yellowgreenblue-5", + "yellowgreenblue-6", + "yellowgreenblue-7", + "yellowgreenblue-8", + "yellowgreenblue-9", + "yellowgreen", + "yellowgreen-3", + "yellowgreen-4", + "yellowgreen-5", + "yellowgreen-6", + "yellowgreen-7", + "yellowgreen-8", + "yellowgreen-9", + "yelloworangebrown", + "yelloworangebrown-3", + "yelloworangebrown-4", + "yelloworangebrown-5", + "yelloworangebrown-6", + "yelloworangebrown-7", + "yelloworangebrown-8", + "yelloworangebrown-9", + "yelloworangered", + "yelloworangered-3", + "yelloworangered-4", + "yelloworangered-5", + "yelloworangered-6", + "yelloworangered-7", + "yelloworangered-8", + "yelloworangered-9", + "darkblue", + "darkblue-3", + "darkblue-4", + "darkblue-5", + "darkblue-6", + "darkblue-7", + "darkblue-8", + "darkblue-9", + "darkgold", + "darkgold-3", + "darkgold-4", + "darkgold-5", + "darkgold-6", + "darkgold-7", + "darkgold-8", + "darkgold-9", + "darkgreen", + "darkgreen-3", + "darkgreen-4", + "darkgreen-5", + "darkgreen-6", + "darkgreen-7", + "darkgreen-8", + "darkgreen-9", + "darkmulti", + "darkmulti-3", + "darkmulti-4", + "darkmulti-5", + "darkmulti-6", + "darkmulti-7", + "darkmulti-8", + "darkmulti-9", + "darkred", + "darkred-3", + "darkred-4", + "darkred-5", + "darkred-6", + "darkred-7", + "darkred-8", + "darkred-9", + "lightgreyred", + "lightgreyred-3", + "lightgreyred-4", + "lightgreyred-5", + "lightgreyred-6", + "lightgreyred-7", + "lightgreyred-8", + "lightgreyred-9", + "lightgreyteal", + "lightgreyteal-3", + "lightgreyteal-4", + "lightgreyteal-5", + "lightgreyteal-6", + "lightgreyteal-7", + "lightgreyteal-8", + "lightgreyteal-9", + "lightmulti", + "lightmulti-3", + "lightmulti-4", + "lightmulti-5", + "lightmulti-6", + "lightmulti-7", + "lightmulti-8", + "lightmulti-9", + "lightorange", + "lightorange-3", + "lightorange-4", + "lightorange-5", + "lightorange-6", + "lightorange-7", + "lightorange-8", + "lightorange-9", + "lighttealblue", + "lighttealblue-3", + "lighttealblue-4", + "lighttealblue-5", + "lighttealblue-6", + "lighttealblue-7", + "lighttealblue-8", + "lighttealblue-9", + "blueorange", + "blueorange-3", + "blueorange-4", + "blueorange-5", + "blueorange-6", + "blueorange-7", + "blueorange-8", + "blueorange-9", + "blueorange-10", + "blueorange-11", + "brownbluegreen", + "brownbluegreen-3", + "brownbluegreen-4", + "brownbluegreen-5", + "brownbluegreen-6", + "brownbluegreen-7", + "brownbluegreen-8", + "brownbluegreen-9", + "brownbluegreen-10", + "brownbluegreen-11", + "purplegreen", + "purplegreen-3", + "purplegreen-4", + "purplegreen-5", + "purplegreen-6", + "purplegreen-7", + "purplegreen-8", + "purplegreen-9", + "purplegreen-10", + "purplegreen-11", + "pinkyellowgreen", + "pinkyellowgreen-3", + "pinkyellowgreen-4", + "pinkyellowgreen-5", + "pinkyellowgreen-6", + "pinkyellowgreen-7", + "pinkyellowgreen-8", + "pinkyellowgreen-9", + "pinkyellowgreen-10", + "pinkyellowgreen-11", + "purpleorange", + "purpleorange-3", + "purpleorange-4", + "purpleorange-5", + "purpleorange-6", + "purpleorange-7", + "purpleorange-8", + "purpleorange-9", + "purpleorange-10", + "purpleorange-11", + "redblue", + "redblue-3", + "redblue-4", + "redblue-5", + "redblue-6", + "redblue-7", + "redblue-8", + "redblue-9", + "redblue-10", + "redblue-11", + "redgrey", + "redgrey-3", + "redgrey-4", + "redgrey-5", + "redgrey-6", + "redgrey-7", + "redgrey-8", + "redgrey-9", + "redgrey-10", + "redgrey-11", + "redyellowblue", + "redyellowblue-3", + "redyellowblue-4", + "redyellowblue-5", + "redyellowblue-6", + "redyellowblue-7", + "redyellowblue-8", + "redyellowblue-9", + "redyellowblue-10", + "redyellowblue-11", + "redyellowgreen", + "redyellowgreen-3", + "redyellowgreen-4", + "redyellowgreen-5", + "redyellowgreen-6", + "redyellowgreen-7", + "redyellowgreen-8", + "redyellowgreen-9", + "redyellowgreen-10", + "redyellowgreen-11", + "spectral", + "spectral-3", + "spectral-4", + "spectral-5", + "spectral-6", + "spectral-7", + "spectral-8", + "spectral-9", + "spectral-10", + "spectral-11", + "rainbow", + "sinebow", +] +CompositeMark_T: TypeAlias = Literal["boxplot", "errorbar", "errorband"] +Cursor_T: TypeAlias = Literal[ + "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", + "sw-resize", + "w-resize", + "ew-resize", + "ns-resize", + "nesw-resize", + "nwse-resize", + "col-resize", + "row-resize", + "all-scroll", + "zoom-in", + "zoom-out", + "grab", + "grabbing", +] +ErrorBand_T: TypeAlias = Literal["errorband"] +ErrorBarExtent_T: TypeAlias = Literal["ci", "iqr", "stderr", "stdev"] +ErrorBar_T: TypeAlias = Literal["errorbar"] +FontWeight_T: TypeAlias = Literal[ + "normal", "bold", "lighter", "bolder", 100, 200, 300, 400, 500, 600, 700, 800, 900 +] +ImputeMethod_T: TypeAlias = Literal["value", "median", "max", "min", "mean"] +Interpolate_T: TypeAlias = Literal[ + "basis", + "basis-open", + "basis-closed", + "bundle", + "cardinal", + "cardinal-open", + "cardinal-closed", + "catmull-rom", + "linear", + "linear-closed", + "monotone", + "natural", + "step", + "step-before", + "step-after", +] +LayoutAlign_T: TypeAlias = Literal["all", "each", "none"] +LegendOrient_T: TypeAlias = Literal[ + "none", + "left", + "right", + "top", + "bottom", + "top-left", + "top-right", + "bottom-left", + "bottom-right", +] +MarkInvalidDataMode_T: TypeAlias = Literal[ + "filter", + "break-paths-filter-domains", + "break-paths-show-domains", + "break-paths-show-path-domains", + "show", +] +MarkType_T: TypeAlias = Literal[ + "arc", + "area", + "image", + "group", + "line", + "path", + "rect", + "rule", + "shape", + "symbol", + "text", + "trail", +] +Mark_T: TypeAlias = Literal[ + "arc", + "area", + "bar", + "image", + "line", + "point", + "rect", + "rule", + "text", + "tick", + "trail", + "circle", + "square", + "geoshape", +] +MultiTimeUnit_T: TypeAlias = Literal[ + "yearquarter", + "yearquartermonth", + "yearmonth", + "yearmonthdate", + "yearmonthdatehours", + "yearmonthdatehoursminutes", + "yearmonthdatehoursminutesseconds", + "yearweek", + "yearweekday", + "yearweekdayhours", + "yearweekdayhoursminutes", + "yearweekdayhoursminutesseconds", + "yeardayofyear", + "quartermonth", + "monthdate", + "monthdatehours", + "monthdatehoursminutes", + "monthdatehoursminutesseconds", + "weekday", + "weekdayhours", + "weekdayhoursminutes", + "weekdayhoursminutesseconds", + "dayhours", + "dayhoursminutes", + "dayhoursminutesseconds", + "hoursminutes", + "hoursminutesseconds", + "minutesseconds", + "secondsmilliseconds", + "utcyearquarter", + "utcyearquartermonth", + "utcyearmonth", + "utcyearmonthdate", + "utcyearmonthdatehours", + "utcyearmonthdatehoursminutes", + "utcyearmonthdatehoursminutesseconds", + "utcyearweek", + "utcyearweekday", + "utcyearweekdayhours", + "utcyearweekdayhoursminutes", + "utcyearweekdayhoursminutesseconds", + "utcyeardayofyear", + "utcquartermonth", + "utcmonthdate", + "utcmonthdatehours", + "utcmonthdatehoursminutes", + "utcmonthdatehoursminutesseconds", + "utcweekday", + "utcweekdayhours", + "utcweekdayhoursminutes", + "utcweekdayhoursminutesseconds", + "utcdayhours", + "utcdayhoursminutes", + "utcdayhoursminutesseconds", + "utchoursminutes", + "utchoursminutesseconds", + "utcminutesseconds", + "utcsecondsmilliseconds", +] +NonArgAggregateOp_T: TypeAlias = Literal[ + "average", + "count", + "distinct", + "max", + "mean", + "median", + "min", + "missing", + "product", + "q1", + "q3", + "ci0", + "ci1", + "stderr", + "stdev", + "stdevp", + "sum", + "valid", + "values", + "variance", + "variancep", + "exponential", + "exponentialb", +] +Orient_T: TypeAlias = Literal["left", "right", "top", "bottom"] +Orientation_T: TypeAlias = Literal["horizontal", "vertical"] +ProjectionType_T: TypeAlias = Literal[ + "albers", + "albersUsa", + "azimuthalEqualArea", + "azimuthalEquidistant", + "conicConformal", + "conicEqualArea", + "conicEquidistant", + "equalEarth", + "equirectangular", + "gnomonic", + "identity", + "mercator", + "naturalEarth1", + "orthographic", + "stereographic", + "transverseMercator", +] +RangeEnum_T: TypeAlias = Literal[ + "width", "height", "symbol", "category", "ordinal", "ramp", "diverging", "heatmap" +] +ResolveMode_T: TypeAlias = Literal["independent", "shared"] +ScaleInterpolateEnum_T: TypeAlias = Literal[ + "rgb", "lab", "hcl", "hsl", "hsl-long", "hcl-long", "cubehelix", "cubehelix-long" +] +ScaleType_T: TypeAlias = Literal[ + "linear", + "log", + "pow", + "sqrt", + "symlog", + "identity", + "sequential", + "time", + "utc", + "quantile", + "quantize", + "threshold", + "bin-ordinal", + "ordinal", + "point", + "band", +] +SelectionResolution_T: TypeAlias = Literal["global", "union", "intersect"] +SelectionType_T: TypeAlias = Literal["point", "interval"] +SingleDefUnitChannel_T: TypeAlias = Literal[ + "x", + "y", + "xOffset", + "yOffset", + "x2", + "y2", + "longitude", + "latitude", + "longitude2", + "latitude2", + "theta", + "theta2", + "radius", + "radius2", + "color", + "fill", + "stroke", + "opacity", + "fillOpacity", + "strokeOpacity", + "strokeWidth", + "strokeDash", + "size", + "angle", + "shape", + "key", + "text", + "href", + "url", + "description", +] +SingleTimeUnit_T: TypeAlias = Literal[ + "year", + "quarter", + "month", + "week", + "day", + "dayofyear", + "date", + "hours", + "minutes", + "seconds", + "milliseconds", + "utcyear", + "utcquarter", + "utcmonth", + "utcweek", + "utcday", + "utcdayofyear", + "utcdate", + "utchours", + "utcminutes", + "utcseconds", + "utcmilliseconds", +] +SortByChannel_T: TypeAlias = Literal[ + "x", + "y", + "color", + "fill", + "stroke", + "strokeWidth", + "size", + "shape", + "fillOpacity", + "strokeOpacity", + "opacity", + "text", +] +SortOrder_T: TypeAlias = Literal["ascending", "descending"] +StackOffset_T: TypeAlias = Literal["zero", "center", "normalize"] +StandardType_T: TypeAlias = Literal["quantitative", "ordinal", "temporal", "nominal"] +StepFor_T: TypeAlias = Literal["position", "offset"] +StrokeCap_T: TypeAlias = Literal["butt", "round", "square"] +StrokeJoin_T: TypeAlias = Literal["miter", "round", "bevel"] +TextBaseline_T: TypeAlias = Literal[ + "alphabetic", "top", "middle", "bottom", "line-top", "line-bottom" +] +TextDirection_T: TypeAlias = Literal["ltr", "rtl"] +TimeInterval_T: TypeAlias = Literal[ + "millisecond", "second", "minute", "hour", "day", "week", "month", "year" +] +TitleAnchor_T: TypeAlias = Literal[None, "start", "middle", "end"] +TitleFrame_T: TypeAlias = Literal["bounds", "group"] +TitleOrient_T: TypeAlias = Literal["none", "left", "right", "top", "bottom"] +TypeForShape_T: TypeAlias = Literal["nominal", "ordinal", "geojson"] +Type_T: TypeAlias = Literal["quantitative", "ordinal", "temporal", "nominal", "geojson"] +WindowOnlyOp_T: TypeAlias = Literal[ + "row_number", + "rank", + "dense_rank", + "percent_rank", + "cume_dist", + "ntile", + "lag", + "lead", + "first_value", + "last_value", + "nth_value", +] diff --git a/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/channels.py b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/channels.py new file mode 100644 index 0000000000000000000000000000000000000000..a4a676c23a16a79c4b451cb9cddfdf483a9ed6be --- /dev/null +++ b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/channels.py @@ -0,0 +1,22040 @@ +# The contents of this file are automatically written by +# tools/generate_schema_wrapper.py. Do not modify directly. + +from __future__ import annotations + +# These errors need to be ignored as they come from the overload methods +# which trigger two kind of errors in mypy: +# * all of them do not have an implementation in this file +# * some of them are the only overload methods -> overloads usually only make +# sense if there are multiple ones +# However, we need these overloads due to how the propertysetter works +# mypy: disable-error-code="no-overload-impl, empty-body, misc" +import sys +from typing import TYPE_CHECKING, Any, Literal, TypedDict, Union, overload + +if sys.version_info >= (3, 10): + from typing import TypeAlias +else: + from typing_extensions import TypeAlias +import narwhals.stable.v1 as nw + +from altair.utils import infer_encoding_types as _infer_encoding_types +from altair.utils import parse_shorthand +from altair.utils.schemapi import Undefined, with_property_setters + +from . import core +from ._typing import * # noqa: F403 + +if TYPE_CHECKING: + # ruff: noqa: F405 + from collections.abc import Sequence + + from altair import Parameter, SchemaBase + from altair.typing import Optional + from altair.vegalite.v5.api import Bin, Impute, IntoCondition + from altair.vegalite.v5.schema.core import ( + Axis, + DateTime, + EncodingSortField, + Header, + Legend, + RepeatRef, + Scale, + TimeUnitParams, + ) + + if sys.version_info >= (3, 11): + from typing import Self + else: + from typing_extensions import Self + + +__all__ = [ + "X2", + "Y2", + "Angle", + "AngleDatum", + "AngleValue", + "Color", + "ColorDatum", + "ColorValue", + "Column", + "DatumChannelMixin", + "Description", + "DescriptionValue", + "Detail", + "Facet", + "FieldChannelMixin", + "Fill", + "FillDatum", + "FillOpacity", + "FillOpacityDatum", + "FillOpacityValue", + "FillValue", + "Href", + "HrefValue", + "Key", + "Latitude", + "Latitude2", + "Latitude2Datum", + "Latitude2Value", + "LatitudeDatum", + "Longitude", + "Longitude2", + "Longitude2Datum", + "Longitude2Value", + "LongitudeDatum", + "Opacity", + "OpacityDatum", + "OpacityValue", + "Order", + "OrderValue", + "Radius", + "Radius2", + "Radius2Datum", + "Radius2Value", + "RadiusDatum", + "RadiusValue", + "Row", + "Shape", + "ShapeDatum", + "ShapeValue", + "Size", + "SizeDatum", + "SizeValue", + "Stroke", + "StrokeDash", + "StrokeDashDatum", + "StrokeDashValue", + "StrokeDatum", + "StrokeOpacity", + "StrokeOpacityDatum", + "StrokeOpacityValue", + "StrokeValue", + "StrokeWidth", + "StrokeWidthDatum", + "StrokeWidthValue", + "Text", + "TextDatum", + "TextValue", + "Theta", + "Theta2", + "Theta2Datum", + "Theta2Value", + "ThetaDatum", + "ThetaValue", + "Tooltip", + "TooltipValue", + "Url", + "UrlValue", + "ValueChannelMixin", + "X", + "X2Datum", + "X2Value", + "XDatum", + "XError", + "XError2", + "XError2Value", + "XErrorValue", + "XOffset", + "XOffsetDatum", + "XOffsetValue", + "XValue", + "Y", + "Y2Datum", + "Y2Value", + "YDatum", + "YError", + "YError2", + "YError2Value", + "YErrorValue", + "YOffset", + "YOffsetDatum", + "YOffsetValue", + "YValue", + "with_property_setters", +] + + +class FieldChannelMixin: + _encoding_name: str + + def to_dict( + self, + validate: bool = True, + ignore: list[str] | None = None, + context: dict[str, Any] | None = None, + ) -> dict | list[dict]: + context = context or {} + ignore = ignore or [] + shorthand = self._get("shorthand") # type: ignore[attr-defined] + field = self._get("field") # type: ignore[attr-defined] + + if shorthand is not Undefined and field is not Undefined: + msg = f"{self.__class__.__name__} specifies both shorthand={shorthand} and field={field}. " + raise ValueError(msg) + + if isinstance(shorthand, (tuple, list)): + # If given a list of shorthands, then transform it to a list of classes + kwds = self._kwds.copy() # type: ignore[attr-defined] + kwds.pop("shorthand") + return [ + self.__class__(sh, **kwds).to_dict( # type: ignore[call-arg] + validate=validate, ignore=ignore, context=context + ) + for sh in shorthand + ] + + if shorthand is Undefined: + parsed = {} + elif isinstance(shorthand, str): + data: nw.DataFrame | Any = context.get("data", None) + parsed = parse_shorthand(shorthand, data=data) + type_required = "type" in self._kwds # type: ignore[attr-defined] + type_in_shorthand = "type" in parsed + type_defined_explicitly = self._get("type") is not Undefined # type: ignore[attr-defined] + if not type_required: + # Secondary field names don't require a type argument in VegaLite 3+. + # We still parse it out of the shorthand, but drop it here. + parsed.pop("type", None) + elif not (type_in_shorthand or type_defined_explicitly): + if isinstance(data, nw.DataFrame): + msg = ( + f'Unable to determine data type for the field "{shorthand}";' + " verify that the field name is not misspelled." + " If you are referencing a field from a transform," + " also confirm that the data type is specified correctly." + ) + raise ValueError(msg) + else: + msg = ( + f"{shorthand} encoding field is specified without a type; " + "the type cannot be automatically inferred because " + "the data is not specified as a pandas.DataFrame." + ) + raise ValueError(msg) + else: + # Shorthand is not a string; we pass the definition to field, + # and do not do any parsing. + parsed = {"field": shorthand} + context["parsed_shorthand"] = parsed + + return super().to_dict(validate=validate, ignore=ignore, context=context) + + +class ValueChannelMixin: + _encoding_name: str + + def to_dict( + self, + validate: bool = True, + ignore: list[str] | None = None, + context: dict[str, Any] | None = None, + ) -> dict: + context = context or {} + ignore = ignore or [] + condition = self._get("condition", Undefined) # type: ignore[attr-defined] + copy = self # don't copy unless we need to + if condition is not Undefined: + if isinstance(condition, core.SchemaBase): + pass + elif "field" in condition and "type" not in condition: + kwds = parse_shorthand(condition["field"], context.get("data", None)) + copy = self.copy(deep=["condition"]) # type: ignore[attr-defined] + copy["condition"].update(kwds) # type: ignore[index] + return super(ValueChannelMixin, copy).to_dict( + validate=validate, ignore=ignore, context=context + ) + + +class DatumChannelMixin: + _encoding_name: str + + def to_dict( + self, + validate: bool = True, + ignore: list[str] | None = None, + context: dict[str, Any] | None = None, + ) -> dict: + context = context or {} + ignore = ignore or [] + datum = self._get("datum", Undefined) # type: ignore[attr-defined] # noqa + copy = self # don't copy unless we need to + return super(DatumChannelMixin, copy).to_dict( + validate=validate, ignore=ignore, context=context + ) + + +@with_property_setters +class Angle(FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefnumber): + r""" + Angle schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + legend : dict, :class:`Legend`, None + An object defining properties of the legend. If ``null``, the legend for the + encoding channel will be removed. + + **Default value:** If undefined, default `legend properties + `__ are applied. + + **See also:** `legend `__ + documentation. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "angle" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Angle: ... + @overload + def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Angle: ... + @overload + def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Angle: ... + @overload + def bandPosition(self, _: float, /) -> Angle: ... + @overload + def bin(self, _: bool | Bin | None, /) -> Angle: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> Angle: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> Angle: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> Angle: ... + @overload + def condition(self, _: list[core.ConditionalValueDefnumberExprRef], /) -> Angle: ... + @overload + def field(self, _: str | RepeatRef, /) -> Angle: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Angle: ... + @overload + def legend(self, _: Legend | None, /) -> Angle: ... + @overload + def legend( + self, + *, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columns: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + direction: Optional[SchemaBase | Orientation_T] = Undefined, + fillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOverlap: Optional[ + bool | Parameter | SchemaBase | Literal["greedy", "parity"] | Map + ] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[SchemaBase | LegendOrient_T] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolFillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined, + tickCount: Optional[ + float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + type: Optional[Literal["symbol", "gradient"]] = Undefined, + values: Optional[ + Parameter + | SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + ] = Undefined, + zindex: Optional[float] = Undefined, + ) -> Angle: ... + @overload + def scale(self, _: Scale | None, /) -> Angle: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> Angle: ... + @overload + def sort( + self, + _: Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[DateTime | Temporal] + | AllSortString_T + | None, + /, + ) -> Angle: ... + @overload + def sort( + self, + *, + field: Optional[str | SchemaBase | Map] = Undefined, + op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Angle: ... + @overload + def sort( + self, + *, + encoding: Optional[SchemaBase | SortByChannel_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Angle: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Angle: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Angle: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Angle: ... + @overload + def type(self, _: StandardType_T, /) -> Angle: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + legend=legend, + scale=scale, + sort=sort, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class AngleDatum(DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefnumber): + """ + AngleDatum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "angle" + + @overload + def bandPosition(self, _: float, /) -> AngleDatum: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> AngleDatum: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> AngleDatum: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefnumberExprRef], / + ) -> AngleDatum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> AngleDatum: ... + @overload + def type(self, _: Type_T, /) -> AngleDatum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, + bandPosition=bandPosition, + condition=condition, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class AngleValue( + ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefnumber +): + """ + AngleValue schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : dict, float, :class:`ExprRef` + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "angle" + + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> AngleValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> AngleValue: ... + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + empty: Optional[bool] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> AngleValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + empty: Optional[bool] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> AngleValue: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> AngleValue: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> AngleValue: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefnumberExprRef], / + ) -> AngleValue: ... + + def __init__( + self, + value, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + **kwds, + ): + super().__init__(value=value, condition=condition, **kwds) + + +@with_property_setters +class Color( + FieldChannelMixin, + core.FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull, +): + r""" + Color schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + legend : dict, :class:`Legend`, None + An object defining properties of the legend. If ``null``, the legend for the + encoding channel will be removed. + + **Default value:** If undefined, default `legend properties + `__ are applied. + + **See also:** `legend `__ + documentation. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "color" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Color: ... + @overload + def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Color: ... + @overload + def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Color: ... + @overload + def bandPosition(self, _: float, /) -> Color: ... + @overload + def bin(self, _: bool | Bin | None, /) -> Color: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> Color: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> Color: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> Color: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefGradientstringnullExprRef], / + ) -> Color: ... + @overload + def field(self, _: str | RepeatRef, /) -> Color: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Color: ... + @overload + def legend(self, _: Legend | None, /) -> Color: ... + @overload + def legend( + self, + *, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columns: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + direction: Optional[SchemaBase | Orientation_T] = Undefined, + fillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOverlap: Optional[ + bool | Parameter | SchemaBase | Literal["greedy", "parity"] | Map + ] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[SchemaBase | LegendOrient_T] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolFillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined, + tickCount: Optional[ + float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + type: Optional[Literal["symbol", "gradient"]] = Undefined, + values: Optional[ + Parameter + | SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + ] = Undefined, + zindex: Optional[float] = Undefined, + ) -> Color: ... + @overload + def scale(self, _: Scale | None, /) -> Color: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> Color: ... + @overload + def sort( + self, + _: Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[DateTime | Temporal] + | AllSortString_T + | None, + /, + ) -> Color: ... + @overload + def sort( + self, + *, + field: Optional[str | SchemaBase | Map] = Undefined, + op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Color: ... + @overload + def sort( + self, + *, + encoding: Optional[SchemaBase | SortByChannel_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Color: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Color: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Color: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Color: ... + @overload + def type(self, _: StandardType_T, /) -> Color: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + legend=legend, + scale=scale, + sort=sort, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class ColorDatum( + DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefGradientstringnull +): + """ + ColorDatum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "color" + + @overload + def bandPosition(self, _: float, /) -> ColorDatum: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> ColorDatum: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> ColorDatum: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefGradientstringnullExprRef], / + ) -> ColorDatum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> ColorDatum: ... + @overload + def type(self, _: Type_T, /) -> ColorDatum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, + bandPosition=bandPosition, + condition=condition, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class ColorValue( + ValueChannelMixin, + core.ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull, +): + """ + ColorValue schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : str, dict, :class:`ExprRef`, :class:`Gradient`, :class:`LinearGradient`, :class:`RadialGradient`, None + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "color" + + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> ColorValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> ColorValue: ... + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + empty: Optional[bool] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> ColorValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + empty: Optional[bool] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> ColorValue: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> ColorValue: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> ColorValue: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefGradientstringnullExprRef], / + ) -> ColorValue: ... + + def __init__( + self, + value, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + **kwds, + ): + super().__init__(value=value, condition=condition, **kwds) + + +@with_property_setters +class Column(FieldChannelMixin, core.RowColumnEncodingFieldDef): + r""" + Column schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + align : :class:`LayoutAlign`, Literal['all', 'each', 'none'] + The alignment to apply to row/column facet's subplot. The supported string values + are ``"all"``, ``"each"``, and ``"none"``. + + * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply + placed one after the other. + * For ``"each"``, subviews will be aligned into a clean grid structure, but each row + or column may be of variable size. + * For ``"all"``, subviews will be aligned and each row or column will be sized + identically based on the maximum observed size. String values for this property + will be applied to both grid rows and columns. + + **Default value:** ``"all"``. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + center : bool + Boolean flag indicating if facet's subviews should be centered relative to their + respective rows or columns. + + **Default value:** ``false`` + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + header : dict, :class:`Header`, None + An object defining properties of a facet's header. + sort : dict, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, Sequence[dict, :class:`DateTime`], Literal['ascending', 'descending'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` is not supported for ``row`` and ``column``. + spacing : float + The spacing in pixels between facet's sub-views. + + **Default value**: Depends on ``"spacing"`` property of `the view composition + configuration `__ + (``20`` by default) + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "column" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Column: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> Column: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> Column: ... + @overload + def align(self, _: LayoutAlign_T, /) -> Column: ... + @overload + def bandPosition(self, _: float, /) -> Column: ... + @overload + def bin(self, _: bool | Bin | None, /) -> Column: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> Column: ... + @overload + def center(self, _: bool, /) -> Column: ... + @overload + def field(self, _: str | RepeatRef, /) -> Column: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Column: ... + @overload + def header(self, _: Header | None, /) -> Column: ... + @overload + def header( + self, + *, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelAnchor: Optional[SchemaBase | TitleAnchor_T] = Undefined, + labelAngle: Optional[float] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOrient: Optional[SchemaBase | Orient_T] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labels: Optional[bool] = Undefined, + orient: Optional[SchemaBase | Orient_T] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[SchemaBase | TitleAnchor_T] = Undefined, + titleAngle: Optional[float] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOrient: Optional[SchemaBase | Orient_T] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> Column: ... + @overload + def sort( + self, + _: Sequence[str] + | Sequence[bool] + | Sequence[float] + | EncodingSortField + | Sequence[DateTime | Temporal] + | SortOrder_T + | None, + /, + ) -> Column: ... + @overload + def sort( + self, + *, + field: Optional[str | SchemaBase | Map] = Undefined, + op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Column: ... + @overload + def spacing(self, _: float, /) -> Column: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Column: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Column: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Column: ... + @overload + def type(self, _: StandardType_T, /) -> Column: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + align: Optional[SchemaBase | LayoutAlign_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + center: Optional[bool] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + header: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | SortOrder_T + | None + ] = Undefined, + spacing: Optional[float] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + align=align, + bandPosition=bandPosition, + bin=bin, + center=center, + field=field, + header=header, + sort=sort, + spacing=spacing, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class Description(FieldChannelMixin, core.StringFieldDefWithCondition): + r""" + Description schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`, Sequence[dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + format : str, dict, :class:`Dict` + When used with the default ``"number"`` and ``"time"`` format type, the text + formatting pattern for labels of guides (axes, legends, headers) and text marks. + + * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's + `number format pattern `__. + * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time + format pattern `__. + + See the `format documentation `__ + for more examples. + + When used with a `custom formatType + `__, this + value will be passed as ``format`` alongside ``datum.value`` to the registered + function. + + **Default value:** Derived from `numberFormat + `__ config for number + format and from `timeFormat + `__ config for time + format. + formatType : str + The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom + format type + `__. + + **Default value:** + + * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``. + * ``"number"`` for quantitative fields as well as ordinal and nominal fields without + ``timeUnit``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "description" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Description: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> Description: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> Description: ... + @overload + def bandPosition(self, _: float, /) -> Description: ... + @overload + def bin(self, _: bool | Bin | Literal["binned"] | None, /) -> Description: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> Description: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map] = Undefined, + ) -> Description: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map] = Undefined, + ) -> Description: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefstringExprRef], / + ) -> Description: ... + @overload + def field(self, _: str | RepeatRef, /) -> Description: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Description: ... + @overload + def format(self, _: str, /) -> Description: ... + @overload + def format(self, _: Map, /) -> Description: ... + @overload + def formatType(self, _: str, /) -> Description: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Description: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Description: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Description: ... + @overload + def type(self, _: StandardType_T, /) -> Description: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + format=format, + formatType=formatType, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class DescriptionValue(ValueChannelMixin, core.StringValueDefWithCondition): + """ + DescriptionValue schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : str, dict, :class:`ExprRef`, None + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "description" + + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> DescriptionValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> DescriptionValue: ... + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + empty: Optional[bool] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> DescriptionValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + empty: Optional[bool] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> DescriptionValue: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> DescriptionValue: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> DescriptionValue: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefstringnullExprRef], / + ) -> DescriptionValue: ... + + def __init__( + self, + value, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + **kwds, + ): + super().__init__(value=value, condition=condition, **kwds) + + +@with_property_setters +class Detail(FieldChannelMixin, core.FieldDefWithoutScale): + r""" + Detail schema wrapper. + + Definition object for a data field, its type and transformation of an encoding channel. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "detail" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Detail: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> Detail: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> Detail: ... + @overload + def bandPosition(self, _: float, /) -> Detail: ... + @overload + def bin(self, _: bool | Bin | Literal["binned"] | None, /) -> Detail: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> Detail: ... + @overload + def field(self, _: str | RepeatRef, /) -> Detail: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Detail: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Detail: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Detail: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Detail: ... + @overload + def type(self, _: StandardType_T, /) -> Detail: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class Facet(FieldChannelMixin, core.FacetEncodingFieldDef): + r""" + Facet schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none'] + The alignment to apply to grid rows and columns. The supported string values are + ``"all"``, ``"each"``, and ``"none"``. + + * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply + placed one after the other. + * For ``"each"``, subviews will be aligned into a clean grid structure, but each row + or column may be of variable size. + * For ``"all"``, subviews will be aligned and each row or column will be sized + identically based on the maximum observed size. String values for this property + will be applied to both grid rows and columns. + + Alternatively, an object value of the form ``{"row": string, "column": string}`` can + be used to supply different alignments for rows and columns. + + **Default value:** ``"all"``. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + bounds : Literal['full', 'flush'] + The bounds calculation method to use for determining the extent of a sub-plot. One + of ``full`` (the default) or ``flush``. + + * If set to ``full``, the entire calculated bounds (including axes, title, and + legend) will be used. + * If set to ``flush``, only the specified width and height values for the sub-view + will be used. The ``flush`` setting can be useful when attempting to place + sub-plots without axes or legends into a uniform grid structure. + + **Default value:** ``"full"`` + center : bool, dict, :class:`RowColboolean` + Boolean flag indicating if subviews should be centered relative to their respective + rows or columns. + + An object value of the form ``{"row": boolean, "column": boolean}`` can be used to + supply different centering values for rows and columns. + + **Default value:** ``false`` + columns : float + The number of columns to include in the view composition layout. + + **Default value**: ``undefined`` -- An infinite number of columns (a single row) + will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the + ``column`` channel (for ``facet`` and ``repeat``). + + **Note**: + + 1) This property is only for: + + * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``) + * the ``facet`` and ``repeat`` operator with one field/repetition definition + (without row/column nesting) + + 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``) + and to using the ``row`` channel (for ``facet`` and ``repeat``). + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + header : dict, :class:`Header`, None + An object defining properties of a facet's header. + sort : dict, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, Sequence[dict, :class:`DateTime`], Literal['ascending', 'descending'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` is not supported for ``row`` and ``column``. + spacing : dict, float, :class:`RowColnumber` + The spacing in pixels between sub-views of the composition operator. An object of + the form ``{"row": number, "column": number}`` can be used to set different spacing + values for rows and columns. + + **Default value**: Depends on ``"spacing"`` property of `the view composition + configuration `__ + (``20`` by default) + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "facet" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Facet: ... + @overload + def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Facet: ... + @overload + def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Facet: ... + @overload + def align(self, _: RowColKwds[LayoutAlign_T] | LayoutAlign_T, /) -> Facet: ... + @overload + def align( + self, + *, + column: Optional[SchemaBase | LayoutAlign_T] = Undefined, + row: Optional[SchemaBase | LayoutAlign_T] = Undefined, + ) -> Facet: ... + @overload + def bandPosition(self, _: float, /) -> Facet: ... + @overload + def bin(self, _: bool | Bin | None, /) -> Facet: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> Facet: ... + @overload + def bounds(self, _: Literal["full", "flush"], /) -> Facet: ... + @overload + def center(self, _: bool | RowColKwds[bool], /) -> Facet: ... + @overload + def center( + self, *, column: Optional[bool] = Undefined, row: Optional[bool] = Undefined + ) -> Facet: ... + @overload + def columns(self, _: float, /) -> Facet: ... + @overload + def field(self, _: str | RepeatRef, /) -> Facet: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Facet: ... + @overload + def header(self, _: Header | None, /) -> Facet: ... + @overload + def header( + self, + *, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelAnchor: Optional[SchemaBase | TitleAnchor_T] = Undefined, + labelAngle: Optional[float] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOrient: Optional[SchemaBase | Orient_T] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labels: Optional[bool] = Undefined, + orient: Optional[SchemaBase | Orient_T] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[SchemaBase | TitleAnchor_T] = Undefined, + titleAngle: Optional[float] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOrient: Optional[SchemaBase | Orient_T] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> Facet: ... + @overload + def sort( + self, + _: Sequence[str] + | Sequence[bool] + | Sequence[float] + | EncodingSortField + | Sequence[DateTime | Temporal] + | SortOrder_T + | None, + /, + ) -> Facet: ... + @overload + def sort( + self, + *, + field: Optional[str | SchemaBase | Map] = Undefined, + op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Facet: ... + @overload + def spacing(self, _: float | RowColKwds[float], /) -> Facet: ... + @overload + def spacing( + self, *, column: Optional[float] = Undefined, row: Optional[float] = Undefined + ) -> Facet: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Facet: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Facet: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Facet: ... + @overload + def type(self, _: StandardType_T, /) -> Facet: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + align: Optional[SchemaBase | Map | LayoutAlign_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + bounds: Optional[Literal["full", "flush"]] = Undefined, + center: Optional[bool | SchemaBase | Map] = Undefined, + columns: Optional[float] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + header: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | SortOrder_T + | None + ] = Undefined, + spacing: Optional[float | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + align=align, + bandPosition=bandPosition, + bin=bin, + bounds=bounds, + center=center, + columns=columns, + field=field, + header=header, + sort=sort, + spacing=spacing, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class Fill( + FieldChannelMixin, + core.FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull, +): + r""" + Fill schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + legend : dict, :class:`Legend`, None + An object defining properties of the legend. If ``null``, the legend for the + encoding channel will be removed. + + **Default value:** If undefined, default `legend properties + `__ are applied. + + **See also:** `legend `__ + documentation. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "fill" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Fill: ... + @overload + def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Fill: ... + @overload + def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Fill: ... + @overload + def bandPosition(self, _: float, /) -> Fill: ... + @overload + def bin(self, _: bool | Bin | None, /) -> Fill: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> Fill: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> Fill: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> Fill: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefGradientstringnullExprRef], / + ) -> Fill: ... + @overload + def field(self, _: str | RepeatRef, /) -> Fill: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Fill: ... + @overload + def legend(self, _: Legend | None, /) -> Fill: ... + @overload + def legend( + self, + *, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columns: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + direction: Optional[SchemaBase | Orientation_T] = Undefined, + fillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOverlap: Optional[ + bool | Parameter | SchemaBase | Literal["greedy", "parity"] | Map + ] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[SchemaBase | LegendOrient_T] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolFillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined, + tickCount: Optional[ + float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + type: Optional[Literal["symbol", "gradient"]] = Undefined, + values: Optional[ + Parameter + | SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + ] = Undefined, + zindex: Optional[float] = Undefined, + ) -> Fill: ... + @overload + def scale(self, _: Scale | None, /) -> Fill: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> Fill: ... + @overload + def sort( + self, + _: Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[DateTime | Temporal] + | AllSortString_T + | None, + /, + ) -> Fill: ... + @overload + def sort( + self, + *, + field: Optional[str | SchemaBase | Map] = Undefined, + op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Fill: ... + @overload + def sort( + self, + *, + encoding: Optional[SchemaBase | SortByChannel_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Fill: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Fill: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Fill: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Fill: ... + @overload + def type(self, _: StandardType_T, /) -> Fill: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + legend=legend, + scale=scale, + sort=sort, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class FillDatum( + DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefGradientstringnull +): + """ + FillDatum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "fill" + + @overload + def bandPosition(self, _: float, /) -> FillDatum: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> FillDatum: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> FillDatum: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefGradientstringnullExprRef], / + ) -> FillDatum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> FillDatum: ... + @overload + def type(self, _: Type_T, /) -> FillDatum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, + bandPosition=bandPosition, + condition=condition, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class FillValue( + ValueChannelMixin, + core.ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull, +): + """ + FillValue schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : str, dict, :class:`ExprRef`, :class:`Gradient`, :class:`LinearGradient`, :class:`RadialGradient`, None + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "fill" + + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> FillValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> FillValue: ... + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + empty: Optional[bool] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> FillValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + empty: Optional[bool] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> FillValue: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> FillValue: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> FillValue: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefGradientstringnullExprRef], / + ) -> FillValue: ... + + def __init__( + self, + value, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + **kwds, + ): + super().__init__(value=value, condition=condition, **kwds) + + +@with_property_setters +class FillOpacity( + FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefnumber +): + r""" + FillOpacity schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + legend : dict, :class:`Legend`, None + An object defining properties of the legend. If ``null``, the legend for the + encoding channel will be removed. + + **Default value:** If undefined, default `legend properties + `__ are applied. + + **See also:** `legend `__ + documentation. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "fillOpacity" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> FillOpacity: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> FillOpacity: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> FillOpacity: ... + @overload + def bandPosition(self, _: float, /) -> FillOpacity: ... + @overload + def bin(self, _: bool | Bin | None, /) -> FillOpacity: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> FillOpacity: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> FillOpacity: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> FillOpacity: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefnumberExprRef], / + ) -> FillOpacity: ... + @overload + def field(self, _: str | RepeatRef, /) -> FillOpacity: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> FillOpacity: ... + @overload + def legend(self, _: Legend | None, /) -> FillOpacity: ... + @overload + def legend( + self, + *, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columns: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + direction: Optional[SchemaBase | Orientation_T] = Undefined, + fillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOverlap: Optional[ + bool | Parameter | SchemaBase | Literal["greedy", "parity"] | Map + ] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[SchemaBase | LegendOrient_T] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolFillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined, + tickCount: Optional[ + float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + type: Optional[Literal["symbol", "gradient"]] = Undefined, + values: Optional[ + Parameter + | SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + ] = Undefined, + zindex: Optional[float] = Undefined, + ) -> FillOpacity: ... + @overload + def scale(self, _: Scale | None, /) -> FillOpacity: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> FillOpacity: ... + @overload + def sort( + self, + _: Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[DateTime | Temporal] + | AllSortString_T + | None, + /, + ) -> FillOpacity: ... + @overload + def sort( + self, + *, + field: Optional[str | SchemaBase | Map] = Undefined, + op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> FillOpacity: ... + @overload + def sort( + self, + *, + encoding: Optional[SchemaBase | SortByChannel_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> FillOpacity: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> FillOpacity: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> FillOpacity: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> FillOpacity: ... + @overload + def type(self, _: StandardType_T, /) -> FillOpacity: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + legend=legend, + scale=scale, + sort=sort, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class FillOpacityDatum( + DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefnumber +): + """ + FillOpacityDatum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "fillOpacity" + + @overload + def bandPosition(self, _: float, /) -> FillOpacityDatum: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> FillOpacityDatum: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> FillOpacityDatum: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefnumberExprRef], / + ) -> FillOpacityDatum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> FillOpacityDatum: ... + @overload + def type(self, _: Type_T, /) -> FillOpacityDatum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, + bandPosition=bandPosition, + condition=condition, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class FillOpacityValue( + ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefnumber +): + """ + FillOpacityValue schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : dict, float, :class:`ExprRef` + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "fillOpacity" + + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> FillOpacityValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> FillOpacityValue: ... + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + empty: Optional[bool] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> FillOpacityValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + empty: Optional[bool] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> FillOpacityValue: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> FillOpacityValue: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> FillOpacityValue: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefnumberExprRef], / + ) -> FillOpacityValue: ... + + def __init__( + self, + value, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + **kwds, + ): + super().__init__(value=value, condition=condition, **kwds) + + +@with_property_setters +class Href(FieldChannelMixin, core.StringFieldDefWithCondition): + r""" + Href schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`, Sequence[dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + format : str, dict, :class:`Dict` + When used with the default ``"number"`` and ``"time"`` format type, the text + formatting pattern for labels of guides (axes, legends, headers) and text marks. + + * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's + `number format pattern `__. + * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time + format pattern `__. + + See the `format documentation `__ + for more examples. + + When used with a `custom formatType + `__, this + value will be passed as ``format`` alongside ``datum.value`` to the registered + function. + + **Default value:** Derived from `numberFormat + `__ config for number + format and from `timeFormat + `__ config for time + format. + formatType : str + The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom + format type + `__. + + **Default value:** + + * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``. + * ``"number"`` for quantitative fields as well as ordinal and nominal fields without + ``timeUnit``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "href" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Href: ... + @overload + def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Href: ... + @overload + def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Href: ... + @overload + def bandPosition(self, _: float, /) -> Href: ... + @overload + def bin(self, _: bool | Bin | Literal["binned"] | None, /) -> Href: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> Href: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map] = Undefined, + ) -> Href: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map] = Undefined, + ) -> Href: ... + @overload + def condition(self, _: list[core.ConditionalValueDefstringExprRef], /) -> Href: ... + @overload + def field(self, _: str | RepeatRef, /) -> Href: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Href: ... + @overload + def format(self, _: str, /) -> Href: ... + @overload + def format(self, _: Map, /) -> Href: ... + @overload + def formatType(self, _: str, /) -> Href: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Href: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Href: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Href: ... + @overload + def type(self, _: StandardType_T, /) -> Href: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + format=format, + formatType=formatType, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class HrefValue(ValueChannelMixin, core.StringValueDefWithCondition): + """ + HrefValue schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : str, dict, :class:`ExprRef`, None + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "href" + + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> HrefValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> HrefValue: ... + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + empty: Optional[bool] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> HrefValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + empty: Optional[bool] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> HrefValue: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> HrefValue: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> HrefValue: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefstringnullExprRef], / + ) -> HrefValue: ... + + def __init__( + self, + value, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + **kwds, + ): + super().__init__(value=value, condition=condition, **kwds) + + +@with_property_setters +class Key(FieldChannelMixin, core.FieldDefWithoutScale): + r""" + Key schema wrapper. + + Definition object for a data field, its type and transformation of an encoding channel. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "key" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Key: ... + @overload + def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Key: ... + @overload + def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Key: ... + @overload + def bandPosition(self, _: float, /) -> Key: ... + @overload + def bin(self, _: bool | Bin | Literal["binned"] | None, /) -> Key: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> Key: ... + @overload + def field(self, _: str | RepeatRef, /) -> Key: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Key: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Key: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Key: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Key: ... + @overload + def type(self, _: StandardType_T, /) -> Key: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class Latitude(FieldChannelMixin, core.LatLongFieldDef): + r""" + Latitude schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : Literal['quantitative'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "latitude" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Latitude: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> Latitude: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> Latitude: ... + @overload + def bandPosition(self, _: float, /) -> Latitude: ... + @overload + def bin(self, _: None, /) -> Latitude: ... + @overload + def field(self, _: str | RepeatRef, /) -> Latitude: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Latitude: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Latitude: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Latitude: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Latitude: ... + @overload + def type(self, _: Literal["quantitative"], /) -> Latitude: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[Literal["quantitative"]] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class LatitudeDatum(DatumChannelMixin, core.DatumDef): + """ + LatitudeDatum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "latitude" + + @overload + def bandPosition(self, _: float, /) -> LatitudeDatum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> LatitudeDatum: ... + @overload + def type(self, _: Type_T, /) -> LatitudeDatum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, bandPosition=bandPosition, title=title, type=type, **kwds + ) + + +@with_property_setters +class Latitude2(FieldChannelMixin, core.SecondaryFieldDef): + r""" + Latitude2 schema wrapper. + + A field definition of a secondary channel that shares a scale with another primary channel. + For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "latitude2" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Latitude2: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> Latitude2: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> Latitude2: ... + @overload + def bandPosition(self, _: float, /) -> Latitude2: ... + @overload + def bin(self, _: None, /) -> Latitude2: ... + @overload + def field(self, _: str | RepeatRef, /) -> Latitude2: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Latitude2: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Latitude2: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Latitude2: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Latitude2: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + timeUnit=timeUnit, + title=title, + **kwds, + ) + + +@with_property_setters +class Latitude2Datum(DatumChannelMixin, core.DatumDef): + """ + Latitude2Datum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "latitude2" + + @overload + def bandPosition(self, _: float, /) -> Latitude2Datum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Latitude2Datum: ... + @overload + def type(self, _: Type_T, /) -> Latitude2Datum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, bandPosition=bandPosition, title=title, type=type, **kwds + ) + + +@with_property_setters +class Latitude2Value(ValueChannelMixin, core.PositionValueDef): + """ + Latitude2Value schema wrapper. + + Definition object for a constant value (primitive value or gradient definition) of an + encoding channel. + + Parameters + ---------- + value : dict, float, :class:`ExprRef`, Literal['height', 'width'] + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "latitude2" + + def __init__(self, value, **kwds): + super().__init__(value=value, **kwds) + + +@with_property_setters +class Longitude(FieldChannelMixin, core.LatLongFieldDef): + r""" + Longitude schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : Literal['quantitative'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "longitude" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Longitude: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> Longitude: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> Longitude: ... + @overload + def bandPosition(self, _: float, /) -> Longitude: ... + @overload + def bin(self, _: None, /) -> Longitude: ... + @overload + def field(self, _: str | RepeatRef, /) -> Longitude: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Longitude: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Longitude: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Longitude: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Longitude: ... + @overload + def type(self, _: Literal["quantitative"], /) -> Longitude: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[Literal["quantitative"]] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class LongitudeDatum(DatumChannelMixin, core.DatumDef): + """ + LongitudeDatum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "longitude" + + @overload + def bandPosition(self, _: float, /) -> LongitudeDatum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> LongitudeDatum: ... + @overload + def type(self, _: Type_T, /) -> LongitudeDatum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, bandPosition=bandPosition, title=title, type=type, **kwds + ) + + +@with_property_setters +class Longitude2(FieldChannelMixin, core.SecondaryFieldDef): + r""" + Longitude2 schema wrapper. + + A field definition of a secondary channel that shares a scale with another primary channel. + For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "longitude2" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Longitude2: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> Longitude2: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> Longitude2: ... + @overload + def bandPosition(self, _: float, /) -> Longitude2: ... + @overload + def bin(self, _: None, /) -> Longitude2: ... + @overload + def field(self, _: str | RepeatRef, /) -> Longitude2: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Longitude2: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Longitude2: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Longitude2: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Longitude2: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + timeUnit=timeUnit, + title=title, + **kwds, + ) + + +@with_property_setters +class Longitude2Datum(DatumChannelMixin, core.DatumDef): + """ + Longitude2Datum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "longitude2" + + @overload + def bandPosition(self, _: float, /) -> Longitude2Datum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Longitude2Datum: ... + @overload + def type(self, _: Type_T, /) -> Longitude2Datum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, bandPosition=bandPosition, title=title, type=type, **kwds + ) + + +@with_property_setters +class Longitude2Value(ValueChannelMixin, core.PositionValueDef): + """ + Longitude2Value schema wrapper. + + Definition object for a constant value (primitive value or gradient definition) of an + encoding channel. + + Parameters + ---------- + value : dict, float, :class:`ExprRef`, Literal['height', 'width'] + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "longitude2" + + def __init__(self, value, **kwds): + super().__init__(value=value, **kwds) + + +@with_property_setters +class Opacity( + FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefnumber +): + r""" + Opacity schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + legend : dict, :class:`Legend`, None + An object defining properties of the legend. If ``null``, the legend for the + encoding channel will be removed. + + **Default value:** If undefined, default `legend properties + `__ are applied. + + **See also:** `legend `__ + documentation. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "opacity" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Opacity: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> Opacity: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> Opacity: ... + @overload + def bandPosition(self, _: float, /) -> Opacity: ... + @overload + def bin(self, _: bool | Bin | None, /) -> Opacity: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> Opacity: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> Opacity: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> Opacity: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefnumberExprRef], / + ) -> Opacity: ... + @overload + def field(self, _: str | RepeatRef, /) -> Opacity: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Opacity: ... + @overload + def legend(self, _: Legend | None, /) -> Opacity: ... + @overload + def legend( + self, + *, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columns: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + direction: Optional[SchemaBase | Orientation_T] = Undefined, + fillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOverlap: Optional[ + bool | Parameter | SchemaBase | Literal["greedy", "parity"] | Map + ] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[SchemaBase | LegendOrient_T] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolFillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined, + tickCount: Optional[ + float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + type: Optional[Literal["symbol", "gradient"]] = Undefined, + values: Optional[ + Parameter + | SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + ] = Undefined, + zindex: Optional[float] = Undefined, + ) -> Opacity: ... + @overload + def scale(self, _: Scale | None, /) -> Opacity: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> Opacity: ... + @overload + def sort( + self, + _: Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[DateTime | Temporal] + | AllSortString_T + | None, + /, + ) -> Opacity: ... + @overload + def sort( + self, + *, + field: Optional[str | SchemaBase | Map] = Undefined, + op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Opacity: ... + @overload + def sort( + self, + *, + encoding: Optional[SchemaBase | SortByChannel_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Opacity: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Opacity: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Opacity: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Opacity: ... + @overload + def type(self, _: StandardType_T, /) -> Opacity: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + legend=legend, + scale=scale, + sort=sort, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class OpacityDatum(DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefnumber): + """ + OpacityDatum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "opacity" + + @overload + def bandPosition(self, _: float, /) -> OpacityDatum: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> OpacityDatum: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> OpacityDatum: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefnumberExprRef], / + ) -> OpacityDatum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> OpacityDatum: ... + @overload + def type(self, _: Type_T, /) -> OpacityDatum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, + bandPosition=bandPosition, + condition=condition, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class OpacityValue( + ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefnumber +): + """ + OpacityValue schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : dict, float, :class:`ExprRef` + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "opacity" + + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> OpacityValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> OpacityValue: ... + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + empty: Optional[bool] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> OpacityValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + empty: Optional[bool] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> OpacityValue: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> OpacityValue: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> OpacityValue: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefnumberExprRef], / + ) -> OpacityValue: ... + + def __init__( + self, + value, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + **kwds, + ): + super().__init__(value=value, condition=condition, **kwds) + + +@with_property_setters +class Order(FieldChannelMixin, core.OrderFieldDef): + r""" + Order schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + sort : :class:`SortOrder`, Literal['ascending', 'descending'] + The sort order. One of ``"ascending"`` (default) or ``"descending"``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "order" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Order: ... + @overload + def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Order: ... + @overload + def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Order: ... + @overload + def bandPosition(self, _: float, /) -> Order: ... + @overload + def bin(self, _: bool | Bin | Literal["binned"] | None, /) -> Order: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> Order: ... + @overload + def field(self, _: str | RepeatRef, /) -> Order: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Order: ... + @overload + def sort(self, _: SortOrder_T, /) -> Order: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Order: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Order: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Order: ... + @overload + def type(self, _: StandardType_T, /) -> Order: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + sort: Optional[SchemaBase | SortOrder_T] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + sort=sort, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class OrderValue(ValueChannelMixin, core.OrderValueDef): + """ + OrderValue schema wrapper. + + Parameters + ---------- + value : dict, float, :class:`ExprRef` + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + condition : dict, :class:`ConditionalValueDefnumber`, :class:`ConditionalParameterValueDefnumber`, :class:`ConditionalPredicateValueDefnumber`, Sequence[dict, :class:`ConditionalValueDefnumber`, :class:`ConditionalParameterValueDefnumber`, :class:`ConditionalPredicateValueDefnumber`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "order" + + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[float] = Undefined, + ) -> OrderValue: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[float] = Undefined, + ) -> OrderValue: ... + @overload + def condition(self, _: list[core.ConditionalValueDefnumber], /) -> OrderValue: ... + + def __init__( + self, + value, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + **kwds, + ): + super().__init__(value=value, condition=condition, **kwds) + + +@with_property_setters +class Radius(FieldChannelMixin, core.PositionFieldDefBase): + r""" + Radius schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None + Type of stacking offset if the field should be stacked. ``stack`` is only applicable + for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For + example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar + chart. + + ``stack`` can be one of the following values: + + * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale + (for creating typical stacked `bar + `__ and `area + `__ chart). + * ``"normalize"`` - stacking with normalized domain (for creating `normalized + stacked bar and area charts + `__ and pie charts + `with percentage tooltip + `__). + * ``"center"`` - stacking with center baseline (for `streamgraph + `__). + * ``null`` or ``false`` - No-stacking. This will produce layered `bar + `__ and area + chart. + + **Default value:** ``zero`` for plots with all of the following conditions are true: + (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or + y) has a linear scale; (3) At least one of non-position channels mapped to an + unaggregated field that is different from x and y. Otherwise, ``null`` by default. + + **See also:** `stack `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "radius" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Radius: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> Radius: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> Radius: ... + @overload + def bandPosition(self, _: float, /) -> Radius: ... + @overload + def bin(self, _: bool | Bin | Literal["binned"] | None, /) -> Radius: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> Radius: ... + @overload + def field(self, _: str | RepeatRef, /) -> Radius: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Radius: ... + @overload + def scale(self, _: Scale | None, /) -> Radius: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> Radius: ... + @overload + def sort( + self, + _: Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[DateTime | Temporal] + | AllSortString_T + | None, + /, + ) -> Radius: ... + @overload + def sort( + self, + *, + field: Optional[str | SchemaBase | Map] = Undefined, + op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Radius: ... + @overload + def sort( + self, + *, + encoding: Optional[SchemaBase | SortByChannel_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Radius: ... + @overload + def stack(self, _: bool | StackOffset_T | None, /) -> Radius: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Radius: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Radius: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Radius: ... + @overload + def type(self, _: StandardType_T, /) -> Radius: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + scale=scale, + sort=sort, + stack=stack, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class RadiusDatum(DatumChannelMixin, core.PositionDatumDefBase): + """ + RadiusDatum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None + Type of stacking offset if the field should be stacked. ``stack`` is only applicable + for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For + example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar + chart. + + ``stack`` can be one of the following values: + + * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale + (for creating typical stacked `bar + `__ and `area + `__ chart). + * ``"normalize"`` - stacking with normalized domain (for creating `normalized + stacked bar and area charts + `__ and pie charts + `with percentage tooltip + `__). + * ``"center"`` - stacking with center baseline (for `streamgraph + `__). + * ``null`` or ``false`` - No-stacking. This will produce layered `bar + `__ and area + chart. + + **Default value:** ``zero`` for plots with all of the following conditions are true: + (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or + y) has a linear scale; (3) At least one of non-position channels mapped to an + unaggregated field that is different from x and y. Otherwise, ``null`` by default. + + **See also:** `stack `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "radius" + + @overload + def bandPosition(self, _: float, /) -> RadiusDatum: ... + @overload + def scale(self, _: Scale | None, /) -> RadiusDatum: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> RadiusDatum: ... + @overload + def stack(self, _: bool | StackOffset_T | None, /) -> RadiusDatum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> RadiusDatum: ... + @overload + def type(self, _: Type_T, /) -> RadiusDatum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, + bandPosition=bandPosition, + scale=scale, + stack=stack, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class RadiusValue(ValueChannelMixin, core.PositionValueDef): + """ + RadiusValue schema wrapper. + + Definition object for a constant value (primitive value or gradient definition) of an + encoding channel. + + Parameters + ---------- + value : dict, float, :class:`ExprRef`, Literal['height', 'width'] + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "radius" + + def __init__(self, value, **kwds): + super().__init__(value=value, **kwds) + + +@with_property_setters +class Radius2(FieldChannelMixin, core.SecondaryFieldDef): + r""" + Radius2 schema wrapper. + + A field definition of a secondary channel that shares a scale with another primary channel. + For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "radius2" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Radius2: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> Radius2: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> Radius2: ... + @overload + def bandPosition(self, _: float, /) -> Radius2: ... + @overload + def bin(self, _: None, /) -> Radius2: ... + @overload + def field(self, _: str | RepeatRef, /) -> Radius2: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Radius2: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Radius2: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Radius2: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Radius2: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + timeUnit=timeUnit, + title=title, + **kwds, + ) + + +@with_property_setters +class Radius2Datum(DatumChannelMixin, core.DatumDef): + """ + Radius2Datum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "radius2" + + @overload + def bandPosition(self, _: float, /) -> Radius2Datum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Radius2Datum: ... + @overload + def type(self, _: Type_T, /) -> Radius2Datum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, bandPosition=bandPosition, title=title, type=type, **kwds + ) + + +@with_property_setters +class Radius2Value(ValueChannelMixin, core.PositionValueDef): + """ + Radius2Value schema wrapper. + + Definition object for a constant value (primitive value or gradient definition) of an + encoding channel. + + Parameters + ---------- + value : dict, float, :class:`ExprRef`, Literal['height', 'width'] + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "radius2" + + def __init__(self, value, **kwds): + super().__init__(value=value, **kwds) + + +@with_property_setters +class Row(FieldChannelMixin, core.RowColumnEncodingFieldDef): + r""" + Row schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + align : :class:`LayoutAlign`, Literal['all', 'each', 'none'] + The alignment to apply to row/column facet's subplot. The supported string values + are ``"all"``, ``"each"``, and ``"none"``. + + * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply + placed one after the other. + * For ``"each"``, subviews will be aligned into a clean grid structure, but each row + or column may be of variable size. + * For ``"all"``, subviews will be aligned and each row or column will be sized + identically based on the maximum observed size. String values for this property + will be applied to both grid rows and columns. + + **Default value:** ``"all"``. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + center : bool + Boolean flag indicating if facet's subviews should be centered relative to their + respective rows or columns. + + **Default value:** ``false`` + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + header : dict, :class:`Header`, None + An object defining properties of a facet's header. + sort : dict, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, Sequence[dict, :class:`DateTime`], Literal['ascending', 'descending'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` is not supported for ``row`` and ``column``. + spacing : float + The spacing in pixels between facet's sub-views. + + **Default value**: Depends on ``"spacing"`` property of `the view composition + configuration `__ + (``20`` by default) + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "row" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Row: ... + @overload + def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Row: ... + @overload + def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Row: ... + @overload + def align(self, _: LayoutAlign_T, /) -> Row: ... + @overload + def bandPosition(self, _: float, /) -> Row: ... + @overload + def bin(self, _: bool | Bin | None, /) -> Row: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> Row: ... + @overload + def center(self, _: bool, /) -> Row: ... + @overload + def field(self, _: str | RepeatRef, /) -> Row: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Row: ... + @overload + def header(self, _: Header | None, /) -> Row: ... + @overload + def header( + self, + *, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelAnchor: Optional[SchemaBase | TitleAnchor_T] = Undefined, + labelAngle: Optional[float] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOrient: Optional[SchemaBase | Orient_T] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labels: Optional[bool] = Undefined, + orient: Optional[SchemaBase | Orient_T] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[SchemaBase | TitleAnchor_T] = Undefined, + titleAngle: Optional[float] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOrient: Optional[SchemaBase | Orient_T] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> Row: ... + @overload + def sort( + self, + _: Sequence[str] + | Sequence[bool] + | Sequence[float] + | EncodingSortField + | Sequence[DateTime | Temporal] + | SortOrder_T + | None, + /, + ) -> Row: ... + @overload + def sort( + self, + *, + field: Optional[str | SchemaBase | Map] = Undefined, + op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Row: ... + @overload + def spacing(self, _: float, /) -> Row: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Row: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Row: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Row: ... + @overload + def type(self, _: StandardType_T, /) -> Row: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + align: Optional[SchemaBase | LayoutAlign_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + center: Optional[bool] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + header: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | SortOrder_T + | None + ] = Undefined, + spacing: Optional[float] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + align=align, + bandPosition=bandPosition, + bin=bin, + center=center, + field=field, + header=header, + sort=sort, + spacing=spacing, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class Shape( + FieldChannelMixin, + core.FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull, +): + r""" + Shape schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + legend : dict, :class:`Legend`, None + An object defining properties of the legend. If ``null``, the legend for the + encoding channel will be removed. + + **Default value:** If undefined, default `legend properties + `__ are applied. + + **See also:** `legend `__ + documentation. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`TypeForShape`, Literal['nominal', 'ordinal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "shape" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Shape: ... + @overload + def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Shape: ... + @overload + def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Shape: ... + @overload + def bandPosition(self, _: float, /) -> Shape: ... + @overload + def bin(self, _: bool | Bin | None, /) -> Shape: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> Shape: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> Shape: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> Shape: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefstringnullExprRef], / + ) -> Shape: ... + @overload + def field(self, _: str | RepeatRef, /) -> Shape: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Shape: ... + @overload + def legend(self, _: Legend | None, /) -> Shape: ... + @overload + def legend( + self, + *, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columns: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + direction: Optional[SchemaBase | Orientation_T] = Undefined, + fillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOverlap: Optional[ + bool | Parameter | SchemaBase | Literal["greedy", "parity"] | Map + ] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[SchemaBase | LegendOrient_T] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolFillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined, + tickCount: Optional[ + float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + type: Optional[Literal["symbol", "gradient"]] = Undefined, + values: Optional[ + Parameter + | SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + ] = Undefined, + zindex: Optional[float] = Undefined, + ) -> Shape: ... + @overload + def scale(self, _: Scale | None, /) -> Shape: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> Shape: ... + @overload + def sort( + self, + _: Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[DateTime | Temporal] + | AllSortString_T + | None, + /, + ) -> Shape: ... + @overload + def sort( + self, + *, + field: Optional[str | SchemaBase | Map] = Undefined, + op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Shape: ... + @overload + def sort( + self, + *, + encoding: Optional[SchemaBase | SortByChannel_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Shape: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Shape: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Shape: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Shape: ... + @overload + def type(self, _: TypeForShape_T, /) -> Shape: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | TypeForShape_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + legend=legend, + scale=scale, + sort=sort, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class ShapeDatum( + DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefstringnull +): + """ + ShapeDatum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + condition : dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "shape" + + @overload + def bandPosition(self, _: float, /) -> ShapeDatum: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> ShapeDatum: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> ShapeDatum: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefstringnullExprRef], / + ) -> ShapeDatum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> ShapeDatum: ... + @overload + def type(self, _: Type_T, /) -> ShapeDatum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, + bandPosition=bandPosition, + condition=condition, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class ShapeValue( + ValueChannelMixin, + core.ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull, +): + """ + ShapeValue schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, :class:`ConditionalMarkPropFieldOrDatumDefTypeForShape`, :class:`ConditionalParameterMarkPropFieldOrDatumDefTypeForShape`, :class:`ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : str, dict, :class:`ExprRef`, None + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "shape" + + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | TypeForShape_T] = Undefined, + ) -> ShapeValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> ShapeValue: ... + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + empty: Optional[bool] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | TypeForShape_T] = Undefined, + ) -> ShapeValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + empty: Optional[bool] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> ShapeValue: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> ShapeValue: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> ShapeValue: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefstringnullExprRef], / + ) -> ShapeValue: ... + + def __init__( + self, + value, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + **kwds, + ): + super().__init__(value=value, condition=condition, **kwds) + + +@with_property_setters +class Size(FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefnumber): + r""" + Size schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + legend : dict, :class:`Legend`, None + An object defining properties of the legend. If ``null``, the legend for the + encoding channel will be removed. + + **Default value:** If undefined, default `legend properties + `__ are applied. + + **See also:** `legend `__ + documentation. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "size" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Size: ... + @overload + def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Size: ... + @overload + def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Size: ... + @overload + def bandPosition(self, _: float, /) -> Size: ... + @overload + def bin(self, _: bool | Bin | None, /) -> Size: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> Size: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> Size: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> Size: ... + @overload + def condition(self, _: list[core.ConditionalValueDefnumberExprRef], /) -> Size: ... + @overload + def field(self, _: str | RepeatRef, /) -> Size: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Size: ... + @overload + def legend(self, _: Legend | None, /) -> Size: ... + @overload + def legend( + self, + *, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columns: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + direction: Optional[SchemaBase | Orientation_T] = Undefined, + fillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOverlap: Optional[ + bool | Parameter | SchemaBase | Literal["greedy", "parity"] | Map + ] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[SchemaBase | LegendOrient_T] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolFillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined, + tickCount: Optional[ + float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + type: Optional[Literal["symbol", "gradient"]] = Undefined, + values: Optional[ + Parameter + | SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + ] = Undefined, + zindex: Optional[float] = Undefined, + ) -> Size: ... + @overload + def scale(self, _: Scale | None, /) -> Size: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> Size: ... + @overload + def sort( + self, + _: Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[DateTime | Temporal] + | AllSortString_T + | None, + /, + ) -> Size: ... + @overload + def sort( + self, + *, + field: Optional[str | SchemaBase | Map] = Undefined, + op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Size: ... + @overload + def sort( + self, + *, + encoding: Optional[SchemaBase | SortByChannel_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Size: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Size: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Size: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Size: ... + @overload + def type(self, _: StandardType_T, /) -> Size: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + legend=legend, + scale=scale, + sort=sort, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class SizeDatum(DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefnumber): + """ + SizeDatum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "size" + + @overload + def bandPosition(self, _: float, /) -> SizeDatum: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> SizeDatum: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> SizeDatum: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefnumberExprRef], / + ) -> SizeDatum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> SizeDatum: ... + @overload + def type(self, _: Type_T, /) -> SizeDatum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, + bandPosition=bandPosition, + condition=condition, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class SizeValue( + ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefnumber +): + """ + SizeValue schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : dict, float, :class:`ExprRef` + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "size" + + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> SizeValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> SizeValue: ... + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + empty: Optional[bool] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> SizeValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + empty: Optional[bool] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> SizeValue: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> SizeValue: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> SizeValue: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefnumberExprRef], / + ) -> SizeValue: ... + + def __init__( + self, + value, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + **kwds, + ): + super().__init__(value=value, condition=condition, **kwds) + + +@with_property_setters +class Stroke( + FieldChannelMixin, + core.FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull, +): + r""" + Stroke schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + legend : dict, :class:`Legend`, None + An object defining properties of the legend. If ``null``, the legend for the + encoding channel will be removed. + + **Default value:** If undefined, default `legend properties + `__ are applied. + + **See also:** `legend `__ + documentation. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "stroke" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Stroke: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> Stroke: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> Stroke: ... + @overload + def bandPosition(self, _: float, /) -> Stroke: ... + @overload + def bin(self, _: bool | Bin | None, /) -> Stroke: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> Stroke: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> Stroke: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> Stroke: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefGradientstringnullExprRef], / + ) -> Stroke: ... + @overload + def field(self, _: str | RepeatRef, /) -> Stroke: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Stroke: ... + @overload + def legend(self, _: Legend | None, /) -> Stroke: ... + @overload + def legend( + self, + *, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columns: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + direction: Optional[SchemaBase | Orientation_T] = Undefined, + fillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOverlap: Optional[ + bool | Parameter | SchemaBase | Literal["greedy", "parity"] | Map + ] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[SchemaBase | LegendOrient_T] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolFillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined, + tickCount: Optional[ + float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + type: Optional[Literal["symbol", "gradient"]] = Undefined, + values: Optional[ + Parameter + | SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + ] = Undefined, + zindex: Optional[float] = Undefined, + ) -> Stroke: ... + @overload + def scale(self, _: Scale | None, /) -> Stroke: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> Stroke: ... + @overload + def sort( + self, + _: Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[DateTime | Temporal] + | AllSortString_T + | None, + /, + ) -> Stroke: ... + @overload + def sort( + self, + *, + field: Optional[str | SchemaBase | Map] = Undefined, + op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Stroke: ... + @overload + def sort( + self, + *, + encoding: Optional[SchemaBase | SortByChannel_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Stroke: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Stroke: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Stroke: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Stroke: ... + @overload + def type(self, _: StandardType_T, /) -> Stroke: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + legend=legend, + scale=scale, + sort=sort, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class StrokeDatum( + DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefGradientstringnull +): + """ + StrokeDatum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "stroke" + + @overload + def bandPosition(self, _: float, /) -> StrokeDatum: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> StrokeDatum: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> StrokeDatum: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefGradientstringnullExprRef], / + ) -> StrokeDatum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> StrokeDatum: ... + @overload + def type(self, _: Type_T, /) -> StrokeDatum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, + bandPosition=bandPosition, + condition=condition, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class StrokeValue( + ValueChannelMixin, + core.ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull, +): + """ + StrokeValue schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : str, dict, :class:`ExprRef`, :class:`Gradient`, :class:`LinearGradient`, :class:`RadialGradient`, None + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "stroke" + + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> StrokeValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> StrokeValue: ... + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + empty: Optional[bool] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> StrokeValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + empty: Optional[bool] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> StrokeValue: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> StrokeValue: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> StrokeValue: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefGradientstringnullExprRef], / + ) -> StrokeValue: ... + + def __init__( + self, + value, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + **kwds, + ): + super().__init__(value=value, condition=condition, **kwds) + + +@with_property_setters +class StrokeDash( + FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray +): + r""" + StrokeDash schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + legend : dict, :class:`Legend`, None + An object defining properties of the legend. If ``null``, the legend for the + encoding channel will be removed. + + **Default value:** If undefined, default `legend properties + `__ are applied. + + **See also:** `legend `__ + documentation. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "strokeDash" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> StrokeDash: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> StrokeDash: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> StrokeDash: ... + @overload + def bandPosition(self, _: float, /) -> StrokeDash: ... + @overload + def bin(self, _: bool | Bin | None, /) -> StrokeDash: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> StrokeDash: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + ) -> StrokeDash: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + ) -> StrokeDash: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefnumberArrayExprRef], / + ) -> StrokeDash: ... + @overload + def field(self, _: str | RepeatRef, /) -> StrokeDash: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> StrokeDash: ... + @overload + def legend(self, _: Legend | None, /) -> StrokeDash: ... + @overload + def legend( + self, + *, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columns: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + direction: Optional[SchemaBase | Orientation_T] = Undefined, + fillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOverlap: Optional[ + bool | Parameter | SchemaBase | Literal["greedy", "parity"] | Map + ] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[SchemaBase | LegendOrient_T] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolFillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined, + tickCount: Optional[ + float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + type: Optional[Literal["symbol", "gradient"]] = Undefined, + values: Optional[ + Parameter + | SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + ] = Undefined, + zindex: Optional[float] = Undefined, + ) -> StrokeDash: ... + @overload + def scale(self, _: Scale | None, /) -> StrokeDash: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> StrokeDash: ... + @overload + def sort( + self, + _: Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[DateTime | Temporal] + | AllSortString_T + | None, + /, + ) -> StrokeDash: ... + @overload + def sort( + self, + *, + field: Optional[str | SchemaBase | Map] = Undefined, + op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> StrokeDash: ... + @overload + def sort( + self, + *, + encoding: Optional[SchemaBase | SortByChannel_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> StrokeDash: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> StrokeDash: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> StrokeDash: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> StrokeDash: ... + @overload + def type(self, _: StandardType_T, /) -> StrokeDash: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + legend=legend, + scale=scale, + sort=sort, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class StrokeDashDatum( + DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefnumberArray +): + """ + StrokeDashDatum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + condition : dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "strokeDash" + + @overload + def bandPosition(self, _: float, /) -> StrokeDashDatum: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + ) -> StrokeDashDatum: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + ) -> StrokeDashDatum: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefnumberArrayExprRef], / + ) -> StrokeDashDatum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> StrokeDashDatum: ... + @overload + def type(self, _: Type_T, /) -> StrokeDashDatum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, + bandPosition=bandPosition, + condition=condition, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class StrokeDashValue( + ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray +): + """ + StrokeDashValue schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : dict, Sequence[float], :class:`ExprRef` + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "strokeDash" + + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> StrokeDashValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> StrokeDashValue: ... + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + empty: Optional[bool] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> StrokeDashValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + empty: Optional[bool] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> StrokeDashValue: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + ) -> StrokeDashValue: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + ) -> StrokeDashValue: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefnumberArrayExprRef], / + ) -> StrokeDashValue: ... + + def __init__( + self, + value, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + **kwds, + ): + super().__init__(value=value, condition=condition, **kwds) + + +@with_property_setters +class StrokeOpacity( + FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefnumber +): + r""" + StrokeOpacity schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + legend : dict, :class:`Legend`, None + An object defining properties of the legend. If ``null``, the legend for the + encoding channel will be removed. + + **Default value:** If undefined, default `legend properties + `__ are applied. + + **See also:** `legend `__ + documentation. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "strokeOpacity" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> StrokeOpacity: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> StrokeOpacity: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> StrokeOpacity: ... + @overload + def bandPosition(self, _: float, /) -> StrokeOpacity: ... + @overload + def bin(self, _: bool | Bin | None, /) -> StrokeOpacity: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> StrokeOpacity: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> StrokeOpacity: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> StrokeOpacity: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefnumberExprRef], / + ) -> StrokeOpacity: ... + @overload + def field(self, _: str | RepeatRef, /) -> StrokeOpacity: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> StrokeOpacity: ... + @overload + def legend(self, _: Legend | None, /) -> StrokeOpacity: ... + @overload + def legend( + self, + *, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columns: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + direction: Optional[SchemaBase | Orientation_T] = Undefined, + fillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOverlap: Optional[ + bool | Parameter | SchemaBase | Literal["greedy", "parity"] | Map + ] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[SchemaBase | LegendOrient_T] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolFillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined, + tickCount: Optional[ + float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + type: Optional[Literal["symbol", "gradient"]] = Undefined, + values: Optional[ + Parameter + | SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + ] = Undefined, + zindex: Optional[float] = Undefined, + ) -> StrokeOpacity: ... + @overload + def scale(self, _: Scale | None, /) -> StrokeOpacity: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> StrokeOpacity: ... + @overload + def sort( + self, + _: Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[DateTime | Temporal] + | AllSortString_T + | None, + /, + ) -> StrokeOpacity: ... + @overload + def sort( + self, + *, + field: Optional[str | SchemaBase | Map] = Undefined, + op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> StrokeOpacity: ... + @overload + def sort( + self, + *, + encoding: Optional[SchemaBase | SortByChannel_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> StrokeOpacity: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> StrokeOpacity: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> StrokeOpacity: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> StrokeOpacity: ... + @overload + def type(self, _: StandardType_T, /) -> StrokeOpacity: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + legend=legend, + scale=scale, + sort=sort, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class StrokeOpacityDatum( + DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefnumber +): + """ + StrokeOpacityDatum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "strokeOpacity" + + @overload + def bandPosition(self, _: float, /) -> StrokeOpacityDatum: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> StrokeOpacityDatum: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> StrokeOpacityDatum: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefnumberExprRef], / + ) -> StrokeOpacityDatum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> StrokeOpacityDatum: ... + @overload + def type(self, _: Type_T, /) -> StrokeOpacityDatum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, + bandPosition=bandPosition, + condition=condition, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class StrokeOpacityValue( + ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefnumber +): + """ + StrokeOpacityValue schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : dict, float, :class:`ExprRef` + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "strokeOpacity" + + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> StrokeOpacityValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> StrokeOpacityValue: ... + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + empty: Optional[bool] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> StrokeOpacityValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + empty: Optional[bool] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> StrokeOpacityValue: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> StrokeOpacityValue: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> StrokeOpacityValue: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefnumberExprRef], / + ) -> StrokeOpacityValue: ... + + def __init__( + self, + value, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + **kwds, + ): + super().__init__(value=value, condition=condition, **kwds) + + +@with_property_setters +class StrokeWidth( + FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefnumber +): + r""" + StrokeWidth schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + legend : dict, :class:`Legend`, None + An object defining properties of the legend. If ``null``, the legend for the + encoding channel will be removed. + + **Default value:** If undefined, default `legend properties + `__ are applied. + + **See also:** `legend `__ + documentation. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "strokeWidth" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> StrokeWidth: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> StrokeWidth: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> StrokeWidth: ... + @overload + def bandPosition(self, _: float, /) -> StrokeWidth: ... + @overload + def bin(self, _: bool | Bin | None, /) -> StrokeWidth: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> StrokeWidth: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> StrokeWidth: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> StrokeWidth: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefnumberExprRef], / + ) -> StrokeWidth: ... + @overload + def field(self, _: str | RepeatRef, /) -> StrokeWidth: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> StrokeWidth: ... + @overload + def legend(self, _: Legend | None, /) -> StrokeWidth: ... + @overload + def legend( + self, + *, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columns: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + direction: Optional[SchemaBase | Orientation_T] = Undefined, + fillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOverlap: Optional[ + bool | Parameter | SchemaBase | Literal["greedy", "parity"] | Map + ] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[SchemaBase | LegendOrient_T] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolFillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined, + tickCount: Optional[ + float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + type: Optional[Literal["symbol", "gradient"]] = Undefined, + values: Optional[ + Parameter + | SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + ] = Undefined, + zindex: Optional[float] = Undefined, + ) -> StrokeWidth: ... + @overload + def scale(self, _: Scale | None, /) -> StrokeWidth: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> StrokeWidth: ... + @overload + def sort( + self, + _: Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[DateTime | Temporal] + | AllSortString_T + | None, + /, + ) -> StrokeWidth: ... + @overload + def sort( + self, + *, + field: Optional[str | SchemaBase | Map] = Undefined, + op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> StrokeWidth: ... + @overload + def sort( + self, + *, + encoding: Optional[SchemaBase | SortByChannel_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> StrokeWidth: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> StrokeWidth: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> StrokeWidth: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> StrokeWidth: ... + @overload + def type(self, _: StandardType_T, /) -> StrokeWidth: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + legend=legend, + scale=scale, + sort=sort, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class StrokeWidthDatum( + DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefnumber +): + """ + StrokeWidthDatum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "strokeWidth" + + @overload + def bandPosition(self, _: float, /) -> StrokeWidthDatum: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> StrokeWidthDatum: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> StrokeWidthDatum: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefnumberExprRef], / + ) -> StrokeWidthDatum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> StrokeWidthDatum: ... + @overload + def type(self, _: Type_T, /) -> StrokeWidthDatum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, + bandPosition=bandPosition, + condition=condition, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class StrokeWidthValue( + ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefnumber +): + """ + StrokeWidthValue schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : dict, float, :class:`ExprRef` + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "strokeWidth" + + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> StrokeWidthValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> StrokeWidthValue: ... + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + empty: Optional[bool] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> StrokeWidthValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + empty: Optional[bool] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> StrokeWidthValue: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> StrokeWidthValue: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ) -> StrokeWidthValue: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefnumberExprRef], / + ) -> StrokeWidthValue: ... + + def __init__( + self, + value, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + **kwds, + ): + super().__init__(value=value, condition=condition, **kwds) + + +@with_property_setters +class Text(FieldChannelMixin, core.FieldOrDatumDefWithConditionStringFieldDefText): + r""" + Text schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`, Sequence[dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + format : str, dict, :class:`Dict` + When used with the default ``"number"`` and ``"time"`` format type, the text + formatting pattern for labels of guides (axes, legends, headers) and text marks. + + * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's + `number format pattern `__. + * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time + format pattern `__. + + See the `format documentation `__ + for more examples. + + When used with a `custom formatType + `__, this + value will be passed as ``format`` alongside ``datum.value`` to the registered + function. + + **Default value:** Derived from `numberFormat + `__ config for number + format and from `timeFormat + `__ config for time + format. + formatType : str + The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom + format type + `__. + + **Default value:** + + * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``. + * ``"number"`` for quantitative fields as well as ordinal and nominal fields without + ``timeUnit``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "text" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Text: ... + @overload + def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Text: ... + @overload + def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Text: ... + @overload + def bandPosition(self, _: float, /) -> Text: ... + @overload + def bin(self, _: bool | Bin | Literal["binned"] | None, /) -> Text: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> Text: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined, + ) -> Text: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined, + ) -> Text: ... + @overload + def condition(self, _: list[core.ConditionalValueDefTextExprRef], /) -> Text: ... + @overload + def field(self, _: str | RepeatRef, /) -> Text: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Text: ... + @overload + def format(self, _: str, /) -> Text: ... + @overload + def format(self, _: Map, /) -> Text: ... + @overload + def formatType(self, _: str, /) -> Text: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Text: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Text: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Text: ... + @overload + def type(self, _: StandardType_T, /) -> Text: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + format=format, + formatType=formatType, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class TextDatum(DatumChannelMixin, core.FieldOrDatumDefWithConditionStringDatumDefText): + """ + TextDatum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + condition : dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`, Sequence[dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + format : str, dict, :class:`Dict` + When used with the default ``"number"`` and ``"time"`` format type, the text + formatting pattern for labels of guides (axes, legends, headers) and text marks. + + * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's + `number format pattern `__. + * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time + format pattern `__. + + See the `format documentation `__ + for more examples. + + When used with a `custom formatType + `__, this + value will be passed as ``format`` alongside ``datum.value`` to the registered + function. + + **Default value:** Derived from `numberFormat + `__ config for number + format and from `timeFormat + `__ config for time + format. + formatType : str + The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom + format type + `__. + + **Default value:** + + * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``. + * ``"number"`` for quantitative fields as well as ordinal and nominal fields without + ``timeUnit``. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "text" + + @overload + def bandPosition(self, _: float, /) -> TextDatum: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined, + ) -> TextDatum: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined, + ) -> TextDatum: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefTextExprRef], / + ) -> TextDatum: ... + @overload + def format(self, _: str, /) -> TextDatum: ... + @overload + def format(self, _: Map, /) -> TextDatum: ... + @overload + def formatType(self, _: str, /) -> TextDatum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> TextDatum: ... + @overload + def type(self, _: Type_T, /) -> TextDatum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, + bandPosition=bandPosition, + condition=condition, + format=format, + formatType=formatType, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class TextValue(ValueChannelMixin, core.ValueDefWithConditionStringFieldDefText): + """ + TextValue schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalStringFieldDef`, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterStringFieldDef`, :class:`ConditionalPredicateStringFieldDef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`, Sequence[dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef` + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "text" + + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> TextValue: ... + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + empty: Optional[bool] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> TextValue: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined, + ) -> TextValue: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined, + ) -> TextValue: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefTextExprRef], / + ) -> TextValue: ... + + def __init__( + self, + value, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + **kwds, + ): + super().__init__(value=value, condition=condition, **kwds) + + +@with_property_setters +class Theta(FieldChannelMixin, core.PositionFieldDefBase): + r""" + Theta schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None + Type of stacking offset if the field should be stacked. ``stack`` is only applicable + for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For + example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar + chart. + + ``stack`` can be one of the following values: + + * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale + (for creating typical stacked `bar + `__ and `area + `__ chart). + * ``"normalize"`` - stacking with normalized domain (for creating `normalized + stacked bar and area charts + `__ and pie charts + `with percentage tooltip + `__). + * ``"center"`` - stacking with center baseline (for `streamgraph + `__). + * ``null`` or ``false`` - No-stacking. This will produce layered `bar + `__ and area + chart. + + **Default value:** ``zero`` for plots with all of the following conditions are true: + (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or + y) has a linear scale; (3) At least one of non-position channels mapped to an + unaggregated field that is different from x and y. Otherwise, ``null`` by default. + + **See also:** `stack `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "theta" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Theta: ... + @overload + def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Theta: ... + @overload + def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Theta: ... + @overload + def bandPosition(self, _: float, /) -> Theta: ... + @overload + def bin(self, _: bool | Bin | Literal["binned"] | None, /) -> Theta: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> Theta: ... + @overload + def field(self, _: str | RepeatRef, /) -> Theta: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Theta: ... + @overload + def scale(self, _: Scale | None, /) -> Theta: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> Theta: ... + @overload + def sort( + self, + _: Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[DateTime | Temporal] + | AllSortString_T + | None, + /, + ) -> Theta: ... + @overload + def sort( + self, + *, + field: Optional[str | SchemaBase | Map] = Undefined, + op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Theta: ... + @overload + def sort( + self, + *, + encoding: Optional[SchemaBase | SortByChannel_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Theta: ... + @overload + def stack(self, _: bool | StackOffset_T | None, /) -> Theta: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Theta: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Theta: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Theta: ... + @overload + def type(self, _: StandardType_T, /) -> Theta: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + scale=scale, + sort=sort, + stack=stack, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class ThetaDatum(DatumChannelMixin, core.PositionDatumDefBase): + """ + ThetaDatum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None + Type of stacking offset if the field should be stacked. ``stack`` is only applicable + for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For + example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar + chart. + + ``stack`` can be one of the following values: + + * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale + (for creating typical stacked `bar + `__ and `area + `__ chart). + * ``"normalize"`` - stacking with normalized domain (for creating `normalized + stacked bar and area charts + `__ and pie charts + `with percentage tooltip + `__). + * ``"center"`` - stacking with center baseline (for `streamgraph + `__). + * ``null`` or ``false`` - No-stacking. This will produce layered `bar + `__ and area + chart. + + **Default value:** ``zero`` for plots with all of the following conditions are true: + (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or + y) has a linear scale; (3) At least one of non-position channels mapped to an + unaggregated field that is different from x and y. Otherwise, ``null`` by default. + + **See also:** `stack `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "theta" + + @overload + def bandPosition(self, _: float, /) -> ThetaDatum: ... + @overload + def scale(self, _: Scale | None, /) -> ThetaDatum: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> ThetaDatum: ... + @overload + def stack(self, _: bool | StackOffset_T | None, /) -> ThetaDatum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> ThetaDatum: ... + @overload + def type(self, _: Type_T, /) -> ThetaDatum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, + bandPosition=bandPosition, + scale=scale, + stack=stack, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class ThetaValue(ValueChannelMixin, core.PositionValueDef): + """ + ThetaValue schema wrapper. + + Definition object for a constant value (primitive value or gradient definition) of an + encoding channel. + + Parameters + ---------- + value : dict, float, :class:`ExprRef`, Literal['height', 'width'] + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "theta" + + def __init__(self, value, **kwds): + super().__init__(value=value, **kwds) + + +@with_property_setters +class Theta2(FieldChannelMixin, core.SecondaryFieldDef): + r""" + Theta2 schema wrapper. + + A field definition of a secondary channel that shares a scale with another primary channel. + For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "theta2" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Theta2: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> Theta2: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> Theta2: ... + @overload + def bandPosition(self, _: float, /) -> Theta2: ... + @overload + def bin(self, _: None, /) -> Theta2: ... + @overload + def field(self, _: str | RepeatRef, /) -> Theta2: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Theta2: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Theta2: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Theta2: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Theta2: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + timeUnit=timeUnit, + title=title, + **kwds, + ) + + +@with_property_setters +class Theta2Datum(DatumChannelMixin, core.DatumDef): + """ + Theta2Datum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "theta2" + + @overload + def bandPosition(self, _: float, /) -> Theta2Datum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Theta2Datum: ... + @overload + def type(self, _: Type_T, /) -> Theta2Datum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, bandPosition=bandPosition, title=title, type=type, **kwds + ) + + +@with_property_setters +class Theta2Value(ValueChannelMixin, core.PositionValueDef): + """ + Theta2Value schema wrapper. + + Definition object for a constant value (primitive value or gradient definition) of an + encoding channel. + + Parameters + ---------- + value : dict, float, :class:`ExprRef`, Literal['height', 'width'] + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "theta2" + + def __init__(self, value, **kwds): + super().__init__(value=value, **kwds) + + +@with_property_setters +class Tooltip(FieldChannelMixin, core.StringFieldDefWithCondition): + r""" + Tooltip schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`, Sequence[dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + format : str, dict, :class:`Dict` + When used with the default ``"number"`` and ``"time"`` format type, the text + formatting pattern for labels of guides (axes, legends, headers) and text marks. + + * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's + `number format pattern `__. + * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time + format pattern `__. + + See the `format documentation `__ + for more examples. + + When used with a `custom formatType + `__, this + value will be passed as ``format`` alongside ``datum.value`` to the registered + function. + + **Default value:** Derived from `numberFormat + `__ config for number + format and from `timeFormat + `__ config for time + format. + formatType : str + The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom + format type + `__. + + **Default value:** + + * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``. + * ``"number"`` for quantitative fields as well as ordinal and nominal fields without + ``timeUnit``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "tooltip" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Tooltip: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> Tooltip: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> Tooltip: ... + @overload + def bandPosition(self, _: float, /) -> Tooltip: ... + @overload + def bin(self, _: bool | Bin | Literal["binned"] | None, /) -> Tooltip: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> Tooltip: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map] = Undefined, + ) -> Tooltip: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map] = Undefined, + ) -> Tooltip: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefstringExprRef], / + ) -> Tooltip: ... + @overload + def field(self, _: str | RepeatRef, /) -> Tooltip: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Tooltip: ... + @overload + def format(self, _: str, /) -> Tooltip: ... + @overload + def format(self, _: Map, /) -> Tooltip: ... + @overload + def formatType(self, _: str, /) -> Tooltip: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Tooltip: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Tooltip: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Tooltip: ... + @overload + def type(self, _: StandardType_T, /) -> Tooltip: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + format=format, + formatType=formatType, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class TooltipValue(ValueChannelMixin, core.StringValueDefWithCondition): + """ + TooltipValue schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : str, dict, :class:`ExprRef`, None + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "tooltip" + + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> TooltipValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> TooltipValue: ... + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + empty: Optional[bool] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> TooltipValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + empty: Optional[bool] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> TooltipValue: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> TooltipValue: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> TooltipValue: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefstringnullExprRef], / + ) -> TooltipValue: ... + + def __init__( + self, + value, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + **kwds, + ): + super().__init__(value=value, condition=condition, **kwds) + + +@with_property_setters +class Url(FieldChannelMixin, core.StringFieldDefWithCondition): + r""" + Url schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`, Sequence[dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + format : str, dict, :class:`Dict` + When used with the default ``"number"`` and ``"time"`` format type, the text + formatting pattern for labels of guides (axes, legends, headers) and text marks. + + * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's + `number format pattern `__. + * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time + format pattern `__. + + See the `format documentation `__ + for more examples. + + When used with a `custom formatType + `__, this + value will be passed as ``format`` alongside ``datum.value`` to the registered + function. + + **Default value:** Derived from `numberFormat + `__ config for number + format and from `timeFormat + `__ config for time + format. + formatType : str + The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom + format type + `__. + + **Default value:** + + * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``. + * ``"number"`` for quantitative fields as well as ordinal and nominal fields without + ``timeUnit``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "url" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Url: ... + @overload + def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Url: ... + @overload + def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Url: ... + @overload + def bandPosition(self, _: float, /) -> Url: ... + @overload + def bin(self, _: bool | Bin | Literal["binned"] | None, /) -> Url: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> Url: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map] = Undefined, + ) -> Url: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map] = Undefined, + ) -> Url: ... + @overload + def condition(self, _: list[core.ConditionalValueDefstringExprRef], /) -> Url: ... + @overload + def field(self, _: str | RepeatRef, /) -> Url: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Url: ... + @overload + def format(self, _: str, /) -> Url: ... + @overload + def format(self, _: Map, /) -> Url: ... + @overload + def formatType(self, _: str, /) -> Url: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Url: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Url: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Url: ... + @overload + def type(self, _: StandardType_T, /) -> Url: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + format=format, + formatType=formatType, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class UrlValue(ValueChannelMixin, core.StringValueDefWithCondition): + """ + UrlValue schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : str, dict, :class:`ExprRef`, None + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "url" + + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> UrlValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + test: Optional[str | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> UrlValue: ... + @overload + def condition( + self, + *, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + empty: Optional[bool] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + ) -> UrlValue: ... + @overload + def condition( + self, + *, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + empty: Optional[bool] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + ) -> UrlValue: ... + @overload + def condition( + self, + *, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> UrlValue: ... + @overload + def condition( + self, + *, + empty: Optional[bool] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + ) -> UrlValue: ... + @overload + def condition( + self, _: list[core.ConditionalValueDefstringnullExprRef], / + ) -> UrlValue: ... + + def __init__( + self, + value, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + **kwds, + ): + super().__init__(value=value, condition=condition, **kwds) + + +@with_property_setters +class X(FieldChannelMixin, core.PositionFieldDef): + r""" + X schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + axis : dict, :class:`Axis`, None + An object defining properties of axis's gridlines, ticks and labels. If ``null``, + the axis for the encoding channel will be removed. + + **Default value:** If undefined, default `axis properties + `__ are applied. + + **See also:** `axis `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + impute : dict, :class:`ImputeParams`, None + An object defining the properties of the Impute Operation to be applied. The field + value of the other positional channel is taken as ``key`` of the ``Impute`` + Operation. The field of the ``color`` channel if specified is used as ``groupby`` of + the ``Impute`` Operation. + + **See also:** `impute `__ + documentation. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None + Type of stacking offset if the field should be stacked. ``stack`` is only applicable + for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For + example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar + chart. + + ``stack`` can be one of the following values: + + * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale + (for creating typical stacked `bar + `__ and `area + `__ chart). + * ``"normalize"`` - stacking with normalized domain (for creating `normalized + stacked bar and area charts + `__ and pie charts + `with percentage tooltip + `__). + * ``"center"`` - stacking with center baseline (for `streamgraph + `__). + * ``null`` or ``false`` - No-stacking. This will produce layered `bar + `__ and area + chart. + + **Default value:** ``zero`` for plots with all of the following conditions are true: + (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or + y) has a linear scale; (3) At least one of non-position channels mapped to an + unaggregated field that is different from x and y. Otherwise, ``null`` by default. + + **See also:** `stack `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "x" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> X: ... + @overload + def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> X: ... + @overload + def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> X: ... + @overload + def axis(self, _: Axis | None, /) -> X: ... + @overload + def axis( + self, + *, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + bandPosition: Optional[float | Parameter | SchemaBase | Map] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[bool] = Undefined, + domainCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + domainColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + domainDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + domainDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + grid: Optional[bool] = Undefined, + gridCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + gridColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + gridDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + gridDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelBound: Optional[bool | float | Parameter | SchemaBase | Map] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFlush: Optional[bool | float] = Undefined, + labelFlushOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOverlap: Optional[ + bool | Parameter | SchemaBase | Literal["greedy", "parity"] | Map + ] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labels: Optional[bool] = Undefined, + maxExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + minExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[Parameter | SchemaBase | Map | AxisOrient_T] = Undefined, + position: Optional[float | Parameter | SchemaBase | Map] = Undefined, + style: Optional[str | Sequence[str]] = Undefined, + tickBand: Optional[ + Parameter | SchemaBase | Literal["center", "extent"] | Map + ] = Undefined, + tickCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + tickColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + tickCount: Optional[ + float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + tickDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + tickDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickExtra: Optional[bool] = Undefined, + tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickRound: Optional[bool] = Undefined, + tickSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ticks: Optional[bool] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined, + titleAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleX: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleY: Optional[float | Parameter | SchemaBase | Map] = Undefined, + translate: Optional[float | Parameter | SchemaBase | Map] = Undefined, + values: Optional[ + Parameter + | SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + ] = Undefined, + zindex: Optional[float] = Undefined, + ) -> X: ... + @overload + def bandPosition(self, _: float, /) -> X: ... + @overload + def bin(self, _: bool | Bin | Literal["binned"] | None, /) -> X: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> X: ... + @overload + def field(self, _: str | RepeatRef, /) -> X: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> X: ... + @overload + def impute(self, _: Impute | None, /) -> X: ... + @overload + def impute( + self, + *, + frame: Optional[Sequence[float | None]] = Undefined, + keyvals: Optional[SchemaBase | Sequence[Any] | Map] = Undefined, + method: Optional[SchemaBase | ImputeMethod_T] = Undefined, + value: Optional[Any] = Undefined, + ) -> X: ... + @overload + def scale(self, _: Scale | None, /) -> X: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> X: ... + @overload + def sort( + self, + _: Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[DateTime | Temporal] + | AllSortString_T + | None, + /, + ) -> X: ... + @overload + def sort( + self, + *, + field: Optional[str | SchemaBase | Map] = Undefined, + op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> X: ... + @overload + def sort( + self, + *, + encoding: Optional[SchemaBase | SortByChannel_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> X: ... + @overload + def stack(self, _: bool | StackOffset_T | None, /) -> X: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> X: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> X: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> X: ... + @overload + def type(self, _: StandardType_T, /) -> X: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + axis: Optional[SchemaBase | Map | None] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + impute: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + axis=axis, + bandPosition=bandPosition, + bin=bin, + field=field, + impute=impute, + scale=scale, + sort=sort, + stack=stack, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class XDatum(DatumChannelMixin, core.PositionDatumDef): + """ + XDatum schema wrapper. + + Parameters + ---------- + axis : dict, :class:`Axis`, None + An object defining properties of axis's gridlines, ticks and labels. If ``null``, + the axis for the encoding channel will be removed. + + **Default value:** If undefined, default `axis properties + `__ are applied. + + **See also:** `axis `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + impute : dict, :class:`ImputeParams`, None + An object defining the properties of the Impute Operation to be applied. The field + value of the other positional channel is taken as ``key`` of the ``Impute`` + Operation. The field of the ``color`` channel if specified is used as ``groupby`` of + the ``Impute`` Operation. + + **See also:** `impute `__ + documentation. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None + Type of stacking offset if the field should be stacked. ``stack`` is only applicable + for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For + example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar + chart. + + ``stack`` can be one of the following values: + + * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale + (for creating typical stacked `bar + `__ and `area + `__ chart). + * ``"normalize"`` - stacking with normalized domain (for creating `normalized + stacked bar and area charts + `__ and pie charts + `with percentage tooltip + `__). + * ``"center"`` - stacking with center baseline (for `streamgraph + `__). + * ``null`` or ``false`` - No-stacking. This will produce layered `bar + `__ and area + chart. + + **Default value:** ``zero`` for plots with all of the following conditions are true: + (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or + y) has a linear scale; (3) At least one of non-position channels mapped to an + unaggregated field that is different from x and y. Otherwise, ``null`` by default. + + **See also:** `stack `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "x" + + @overload + def axis(self, _: Axis | None, /) -> XDatum: ... + @overload + def axis( + self, + *, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + bandPosition: Optional[float | Parameter | SchemaBase | Map] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[bool] = Undefined, + domainCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + domainColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + domainDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + domainDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + grid: Optional[bool] = Undefined, + gridCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + gridColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + gridDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + gridDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelBound: Optional[bool | float | Parameter | SchemaBase | Map] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFlush: Optional[bool | float] = Undefined, + labelFlushOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOverlap: Optional[ + bool | Parameter | SchemaBase | Literal["greedy", "parity"] | Map + ] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labels: Optional[bool] = Undefined, + maxExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + minExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[Parameter | SchemaBase | Map | AxisOrient_T] = Undefined, + position: Optional[float | Parameter | SchemaBase | Map] = Undefined, + style: Optional[str | Sequence[str]] = Undefined, + tickBand: Optional[ + Parameter | SchemaBase | Literal["center", "extent"] | Map + ] = Undefined, + tickCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + tickColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + tickCount: Optional[ + float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + tickDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + tickDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickExtra: Optional[bool] = Undefined, + tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickRound: Optional[bool] = Undefined, + tickSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ticks: Optional[bool] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined, + titleAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleX: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleY: Optional[float | Parameter | SchemaBase | Map] = Undefined, + translate: Optional[float | Parameter | SchemaBase | Map] = Undefined, + values: Optional[ + Parameter + | SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + ] = Undefined, + zindex: Optional[float] = Undefined, + ) -> XDatum: ... + @overload + def bandPosition(self, _: float, /) -> XDatum: ... + @overload + def impute(self, _: Impute | None, /) -> XDatum: ... + @overload + def impute( + self, + *, + frame: Optional[Sequence[float | None]] = Undefined, + keyvals: Optional[SchemaBase | Sequence[Any] | Map] = Undefined, + method: Optional[SchemaBase | ImputeMethod_T] = Undefined, + value: Optional[Any] = Undefined, + ) -> XDatum: ... + @overload + def scale(self, _: Scale | None, /) -> XDatum: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> XDatum: ... + @overload + def stack(self, _: bool | StackOffset_T | None, /) -> XDatum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> XDatum: ... + @overload + def type(self, _: Type_T, /) -> XDatum: ... + + def __init__( + self, + datum, + axis: Optional[SchemaBase | Map | None] = Undefined, + bandPosition: Optional[float] = Undefined, + impute: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, + axis=axis, + bandPosition=bandPosition, + impute=impute, + scale=scale, + stack=stack, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class XValue(ValueChannelMixin, core.PositionValueDef): + """ + XValue schema wrapper. + + Definition object for a constant value (primitive value or gradient definition) of an + encoding channel. + + Parameters + ---------- + value : dict, float, :class:`ExprRef`, Literal['height', 'width'] + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "x" + + def __init__(self, value, **kwds): + super().__init__(value=value, **kwds) + + +@with_property_setters +class X2(FieldChannelMixin, core.SecondaryFieldDef): + r""" + X2 schema wrapper. + + A field definition of a secondary channel that shares a scale with another primary channel. + For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "x2" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> X2: ... + @overload + def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> X2: ... + @overload + def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> X2: ... + @overload + def bandPosition(self, _: float, /) -> X2: ... + @overload + def bin(self, _: None, /) -> X2: ... + @overload + def field(self, _: str | RepeatRef, /) -> X2: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> X2: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> X2: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> X2: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> X2: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + timeUnit=timeUnit, + title=title, + **kwds, + ) + + +@with_property_setters +class X2Datum(DatumChannelMixin, core.DatumDef): + """ + X2Datum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "x2" + + @overload + def bandPosition(self, _: float, /) -> X2Datum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> X2Datum: ... + @overload + def type(self, _: Type_T, /) -> X2Datum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, bandPosition=bandPosition, title=title, type=type, **kwds + ) + + +@with_property_setters +class X2Value(ValueChannelMixin, core.PositionValueDef): + """ + X2Value schema wrapper. + + Definition object for a constant value (primitive value or gradient definition) of an + encoding channel. + + Parameters + ---------- + value : dict, float, :class:`ExprRef`, Literal['height', 'width'] + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "x2" + + def __init__(self, value, **kwds): + super().__init__(value=value, **kwds) + + +@with_property_setters +class XError(FieldChannelMixin, core.SecondaryFieldDef): + r""" + XError schema wrapper. + + A field definition of a secondary channel that shares a scale with another primary channel. + For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "xError" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> XError: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> XError: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> XError: ... + @overload + def bandPosition(self, _: float, /) -> XError: ... + @overload + def bin(self, _: None, /) -> XError: ... + @overload + def field(self, _: str | RepeatRef, /) -> XError: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> XError: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> XError: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> XError: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> XError: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + timeUnit=timeUnit, + title=title, + **kwds, + ) + + +@with_property_setters +class XErrorValue(ValueChannelMixin, core.ValueDefnumber): + """ + XErrorValue schema wrapper. + + Definition object for a constant value (primitive value or gradient definition) of an + encoding channel. + + Parameters + ---------- + value : float + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "xError" + + def __init__(self, value, **kwds): + super().__init__(value=value, **kwds) + + +@with_property_setters +class XError2(FieldChannelMixin, core.SecondaryFieldDef): + r""" + XError2 schema wrapper. + + A field definition of a secondary channel that shares a scale with another primary channel. + For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "xError2" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> XError2: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> XError2: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> XError2: ... + @overload + def bandPosition(self, _: float, /) -> XError2: ... + @overload + def bin(self, _: None, /) -> XError2: ... + @overload + def field(self, _: str | RepeatRef, /) -> XError2: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> XError2: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> XError2: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> XError2: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> XError2: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + timeUnit=timeUnit, + title=title, + **kwds, + ) + + +@with_property_setters +class XError2Value(ValueChannelMixin, core.ValueDefnumber): + """ + XError2Value schema wrapper. + + Definition object for a constant value (primitive value or gradient definition) of an + encoding channel. + + Parameters + ---------- + value : float + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "xError2" + + def __init__(self, value, **kwds): + super().__init__(value=value, **kwds) + + +@with_property_setters +class XOffset(FieldChannelMixin, core.ScaleFieldDef): + r""" + XOffset schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "xOffset" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> XOffset: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> XOffset: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> XOffset: ... + @overload + def bandPosition(self, _: float, /) -> XOffset: ... + @overload + def bin(self, _: bool | Bin | None, /) -> XOffset: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> XOffset: ... + @overload + def field(self, _: str | RepeatRef, /) -> XOffset: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> XOffset: ... + @overload + def scale(self, _: Scale | None, /) -> XOffset: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> XOffset: ... + @overload + def sort( + self, + _: Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[DateTime | Temporal] + | AllSortString_T + | None, + /, + ) -> XOffset: ... + @overload + def sort( + self, + *, + field: Optional[str | SchemaBase | Map] = Undefined, + op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> XOffset: ... + @overload + def sort( + self, + *, + encoding: Optional[SchemaBase | SortByChannel_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> XOffset: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> XOffset: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> XOffset: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> XOffset: ... + @overload + def type(self, _: StandardType_T, /) -> XOffset: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + scale=scale, + sort=sort, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class XOffsetDatum(DatumChannelMixin, core.ScaleDatumDef): + """ + XOffsetDatum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "xOffset" + + @overload + def bandPosition(self, _: float, /) -> XOffsetDatum: ... + @overload + def scale(self, _: Scale | None, /) -> XOffsetDatum: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> XOffsetDatum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> XOffsetDatum: ... + @overload + def type(self, _: Type_T, /) -> XOffsetDatum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, + bandPosition=bandPosition, + scale=scale, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class XOffsetValue(ValueChannelMixin, core.ValueDefnumber): + """ + XOffsetValue schema wrapper. + + Definition object for a constant value (primitive value or gradient definition) of an + encoding channel. + + Parameters + ---------- + value : float + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "xOffset" + + def __init__(self, value, **kwds): + super().__init__(value=value, **kwds) + + +@with_property_setters +class Y(FieldChannelMixin, core.PositionFieldDef): + r""" + Y schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + axis : dict, :class:`Axis`, None + An object defining properties of axis's gridlines, ticks and labels. If ``null``, + the axis for the encoding channel will be removed. + + **Default value:** If undefined, default `axis properties + `__ are applied. + + **See also:** `axis `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + impute : dict, :class:`ImputeParams`, None + An object defining the properties of the Impute Operation to be applied. The field + value of the other positional channel is taken as ``key`` of the ``Impute`` + Operation. The field of the ``color`` channel if specified is used as ``groupby`` of + the ``Impute`` Operation. + + **See also:** `impute `__ + documentation. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None + Type of stacking offset if the field should be stacked. ``stack`` is only applicable + for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For + example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar + chart. + + ``stack`` can be one of the following values: + + * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale + (for creating typical stacked `bar + `__ and `area + `__ chart). + * ``"normalize"`` - stacking with normalized domain (for creating `normalized + stacked bar and area charts + `__ and pie charts + `with percentage tooltip + `__). + * ``"center"`` - stacking with center baseline (for `streamgraph + `__). + * ``null`` or ``false`` - No-stacking. This will produce layered `bar + `__ and area + chart. + + **Default value:** ``zero`` for plots with all of the following conditions are true: + (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or + y) has a linear scale; (3) At least one of non-position channels mapped to an + unaggregated field that is different from x and y. Otherwise, ``null`` by default. + + **See also:** `stack `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "y" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Y: ... + @overload + def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Y: ... + @overload + def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Y: ... + @overload + def axis(self, _: Axis | None, /) -> Y: ... + @overload + def axis( + self, + *, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + bandPosition: Optional[float | Parameter | SchemaBase | Map] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[bool] = Undefined, + domainCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + domainColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + domainDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + domainDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + grid: Optional[bool] = Undefined, + gridCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + gridColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + gridDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + gridDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelBound: Optional[bool | float | Parameter | SchemaBase | Map] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFlush: Optional[bool | float] = Undefined, + labelFlushOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOverlap: Optional[ + bool | Parameter | SchemaBase | Literal["greedy", "parity"] | Map + ] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labels: Optional[bool] = Undefined, + maxExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + minExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[Parameter | SchemaBase | Map | AxisOrient_T] = Undefined, + position: Optional[float | Parameter | SchemaBase | Map] = Undefined, + style: Optional[str | Sequence[str]] = Undefined, + tickBand: Optional[ + Parameter | SchemaBase | Literal["center", "extent"] | Map + ] = Undefined, + tickCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + tickColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + tickCount: Optional[ + float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + tickDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + tickDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickExtra: Optional[bool] = Undefined, + tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickRound: Optional[bool] = Undefined, + tickSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ticks: Optional[bool] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined, + titleAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleX: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleY: Optional[float | Parameter | SchemaBase | Map] = Undefined, + translate: Optional[float | Parameter | SchemaBase | Map] = Undefined, + values: Optional[ + Parameter + | SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + ] = Undefined, + zindex: Optional[float] = Undefined, + ) -> Y: ... + @overload + def bandPosition(self, _: float, /) -> Y: ... + @overload + def bin(self, _: bool | Bin | Literal["binned"] | None, /) -> Y: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> Y: ... + @overload + def field(self, _: str | RepeatRef, /) -> Y: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Y: ... + @overload + def impute(self, _: Impute | None, /) -> Y: ... + @overload + def impute( + self, + *, + frame: Optional[Sequence[float | None]] = Undefined, + keyvals: Optional[SchemaBase | Sequence[Any] | Map] = Undefined, + method: Optional[SchemaBase | ImputeMethod_T] = Undefined, + value: Optional[Any] = Undefined, + ) -> Y: ... + @overload + def scale(self, _: Scale | None, /) -> Y: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> Y: ... + @overload + def sort( + self, + _: Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[DateTime | Temporal] + | AllSortString_T + | None, + /, + ) -> Y: ... + @overload + def sort( + self, + *, + field: Optional[str | SchemaBase | Map] = Undefined, + op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Y: ... + @overload + def sort( + self, + *, + encoding: Optional[SchemaBase | SortByChannel_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> Y: ... + @overload + def stack(self, _: bool | StackOffset_T | None, /) -> Y: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Y: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Y: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Y: ... + @overload + def type(self, _: StandardType_T, /) -> Y: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + axis: Optional[SchemaBase | Map | None] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + impute: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + axis=axis, + bandPosition=bandPosition, + bin=bin, + field=field, + impute=impute, + scale=scale, + sort=sort, + stack=stack, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class YDatum(DatumChannelMixin, core.PositionDatumDef): + """ + YDatum schema wrapper. + + Parameters + ---------- + axis : dict, :class:`Axis`, None + An object defining properties of axis's gridlines, ticks and labels. If ``null``, + the axis for the encoding channel will be removed. + + **Default value:** If undefined, default `axis properties + `__ are applied. + + **See also:** `axis `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + impute : dict, :class:`ImputeParams`, None + An object defining the properties of the Impute Operation to be applied. The field + value of the other positional channel is taken as ``key`` of the ``Impute`` + Operation. The field of the ``color`` channel if specified is used as ``groupby`` of + the ``Impute`` Operation. + + **See also:** `impute `__ + documentation. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None + Type of stacking offset if the field should be stacked. ``stack`` is only applicable + for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For + example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar + chart. + + ``stack`` can be one of the following values: + + * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale + (for creating typical stacked `bar + `__ and `area + `__ chart). + * ``"normalize"`` - stacking with normalized domain (for creating `normalized + stacked bar and area charts + `__ and pie charts + `with percentage tooltip + `__). + * ``"center"`` - stacking with center baseline (for `streamgraph + `__). + * ``null`` or ``false`` - No-stacking. This will produce layered `bar + `__ and area + chart. + + **Default value:** ``zero`` for plots with all of the following conditions are true: + (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or + y) has a linear scale; (3) At least one of non-position channels mapped to an + unaggregated field that is different from x and y. Otherwise, ``null`` by default. + + **See also:** `stack `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "y" + + @overload + def axis(self, _: Axis | None, /) -> YDatum: ... + @overload + def axis( + self, + *, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + bandPosition: Optional[float | Parameter | SchemaBase | Map] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[bool] = Undefined, + domainCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + domainColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + domainDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + domainDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + grid: Optional[bool] = Undefined, + gridCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + gridColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + gridDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + gridDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelBound: Optional[bool | float | Parameter | SchemaBase | Map] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFlush: Optional[bool | float] = Undefined, + labelFlushOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOverlap: Optional[ + bool | Parameter | SchemaBase | Literal["greedy", "parity"] | Map + ] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labels: Optional[bool] = Undefined, + maxExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + minExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[Parameter | SchemaBase | Map | AxisOrient_T] = Undefined, + position: Optional[float | Parameter | SchemaBase | Map] = Undefined, + style: Optional[str | Sequence[str]] = Undefined, + tickBand: Optional[ + Parameter | SchemaBase | Literal["center", "extent"] | Map + ] = Undefined, + tickCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + tickColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + tickCount: Optional[ + float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + tickDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + tickDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickExtra: Optional[bool] = Undefined, + tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickRound: Optional[bool] = Undefined, + tickSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ticks: Optional[bool] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined, + titleAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleX: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleY: Optional[float | Parameter | SchemaBase | Map] = Undefined, + translate: Optional[float | Parameter | SchemaBase | Map] = Undefined, + values: Optional[ + Parameter + | SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + ] = Undefined, + zindex: Optional[float] = Undefined, + ) -> YDatum: ... + @overload + def bandPosition(self, _: float, /) -> YDatum: ... + @overload + def impute(self, _: Impute | None, /) -> YDatum: ... + @overload + def impute( + self, + *, + frame: Optional[Sequence[float | None]] = Undefined, + keyvals: Optional[SchemaBase | Sequence[Any] | Map] = Undefined, + method: Optional[SchemaBase | ImputeMethod_T] = Undefined, + value: Optional[Any] = Undefined, + ) -> YDatum: ... + @overload + def scale(self, _: Scale | None, /) -> YDatum: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> YDatum: ... + @overload + def stack(self, _: bool | StackOffset_T | None, /) -> YDatum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> YDatum: ... + @overload + def type(self, _: Type_T, /) -> YDatum: ... + + def __init__( + self, + datum, + axis: Optional[SchemaBase | Map | None] = Undefined, + bandPosition: Optional[float] = Undefined, + impute: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, + axis=axis, + bandPosition=bandPosition, + impute=impute, + scale=scale, + stack=stack, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class YValue(ValueChannelMixin, core.PositionValueDef): + """ + YValue schema wrapper. + + Definition object for a constant value (primitive value or gradient definition) of an + encoding channel. + + Parameters + ---------- + value : dict, float, :class:`ExprRef`, Literal['height', 'width'] + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "y" + + def __init__(self, value, **kwds): + super().__init__(value=value, **kwds) + + +@with_property_setters +class Y2(FieldChannelMixin, core.SecondaryFieldDef): + r""" + Y2 schema wrapper. + + A field definition of a secondary channel that shares a scale with another primary channel. + For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "y2" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> Y2: ... + @overload + def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Y2: ... + @overload + def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Y2: ... + @overload + def bandPosition(self, _: float, /) -> Y2: ... + @overload + def bin(self, _: None, /) -> Y2: ... + @overload + def field(self, _: str | RepeatRef, /) -> Y2: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> Y2: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> Y2: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> Y2: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Y2: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + timeUnit=timeUnit, + title=title, + **kwds, + ) + + +@with_property_setters +class Y2Datum(DatumChannelMixin, core.DatumDef): + """ + Y2Datum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "y2" + + @overload + def bandPosition(self, _: float, /) -> Y2Datum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> Y2Datum: ... + @overload + def type(self, _: Type_T, /) -> Y2Datum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, bandPosition=bandPosition, title=title, type=type, **kwds + ) + + +@with_property_setters +class Y2Value(ValueChannelMixin, core.PositionValueDef): + """ + Y2Value schema wrapper. + + Definition object for a constant value (primitive value or gradient definition) of an + encoding channel. + + Parameters + ---------- + value : dict, float, :class:`ExprRef`, Literal['height', 'width'] + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "y2" + + def __init__(self, value, **kwds): + super().__init__(value=value, **kwds) + + +@with_property_setters +class YError(FieldChannelMixin, core.SecondaryFieldDef): + r""" + YError schema wrapper. + + A field definition of a secondary channel that shares a scale with another primary channel. + For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "yError" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> YError: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> YError: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> YError: ... + @overload + def bandPosition(self, _: float, /) -> YError: ... + @overload + def bin(self, _: None, /) -> YError: ... + @overload + def field(self, _: str | RepeatRef, /) -> YError: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> YError: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> YError: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> YError: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> YError: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + timeUnit=timeUnit, + title=title, + **kwds, + ) + + +@with_property_setters +class YErrorValue(ValueChannelMixin, core.ValueDefnumber): + """ + YErrorValue schema wrapper. + + Definition object for a constant value (primitive value or gradient definition) of an + encoding channel. + + Parameters + ---------- + value : float + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "yError" + + def __init__(self, value, **kwds): + super().__init__(value=value, **kwds) + + +@with_property_setters +class YError2(FieldChannelMixin, core.SecondaryFieldDef): + r""" + YError2 schema wrapper. + + A field definition of a secondary channel that shares a scale with another primary channel. + For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "yError2" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> YError2: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> YError2: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> YError2: ... + @overload + def bandPosition(self, _: float, /) -> YError2: ... + @overload + def bin(self, _: None, /) -> YError2: ... + @overload + def field(self, _: str | RepeatRef, /) -> YError2: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> YError2: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> YError2: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> YError2: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> YError2: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + timeUnit=timeUnit, + title=title, + **kwds, + ) + + +@with_property_setters +class YError2Value(ValueChannelMixin, core.ValueDefnumber): + """ + YError2Value schema wrapper. + + Definition object for a constant value (primitive value or gradient definition) of an + encoding channel. + + Parameters + ---------- + value : float + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "yError2" + + def __init__(self, value, **kwds): + super().__init__(value=value, **kwds) + + +@with_property_setters +class YOffset(FieldChannelMixin, core.ScaleFieldDef): + r""" + YOffset schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "yOffset" + + @overload + def aggregate(self, _: NonArgAggregateOp_T, /) -> YOffset: ... + @overload + def aggregate( + self, *, argmax: Optional[str | SchemaBase] = Undefined + ) -> YOffset: ... + @overload + def aggregate( + self, *, argmin: Optional[str | SchemaBase] = Undefined + ) -> YOffset: ... + @overload + def bandPosition(self, _: float, /) -> YOffset: ... + @overload + def bin(self, _: bool | Bin | None, /) -> YOffset: ... + @overload + def bin( + self, + *, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + ) -> YOffset: ... + @overload + def field(self, _: str | RepeatRef, /) -> YOffset: ... + @overload + def field( + self, + *, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + ) -> YOffset: ... + @overload + def scale(self, _: Scale | None, /) -> YOffset: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> YOffset: ... + @overload + def sort( + self, + _: Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[DateTime | Temporal] + | AllSortString_T + | None, + /, + ) -> YOffset: ... + @overload + def sort( + self, + *, + field: Optional[str | SchemaBase | Map] = Undefined, + op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> YOffset: ... + @overload + def sort( + self, + *, + encoding: Optional[SchemaBase | SortByChannel_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + ) -> YOffset: ... + @overload + def timeUnit( + self, + _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T, + /, + ) -> YOffset: ... + @overload + def timeUnit( + self, + *, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + ) -> YOffset: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> YOffset: ... + @overload + def type(self, _: StandardType_T, /) -> YOffset: ... + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + scale=scale, + sort=sort, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class YOffsetDatum(DatumChannelMixin, core.ScaleDatumDef): + """ + YOffsetDatum schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "yOffset" + + @overload + def bandPosition(self, _: float, /) -> YOffsetDatum: ... + @overload + def scale(self, _: Scale | None, /) -> YOffsetDatum: ... + @overload + def scale( + self, + *, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ) -> YOffsetDatum: ... + @overload + def title(self, _: str | Sequence[str] | None, /) -> YOffsetDatum: ... + @overload + def type(self, _: Type_T, /) -> YOffsetDatum: ... + + def __init__( + self, + datum, + bandPosition: Optional[float] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + datum=datum, + bandPosition=bandPosition, + scale=scale, + title=title, + type=type, + **kwds, + ) + + +@with_property_setters +class YOffsetValue(ValueChannelMixin, core.ValueDefnumber): + """ + YOffsetValue schema wrapper. + + Definition object for a constant value (primitive value or gradient definition) of an + encoding channel. + + Parameters + ---------- + value : float + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _class_is_valid_at_instantiation = False + _encoding_name = "yOffset" + + def __init__(self, value, **kwds): + super().__init__(value=value, **kwds) + + +AnyAngle: TypeAlias = Union[Angle, AngleDatum, AngleValue] +AnyColor: TypeAlias = Union[Color, ColorDatum, ColorValue] +AnyDescription: TypeAlias = Union[Description, DescriptionValue] +AnyFill: TypeAlias = Union[Fill, FillDatum, FillValue] +AnyFillOpacity: TypeAlias = Union[FillOpacity, FillOpacityDatum, FillOpacityValue] +AnyHref: TypeAlias = Union[Href, HrefValue] +AnyLatitude: TypeAlias = Union[Latitude, LatitudeDatum] +AnyLatitude2: TypeAlias = Union[Latitude2, Latitude2Datum, Latitude2Value] +AnyLongitude: TypeAlias = Union[Longitude, LongitudeDatum] +AnyLongitude2: TypeAlias = Union[Longitude2, Longitude2Datum, Longitude2Value] +AnyOpacity: TypeAlias = Union[Opacity, OpacityDatum, OpacityValue] +AnyOrder: TypeAlias = Union[Order, OrderValue] +AnyRadius: TypeAlias = Union[Radius, RadiusDatum, RadiusValue] +AnyRadius2: TypeAlias = Union[Radius2, Radius2Datum, Radius2Value] +AnyShape: TypeAlias = Union[Shape, ShapeDatum, ShapeValue] +AnySize: TypeAlias = Union[Size, SizeDatum, SizeValue] +AnyStroke: TypeAlias = Union[Stroke, StrokeDatum, StrokeValue] +AnyStrokeDash: TypeAlias = Union[StrokeDash, StrokeDashDatum, StrokeDashValue] +AnyStrokeOpacity: TypeAlias = Union[ + StrokeOpacity, StrokeOpacityDatum, StrokeOpacityValue +] +AnyStrokeWidth: TypeAlias = Union[StrokeWidth, StrokeWidthDatum, StrokeWidthValue] +AnyText: TypeAlias = Union[Text, TextDatum, TextValue] +AnyTheta: TypeAlias = Union[Theta, ThetaDatum, ThetaValue] +AnyTheta2: TypeAlias = Union[Theta2, Theta2Datum, Theta2Value] +AnyTooltip: TypeAlias = Union[Tooltip, TooltipValue] +AnyUrl: TypeAlias = Union[Url, UrlValue] +AnyX: TypeAlias = Union[X, XDatum, XValue] +AnyX2: TypeAlias = Union[X2, X2Datum, X2Value] +AnyXError: TypeAlias = Union[XError, XErrorValue] +AnyXError2: TypeAlias = Union[XError2, XError2Value] +AnyXOffset: TypeAlias = Union[XOffset, XOffsetDatum, XOffsetValue] +AnyY: TypeAlias = Union[Y, YDatum, YValue] +AnyY2: TypeAlias = Union[Y2, Y2Datum, Y2Value] +AnyYError: TypeAlias = Union[YError, YErrorValue] +AnyYError2: TypeAlias = Union[YError2, YError2Value] +AnyYOffset: TypeAlias = Union[YOffset, YOffsetDatum, YOffsetValue] + +ChannelAngle: TypeAlias = Union[str, AnyAngle, "IntoCondition", Map] +ChannelColor: TypeAlias = Union[str, AnyColor, "IntoCondition", Map] +ChannelColumn: TypeAlias = Union[str, Column, "IntoCondition", Map] +ChannelDescription: TypeAlias = Union[str, AnyDescription, "IntoCondition", Map] +ChannelDetail: TypeAlias = OneOrSeq[Union[str, Detail, "IntoCondition", Map]] +ChannelFacet: TypeAlias = Union[str, Facet, "IntoCondition", Map] +ChannelFill: TypeAlias = Union[str, AnyFill, "IntoCondition", Map] +ChannelFillOpacity: TypeAlias = Union[str, AnyFillOpacity, "IntoCondition", Map] +ChannelHref: TypeAlias = Union[str, AnyHref, "IntoCondition", Map] +ChannelKey: TypeAlias = Union[str, Key, "IntoCondition", Map] +ChannelLatitude: TypeAlias = Union[str, AnyLatitude, "IntoCondition", Map] +ChannelLatitude2: TypeAlias = Union[str, AnyLatitude2, "IntoCondition", Map] +ChannelLongitude: TypeAlias = Union[str, AnyLongitude, "IntoCondition", Map] +ChannelLongitude2: TypeAlias = Union[str, AnyLongitude2, "IntoCondition", Map] +ChannelOpacity: TypeAlias = Union[str, AnyOpacity, "IntoCondition", Map] +ChannelOrder: TypeAlias = OneOrSeq[Union[str, AnyOrder, "IntoCondition", Map]] +ChannelRadius: TypeAlias = Union[str, AnyRadius, "IntoCondition", Map] +ChannelRadius2: TypeAlias = Union[str, AnyRadius2, "IntoCondition", Map] +ChannelRow: TypeAlias = Union[str, Row, "IntoCondition", Map] +ChannelShape: TypeAlias = Union[str, AnyShape, "IntoCondition", Map] +ChannelSize: TypeAlias = Union[str, AnySize, "IntoCondition", Map] +ChannelStroke: TypeAlias = Union[str, AnyStroke, "IntoCondition", Map] +ChannelStrokeDash: TypeAlias = Union[str, AnyStrokeDash, "IntoCondition", Map] +ChannelStrokeOpacity: TypeAlias = Union[str, AnyStrokeOpacity, "IntoCondition", Map] +ChannelStrokeWidth: TypeAlias = Union[str, AnyStrokeWidth, "IntoCondition", Map] +ChannelText: TypeAlias = Union[str, AnyText, "IntoCondition", Map] +ChannelTheta: TypeAlias = Union[str, AnyTheta, "IntoCondition", Map] +ChannelTheta2: TypeAlias = Union[str, AnyTheta2, "IntoCondition", Map] +ChannelTooltip: TypeAlias = OneOrSeq[Union[str, AnyTooltip, "IntoCondition", Map]] +ChannelUrl: TypeAlias = Union[str, AnyUrl, "IntoCondition", Map] +ChannelX: TypeAlias = Union[str, AnyX, "IntoCondition", Map] +ChannelX2: TypeAlias = Union[str, AnyX2, "IntoCondition", Map] +ChannelXError: TypeAlias = Union[str, AnyXError, "IntoCondition", Map] +ChannelXError2: TypeAlias = Union[str, AnyXError2, "IntoCondition", Map] +ChannelXOffset: TypeAlias = Union[str, AnyXOffset, "IntoCondition", Map] +ChannelY: TypeAlias = Union[str, AnyY, "IntoCondition", Map] +ChannelY2: TypeAlias = Union[str, AnyY2, "IntoCondition", Map] +ChannelYError: TypeAlias = Union[str, AnyYError, "IntoCondition", Map] +ChannelYError2: TypeAlias = Union[str, AnyYError2, "IntoCondition", Map] +ChannelYOffset: TypeAlias = Union[str, AnyYOffset, "IntoCondition", Map] + + +class _EncodingMixin: + def encode( + self, + *args: Any, + angle: Optional[str | AnyAngle | IntoCondition | Map] = Undefined, + color: Optional[str | AnyColor | IntoCondition | Map] = Undefined, + column: Optional[str | Column | IntoCondition | Map] = Undefined, + description: Optional[str | AnyDescription | IntoCondition | Map] = Undefined, + detail: Optional[OneOrSeq[str | Detail | IntoCondition | Map]] = Undefined, + facet: Optional[str | Facet | IntoCondition | Map] = Undefined, + fill: Optional[str | AnyFill | IntoCondition | Map] = Undefined, + fillOpacity: Optional[str | AnyFillOpacity | IntoCondition | Map] = Undefined, + href: Optional[str | AnyHref | IntoCondition | Map] = Undefined, + key: Optional[str | Key | IntoCondition | Map] = Undefined, + latitude: Optional[str | AnyLatitude | IntoCondition | Map] = Undefined, + latitude2: Optional[str | AnyLatitude2 | IntoCondition | Map] = Undefined, + longitude: Optional[str | AnyLongitude | IntoCondition | Map] = Undefined, + longitude2: Optional[str | AnyLongitude2 | IntoCondition | Map] = Undefined, + opacity: Optional[str | AnyOpacity | IntoCondition | Map] = Undefined, + order: Optional[OneOrSeq[str | AnyOrder | IntoCondition | Map]] = Undefined, + radius: Optional[str | AnyRadius | IntoCondition | Map] = Undefined, + radius2: Optional[str | AnyRadius2 | IntoCondition | Map] = Undefined, + row: Optional[str | Row | IntoCondition | Map] = Undefined, + shape: Optional[str | AnyShape | IntoCondition | Map] = Undefined, + size: Optional[str | AnySize | IntoCondition | Map] = Undefined, + stroke: Optional[str | AnyStroke | IntoCondition | Map] = Undefined, + strokeDash: Optional[str | AnyStrokeDash | IntoCondition | Map] = Undefined, + strokeOpacity: Optional[ + str | AnyStrokeOpacity | IntoCondition | Map + ] = Undefined, + strokeWidth: Optional[str | AnyStrokeWidth | IntoCondition | Map] = Undefined, + text: Optional[str | AnyText | IntoCondition | Map] = Undefined, + theta: Optional[str | AnyTheta | IntoCondition | Map] = Undefined, + theta2: Optional[str | AnyTheta2 | IntoCondition | Map] = Undefined, + tooltip: Optional[OneOrSeq[str | AnyTooltip | IntoCondition | Map]] = Undefined, + url: Optional[str | AnyUrl | IntoCondition | Map] = Undefined, + x: Optional[str | AnyX | IntoCondition | Map] = Undefined, + x2: Optional[str | AnyX2 | IntoCondition | Map] = Undefined, + xError: Optional[str | AnyXError | IntoCondition | Map] = Undefined, + xError2: Optional[str | AnyXError2 | IntoCondition | Map] = Undefined, + xOffset: Optional[str | AnyXOffset | IntoCondition | Map] = Undefined, + y: Optional[str | AnyY | IntoCondition | Map] = Undefined, + y2: Optional[str | AnyY2 | IntoCondition | Map] = Undefined, + yError: Optional[str | AnyYError | IntoCondition | Map] = Undefined, + yError2: Optional[str | AnyYError2 | IntoCondition | Map] = Undefined, + yOffset: Optional[str | AnyYOffset | IntoCondition | Map] = Undefined, + ) -> Self: + """ + Map properties of the data to visual properties of the chart (see :class:`FacetedEncoding`). + + Parameters + ---------- + angle : str, :class:`Angle`, Dict, :class:`AngleDatum`, :class:`AngleValue` + Rotation angle of point and text marks. + color : str, :class:`Color`, Dict, :class:`ColorDatum`, :class:`ColorValue` + Color of the marks - either fill or stroke color based on the ``filled`` + property 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. + + *Note:* 1) For fine-grained control over both fill and stroke colors of the + marks, please use the ``fill`` and ``stroke`` channels. The ``fill`` or + ``stroke`` encodings have higher precedence than ``color``, thus may + override the ``color`` encoding if conflicting encodings are specified. 2) + See the scale documentation for more information about customizing `color + scheme `__. + column : str, :class:`Column`, Dict + A field definition for the horizontal facet of trellis plots. + description : str, :class:`Description`, Dict, :class:`DescriptionValue` + A text description of this mark for ARIA accessibility (SVG output only). + For SVG output the ``"aria-label"`` attribute will be set to this + description. + detail : str, :class:`Detail`, Dict, List + 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. + facet : str, :class:`Facet`, Dict + A field definition for the (flexible) facet of trellis plots. + + If either ``row`` or ``column`` is specified, this channel will be ignored. + fill : str, :class:`Fill`, Dict, :class:`FillDatum`, :class:`FillValue` + Fill color of the marks. **Default value:** If undefined, the default color + depends on `mark config + `__'s + ``color`` property. + + *Note:* The ``fill`` encoding has higher precedence than ``color``, thus may + override the ``color`` encoding if conflicting encodings are specified. + fillOpacity : str, :class:`FillOpacity`, Dict, :class:`FillOpacityDatum`, :class:`FillOpacityValue` + Fill opacity of the marks. + + **Default value:** If undefined, the default opacity depends on `mark config + `__'s + ``fillOpacity`` property. + href : str, :class:`Href`, Dict, :class:`HrefValue` + A URL to load upon mouse click. + key : str, :class:`Key`, Dict + A data field to use as a unique key for data binding. When a visualization's + data is updated, the key value will be used to match data elements to + existing mark instances. Use a key channel to enable object constancy for + transitions over dynamic data. + latitude : str, :class:`Latitude`, Dict, :class:`LatitudeDatum` + Latitude position of geographically projected marks. + latitude2 : str, :class:`Latitude2`, Dict, :class:`Latitude2Datum`, :class:`Latitude2Value` + Latitude-2 position for geographically projected ranged ``"area"``, + ``"bar"``, ``"rect"``, and ``"rule"``. + longitude : str, :class:`Longitude`, Dict, :class:`LongitudeDatum` + Longitude position of geographically projected marks. + longitude2 : str, :class:`Longitude2`, Dict, :class:`Longitude2Datum`, :class:`Longitude2Value` + Longitude-2 position for geographically projected ranged ``"area"``, + ``"bar"``, ``"rect"``, and ``"rule"``. + opacity : str, :class:`Opacity`, Dict, :class:`OpacityDatum`, :class:`OpacityValue` + Opacity of the marks. + + **Default value:** If undefined, the default opacity depends on `mark config + `__'s + ``opacity`` property. + order : str, :class:`Order`, Dict, List, :class:`OrderValue` + Order of the marks. + + * For stacked marks, this ``order`` channel encodes `stack order + `__. + * For line and trail marks, this ``order`` channel encodes order of data + points in the lines. This can be useful for creating `a connected + scatterplot + `__. + Setting ``order`` to ``{"value": null}`` makes the line marks use the + original order in the data sources. + * Otherwise, this ``order`` channel encodes layer order of the marks. + + **Note**: In aggregate plots, ``order`` field should be ``aggregate``d to + avoid creating additional aggregation grouping. + radius : str, :class:`Radius`, Dict, :class:`RadiusDatum`, :class:`RadiusValue` + The outer radius in pixels of arc marks. + radius2 : str, :class:`Radius2`, Dict, :class:`Radius2Datum`, :class:`Radius2Value` + The inner radius in pixels of arc marks. + row : str, :class:`Row`, Dict + A field definition for the vertical facet of trellis plots. + shape : str, :class:`Shape`, Dict, :class:`ShapeDatum`, :class:`ShapeValue` + Shape of the mark. + + 1. For ``point`` marks the supported values include: - plotting shapes: + ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, ``"triangle-up"``, + ``"triangle-down"``, ``"triangle-right"``, or ``"triangle-left"``. - the + line symbol ``"stroke"`` - centered directional shapes ``"arrow"``, + ``"wedge"``, or ``"triangle"`` - a custom `SVG path string + `__ (For + correct sizing, custom shape paths should be defined within a square + bounding box with coordinates ranging from -1 to 1 along both the x and y + dimensions.) + + 2. 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. (``"circle"`` if unset.) + size : str, :class:`Size`, Dict, :class:`SizeDatum`, :class:`SizeValue` + 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 size. + * For ``"text"`` - the text's font size. + * Size is unsupported for ``"line"``, ``"area"``, and ``"rect"``. (Use + ``"trail"`` instead of line with varying size) + stroke : str, :class:`Stroke`, Dict, :class:`StrokeDatum`, :class:`StrokeValue` + Stroke color of the marks. **Default value:** If undefined, the default + color depends on `mark config + `__'s + ``color`` property. + + *Note:* The ``stroke`` encoding has higher precedence than ``color``, thus + may override the ``color`` encoding if conflicting encodings are specified. + strokeDash : str, :class:`StrokeDash`, Dict, :class:`StrokeDashDatum`, :class:`StrokeDashValue` + Stroke dash of the marks. + + **Default value:** ``[1,0]`` (No dash). + strokeOpacity : str, :class:`StrokeOpacity`, Dict, :class:`StrokeOpacityDatum`, :class:`StrokeOpacityValue` + Stroke opacity of the marks. + + **Default value:** If undefined, the default opacity depends on `mark config + `__'s + ``strokeOpacity`` property. + strokeWidth : str, :class:`StrokeWidth`, Dict, :class:`StrokeWidthDatum`, :class:`StrokeWidthValue` + Stroke width of the marks. + + **Default value:** If undefined, the default stroke width depends on `mark + config `__'s + ``strokeWidth`` property. + text : str, :class:`Text`, Dict, :class:`TextDatum`, :class:`TextValue` + Text of the ``text`` mark. + theta : str, :class:`Theta`, Dict, :class:`ThetaDatum`, :class:`ThetaValue` + * For arc marks, the arc length in radians if theta2 is not specified, + otherwise the start arc angle. (A value of 0 indicates up or “north”, + increasing values proceed clockwise.) + + * For text marks, polar coordinate angle in radians. + theta2 : str, :class:`Theta2`, Dict, :class:`Theta2Datum`, :class:`Theta2Value` + The end angle of arc marks in radians. A value of 0 indicates up or “north”, + increasing values proceed clockwise. + tooltip : str, :class:`Tooltip`, Dict, List, :class:`TooltipValue` + The tooltip text to show upon mouse hover. Specifying ``tooltip`` encoding + overrides `the tooltip property in the mark definition + `__. + + See the `tooltip `__ + documentation for a detailed discussion about tooltip in Vega-Lite. + url : str, :class:`Url`, Dict, :class:`UrlValue` + The URL of an image mark. + x : str, :class:`X`, Dict, :class:`XDatum`, :class:`XValue` + X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` + without specified ``x2`` or ``width``. + + The ``value`` of this channel can be a number or a string ``"width"`` for + the width of the plot. + x2 : str, :class:`X2`, Dict, :class:`X2Datum`, :class:`X2Value` + X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and + ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"width"`` for + the width of the plot. + xError : str, :class:`XError`, Dict, :class:`XErrorValue` + Error value of x coordinates for error specified ``"errorbar"`` and + ``"errorband"``. + xError2 : str, :class:`XError2`, Dict, :class:`XError2Value` + Secondary error value of x coordinates for error specified ``"errorbar"`` + and ``"errorband"``. + xOffset : str, :class:`XOffset`, Dict, :class:`XOffsetDatum`, :class:`XOffsetValue` + Offset of x-position of the marks + y : str, :class:`Y`, Dict, :class:`YDatum`, :class:`YValue` + Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` + without specified ``y2`` or ``height``. + + The ``value`` of this channel can be a number or a string ``"height"`` for + the height of the plot. + y2 : str, :class:`Y2`, Dict, :class:`Y2Datum`, :class:`Y2Value` + Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and + ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"height"`` for + the height of the plot. + yError : str, :class:`YError`, Dict, :class:`YErrorValue` + Error value of y coordinates for error specified ``"errorbar"`` and + ``"errorband"``. + yError2 : str, :class:`YError2`, Dict, :class:`YError2Value` + Secondary error value of y coordinates for error specified ``"errorbar"`` + and ``"errorband"``. + yOffset : str, :class:`YOffset`, Dict, :class:`YOffsetDatum`, :class:`YOffsetValue` + Offset of y-position of the marks + """ + kwargs = { + "angle": angle, + "color": color, + "column": column, + "description": description, + "detail": detail, + "facet": facet, + "fill": fill, + "fillOpacity": fillOpacity, + "href": href, + "key": key, + "latitude": latitude, + "latitude2": latitude2, + "longitude": longitude, + "longitude2": longitude2, + "opacity": opacity, + "order": order, + "radius": radius, + "radius2": radius2, + "row": row, + "shape": shape, + "size": size, + "stroke": stroke, + "strokeDash": strokeDash, + "strokeOpacity": strokeOpacity, + "strokeWidth": strokeWidth, + "text": text, + "theta": theta, + "theta2": theta2, + "tooltip": tooltip, + "url": url, + "x": x, + "x2": x2, + "xError": xError, + "xError2": xError2, + "xOffset": xOffset, + "y": y, + "y2": y2, + "yError": yError, + "yError2": yError2, + "yOffset": yOffset, + } + if args: + kwargs = {k: v for k, v in kwargs.items() if v is not Undefined} + + # Convert args to kwargs based on their types. + kwargs = _infer_encoding_types(args, kwargs) + # get a copy of the dict representation of the previous encoding + # ignore type as copy method comes from SchemaBase + copy = self.copy(deep=["encoding"]) # type: ignore[attr-defined] + encoding = copy._get("encoding", {}) + if isinstance(encoding, core.VegaLiteSchema): + encoding = {k: v for k, v in encoding._kwds.items() if v is not Undefined} + # update with the new encodings, and apply them to the copy + encoding.update(kwargs) + copy.encoding = core.FacetedEncoding(**encoding) + return copy + + +class EncodeKwds(TypedDict, total=False): + """ + Encoding channels map properties of the data to visual properties of the chart. + + Parameters + ---------- + angle + Rotation angle of point and text marks. + color + Color of the marks - either fill or stroke color based on the ``filled`` property + 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. + + *Note:* 1) For fine-grained control over both fill and stroke colors of the marks, + please use the ``fill`` and ``stroke`` channels. The ``fill`` or ``stroke`` + encodings have higher precedence than ``color``, thus may override the ``color`` + encoding if conflicting encodings are specified. 2) See the scale documentation for + more information about customizing `color scheme + `__. + column + A field definition for the horizontal facet of trellis plots. + description + A text description of this mark for ARIA accessibility (SVG output only). For SVG + output the ``"aria-label"`` attribute will be set to this description. + detail + 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. + facet + A field definition for the (flexible) facet of trellis plots. + + If either ``row`` or ``column`` is specified, this channel will be ignored. + fill + Fill color of the marks. **Default value:** If undefined, the default color depends + on `mark config `__'s + ``color`` property. + + *Note:* The ``fill`` encoding has higher precedence than ``color``, thus may + override the ``color`` encoding if conflicting encodings are specified. + fillOpacity + Fill opacity of the marks. + + **Default value:** If undefined, the default opacity depends on `mark config + `__'s ``fillOpacity`` + property. + href + A URL to load upon mouse click. + key + A data field to use as a unique key for data binding. When a visualization's data is + updated, the key value will be used to match data elements to existing mark + instances. Use a key channel to enable object constancy for transitions over dynamic + data. + latitude + Latitude position of geographically projected marks. + latitude2 + Latitude-2 position for geographically projected ranged ``"area"``, ``"bar"``, + ``"rect"``, and ``"rule"``. + longitude + Longitude position of geographically projected marks. + longitude2 + Longitude-2 position for geographically projected ranged ``"area"``, ``"bar"``, + ``"rect"``, and ``"rule"``. + opacity + Opacity of the marks. + + **Default value:** If undefined, the default opacity depends on `mark config + `__'s ``opacity`` + property. + order + Order of the marks. + + * For stacked marks, this ``order`` channel encodes `stack order + `__. + * For line and trail marks, this ``order`` channel encodes order of data points in + the lines. This can be useful for creating `a connected scatterplot + `__. Setting + ``order`` to ``{"value": null}`` makes the line marks use the original order in + the data sources. + * Otherwise, this ``order`` channel encodes layer order of the marks. + + **Note**: In aggregate plots, ``order`` field should be ``aggregate``d to avoid + creating additional aggregation grouping. + radius + The outer radius in pixels of arc marks. + radius2 + The inner radius in pixels of arc marks. + row + A field definition for the vertical facet of trellis plots. + shape + Shape of the mark. + + 1. For ``point`` marks the supported values include: - plotting shapes: + ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, ``"triangle-up"``, + ``"triangle-down"``, ``"triangle-right"``, or ``"triangle-left"``. - the line + symbol ``"stroke"`` - centered directional shapes ``"arrow"``, ``"wedge"``, or + ``"triangle"`` - a custom `SVG path string + `__ (For correct + sizing, custom shape paths should be defined within a square bounding box with + coordinates ranging from -1 to 1 along both the x and y dimensions.) + + 2. 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. (``"circle"`` if unset.) + size + 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 size. + * For ``"text"`` - the text's font size. + * Size is unsupported for ``"line"``, ``"area"``, and ``"rect"``. (Use ``"trail"`` + instead of line with varying size) + stroke + Stroke color of the marks. **Default value:** If undefined, the default color + depends on `mark config + `__'s ``color`` + property. + + *Note:* The ``stroke`` encoding has higher precedence than ``color``, thus may + override the ``color`` encoding if conflicting encodings are specified. + strokeDash + Stroke dash of the marks. + + **Default value:** ``[1,0]`` (No dash). + strokeOpacity + Stroke opacity of the marks. + + **Default value:** If undefined, the default opacity depends on `mark config + `__'s + ``strokeOpacity`` property. + strokeWidth + Stroke width of the marks. + + **Default value:** If undefined, the default stroke width depends on `mark config + `__'s ``strokeWidth`` + property. + text + Text of the ``text`` mark. + theta + * For arc marks, the arc length in radians if theta2 is not specified, otherwise the + start arc angle. (A value of 0 indicates up or “north”, increasing values proceed + clockwise.) + + * For text marks, polar coordinate angle in radians. + theta2 + The end angle of arc marks in radians. A value of 0 indicates up or “north”, + increasing values proceed clockwise. + tooltip + The tooltip text to show upon mouse hover. Specifying ``tooltip`` encoding overrides + `the tooltip property in the mark definition + `__. + + See the `tooltip `__ + documentation for a detailed discussion about tooltip in Vega-Lite. + url + The URL of an image mark. + x + X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without + specified ``x2`` or ``width``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2 + X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + xError + Error value of x coordinates for error specified ``"errorbar"`` and ``"errorband"``. + xError2 + Secondary error value of x coordinates for error specified ``"errorbar"`` and + ``"errorband"``. + xOffset + Offset of x-position of the marks + y + Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without + specified ``y2`` or ``height``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2 + Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + yError + Error value of y coordinates for error specified ``"errorbar"`` and ``"errorband"``. + yError2 + Secondary error value of y coordinates for error specified ``"errorbar"`` and + ``"errorband"``. + yOffset + Offset of y-position of the marks + """ + + angle: str | AnyAngle | IntoCondition | Map + color: str | AnyColor | IntoCondition | Map + column: str | Column | IntoCondition | Map + description: str | AnyDescription | IntoCondition | Map + detail: OneOrSeq[str | Detail | IntoCondition | Map] + facet: str | Facet | IntoCondition | Map + fill: str | AnyFill | IntoCondition | Map + fillOpacity: str | AnyFillOpacity | IntoCondition | Map + href: str | AnyHref | IntoCondition | Map + key: str | Key | IntoCondition | Map + latitude: str | AnyLatitude | IntoCondition | Map + latitude2: str | AnyLatitude2 | IntoCondition | Map + longitude: str | AnyLongitude | IntoCondition | Map + longitude2: str | AnyLongitude2 | IntoCondition | Map + opacity: str | AnyOpacity | IntoCondition | Map + order: OneOrSeq[str | AnyOrder | IntoCondition | Map] + radius: str | AnyRadius | IntoCondition | Map + radius2: str | AnyRadius2 | IntoCondition | Map + row: str | Row | IntoCondition | Map + shape: str | AnyShape | IntoCondition | Map + size: str | AnySize | IntoCondition | Map + stroke: str | AnyStroke | IntoCondition | Map + strokeDash: str | AnyStrokeDash | IntoCondition | Map + strokeOpacity: str | AnyStrokeOpacity | IntoCondition | Map + strokeWidth: str | AnyStrokeWidth | IntoCondition | Map + text: str | AnyText | IntoCondition | Map + theta: str | AnyTheta | IntoCondition | Map + theta2: str | AnyTheta2 | IntoCondition | Map + tooltip: OneOrSeq[str | AnyTooltip | IntoCondition | Map] + url: str | AnyUrl | IntoCondition | Map + x: str | AnyX | IntoCondition | Map + x2: str | AnyX2 | IntoCondition | Map + xError: str | AnyXError | IntoCondition | Map + xError2: str | AnyXError2 | IntoCondition | Map + xOffset: str | AnyXOffset | IntoCondition | Map + y: str | AnyY | IntoCondition | Map + y2: str | AnyY2 | IntoCondition | Map + yError: str | AnyYError | IntoCondition | Map + yError2: str | AnyYError2 | IntoCondition | Map + yOffset: str | AnyYOffset | IntoCondition | Map diff --git a/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/core.py b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/core.py new file mode 100644 index 0000000000000000000000000000000000000000..fa2df587a77e5f4961b6abeabd78f2f9f7956512 --- /dev/null +++ b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/core.py @@ -0,0 +1,27199 @@ +# The contents of this file are automatically written by +# tools/generate_schema_wrapper.py. Do not modify directly. + +from __future__ import annotations + +import json +import pkgutil +from typing import TYPE_CHECKING, Any, Literal + +from altair.utils.schemapi import ( # noqa: F401 + SchemaBase, + Undefined, + UndefinedType, + _subclasses, +) + +if TYPE_CHECKING: + # ruff: noqa: F405 + from collections.abc import Iterator, Sequence + + from altair import Parameter + from altair.typing import Optional + + from ._typing import * # noqa: F403 + + +__all__ = [ + "URI", + "Aggregate", + "AggregateOp", + "AggregateTransform", + "AggregatedFieldDef", + "Align", + "AllSortString", + "AnyMark", + "AnyMarkConfig", + "AreaConfig", + "ArgmaxDef", + "ArgminDef", + "AutoSizeParams", + "AutosizeType", + "Axis", + "AxisConfig", + "AxisOrient", + "AxisResolveMap", + "BBox", + "BarConfig", + "BaseTitleNoValueRefs", + "Baseline", + "BinExtent", + "BinParams", + "BinTransform", + "BindCheckbox", + "BindDirect", + "BindInput", + "BindRadioSelect", + "BindRange", + "Binding", + "BinnedTimeUnit", + "Blend", + "BoxPlot", + "BoxPlotConfig", + "BoxPlotDef", + "BrushConfig", + "CalculateTransform", + "Categorical", + "ColorDef", + "ColorName", + "ColorScheme", + "CompositeMark", + "CompositeMarkDef", + "CompositionConfig", + "ConcatSpecGenericSpec", + "ConditionalAxisColor", + "ConditionalAxisLabelAlign", + "ConditionalAxisLabelBaseline", + "ConditionalAxisLabelFontStyle", + "ConditionalAxisLabelFontWeight", + "ConditionalAxisNumber", + "ConditionalAxisNumberArray", + "ConditionalAxisPropertyAlignnull", + "ConditionalAxisPropertyColornull", + "ConditionalAxisPropertyFontStylenull", + "ConditionalAxisPropertyFontWeightnull", + "ConditionalAxisPropertyTextBaselinenull", + "ConditionalAxisPropertynumberArraynull", + "ConditionalAxisPropertynumbernull", + "ConditionalAxisPropertystringnull", + "ConditionalAxisString", + "ConditionalMarkPropFieldOrDatumDef", + "ConditionalMarkPropFieldOrDatumDefTypeForShape", + "ConditionalParameterMarkPropFieldOrDatumDef", + "ConditionalParameterMarkPropFieldOrDatumDefTypeForShape", + "ConditionalParameterStringFieldDef", + "ConditionalParameterValueDefGradientstringnullExprRef", + "ConditionalParameterValueDefTextExprRef", + "ConditionalParameterValueDefnumber", + "ConditionalParameterValueDefnumberArrayExprRef", + "ConditionalParameterValueDefnumberExprRef", + "ConditionalParameterValueDefstringExprRef", + "ConditionalParameterValueDefstringnullExprRef", + "ConditionalPredicateMarkPropFieldOrDatumDef", + "ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape", + "ConditionalPredicateStringFieldDef", + "ConditionalPredicateValueDefAlignnullExprRef", + "ConditionalPredicateValueDefColornullExprRef", + "ConditionalPredicateValueDefFontStylenullExprRef", + "ConditionalPredicateValueDefFontWeightnullExprRef", + "ConditionalPredicateValueDefGradientstringnullExprRef", + "ConditionalPredicateValueDefTextBaselinenullExprRef", + "ConditionalPredicateValueDefTextExprRef", + "ConditionalPredicateValueDefnumber", + "ConditionalPredicateValueDefnumberArrayExprRef", + "ConditionalPredicateValueDefnumberArraynullExprRef", + "ConditionalPredicateValueDefnumberExprRef", + "ConditionalPredicateValueDefnumbernullExprRef", + "ConditionalPredicateValueDefstringExprRef", + "ConditionalPredicateValueDefstringnullExprRef", + "ConditionalStringFieldDef", + "ConditionalValueDefGradientstringnullExprRef", + "ConditionalValueDefTextExprRef", + "ConditionalValueDefnumber", + "ConditionalValueDefnumberArrayExprRef", + "ConditionalValueDefnumberExprRef", + "ConditionalValueDefstringExprRef", + "ConditionalValueDefstringnullExprRef", + "Config", + "CsvDataFormat", + "Cursor", + "Cyclical", + "Data", + "DataFormat", + "DataSource", + "Datasets", + "DateTime", + "DatumDef", + "Day", + "DensityTransform", + "DerivedStream", + "DictInlineDataset", + "DictSelectionInit", + "DictSelectionInitInterval", + "Diverging", + "DomainUnionWith", + "DsvDataFormat", + "Element", + "Encoding", + "EncodingSortField", + "ErrorBand", + "ErrorBandConfig", + "ErrorBandDef", + "ErrorBar", + "ErrorBarConfig", + "ErrorBarDef", + "ErrorBarExtent", + "EventStream", + "EventType", + "Expr", + "ExprRef", + "ExtentTransform", + "FacetEncodingFieldDef", + "FacetFieldDef", + "FacetSpec", + "FacetedEncoding", + "FacetedUnitSpec", + "Feature", + "FeatureCollection", + "FeatureGeometryGeoJsonProperties", + "Field", + "FieldDefWithoutScale", + "FieldEqualPredicate", + "FieldGTEPredicate", + "FieldGTPredicate", + "FieldLTEPredicate", + "FieldLTPredicate", + "FieldName", + "FieldOneOfPredicate", + "FieldOrDatumDefWithConditionDatumDefGradientstringnull", + "FieldOrDatumDefWithConditionDatumDefnumber", + "FieldOrDatumDefWithConditionDatumDefnumberArray", + "FieldOrDatumDefWithConditionDatumDefstringnull", + "FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull", + "FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull", + "FieldOrDatumDefWithConditionMarkPropFieldDefnumber", + "FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray", + "FieldOrDatumDefWithConditionStringDatumDefText", + "FieldOrDatumDefWithConditionStringFieldDefText", + "FieldOrDatumDefWithConditionStringFieldDefstring", + "FieldRange", + "FieldRangePredicate", + "FieldValidPredicate", + "FilterTransform", + "Fit", + "FlattenTransform", + "FoldTransform", + "FontStyle", + "FontWeight", + "FormatConfig", + "Generator", + "GenericUnitSpecEncodingAnyMark", + "GeoJsonFeature", + "GeoJsonFeatureCollection", + "GeoJsonProperties", + "Geometry", + "GeometryCollection", + "Gradient", + "GradientStop", + "GraticuleGenerator", + "GraticuleParams", + "HConcatSpecGenericSpec", + "Header", + "HeaderConfig", + "HexColor", + "ImputeMethod", + "ImputeParams", + "ImputeSequence", + "ImputeTransform", + "InlineData", + "InlineDataset", + "Interpolate", + "IntervalSelectionConfig", + "IntervalSelectionConfigWithoutType", + "JoinAggregateFieldDef", + "JoinAggregateTransform", + "JsonDataFormat", + "LabelOverlap", + "LatLongDef", + "LatLongFieldDef", + "LayerRepeatMapping", + "LayerRepeatSpec", + "LayerSpec", + "LayoutAlign", + "Legend", + "LegendBinding", + "LegendConfig", + "LegendOrient", + "LegendResolveMap", + "LegendStreamBinding", + "LineConfig", + "LineString", + "LinearGradient", + "LocalMultiTimeUnit", + "LocalSingleTimeUnit", + "Locale", + "LoessTransform", + "LogicalAndPredicate", + "LogicalNotPredicate", + "LogicalOrPredicate", + "LookupSelection", + "LookupTransform", + "Mark", + "MarkConfig", + "MarkDef", + "MarkInvalidDataMode", + "MarkPropDefGradientstringnull", + "MarkPropDefnumber", + "MarkPropDefnumberArray", + "MarkPropDefstringnullTypeForShape", + "MarkType", + "MergedStream", + "Month", + "MultiLineString", + "MultiPoint", + "MultiPolygon", + "MultiTimeUnit", + "NamedData", + "NonArgAggregateOp", + "NonLayerRepeatSpec", + "NonNormalizedSpec", + "NumberLocale", + "NumericArrayMarkPropDef", + "NumericMarkPropDef", + "OffsetDef", + "OrderFieldDef", + "OrderOnlyDef", + "OrderValueDef", + "Orient", + "Orientation", + "OverlayMarkDef", + "Padding", + "ParameterExtent", + "ParameterName", + "ParameterPredicate", + "Parse", + "ParseValue", + "PivotTransform", + "Point", + "PointSelectionConfig", + "PointSelectionConfigWithoutType", + "PolarDef", + "Polygon", + "Position", + "Position2Def", + "PositionDatumDef", + "PositionDatumDefBase", + "PositionDef", + "PositionFieldDef", + "PositionFieldDefBase", + "PositionValueDef", + "Predicate", + "PredicateComposition", + "PrimitiveValue", + "Projection", + "ProjectionConfig", + "ProjectionType", + "QuantileTransform", + "RadialGradient", + "RangeConfig", + "RangeEnum", + "RangeRaw", + "RangeRawArray", + "RangeScheme", + "RectConfig", + "RegressionTransform", + "RelativeBandSize", + "RepeatMapping", + "RepeatRef", + "RepeatSpec", + "Resolve", + "ResolveMode", + "Root", + "RowColLayoutAlign", + "RowColboolean", + "RowColnumber", + "RowColumnEncodingFieldDef", + "SampleTransform", + "Scale", + "ScaleBinParams", + "ScaleBins", + "ScaleConfig", + "ScaleDatumDef", + "ScaleFieldDef", + "ScaleInterpolateEnum", + "ScaleInterpolateParams", + "ScaleInvalidDataConfig", + "ScaleInvalidDataShowAsValueangle", + "ScaleInvalidDataShowAsValuecolor", + "ScaleInvalidDataShowAsValuefill", + "ScaleInvalidDataShowAsValuefillOpacity", + "ScaleInvalidDataShowAsValueopacity", + "ScaleInvalidDataShowAsValueradius", + "ScaleInvalidDataShowAsValueshape", + "ScaleInvalidDataShowAsValuesize", + "ScaleInvalidDataShowAsValuestroke", + "ScaleInvalidDataShowAsValuestrokeDash", + "ScaleInvalidDataShowAsValuestrokeOpacity", + "ScaleInvalidDataShowAsValuestrokeWidth", + "ScaleInvalidDataShowAsValuetheta", + "ScaleInvalidDataShowAsValuex", + "ScaleInvalidDataShowAsValuexOffset", + "ScaleInvalidDataShowAsValuey", + "ScaleInvalidDataShowAsValueyOffset", + "ScaleInvalidDataShowAsangle", + "ScaleInvalidDataShowAscolor", + "ScaleInvalidDataShowAsfill", + "ScaleInvalidDataShowAsfillOpacity", + "ScaleInvalidDataShowAsopacity", + "ScaleInvalidDataShowAsradius", + "ScaleInvalidDataShowAsshape", + "ScaleInvalidDataShowAssize", + "ScaleInvalidDataShowAsstroke", + "ScaleInvalidDataShowAsstrokeDash", + "ScaleInvalidDataShowAsstrokeOpacity", + "ScaleInvalidDataShowAsstrokeWidth", + "ScaleInvalidDataShowAstheta", + "ScaleInvalidDataShowAsx", + "ScaleInvalidDataShowAsxOffset", + "ScaleInvalidDataShowAsy", + "ScaleInvalidDataShowAsyOffset", + "ScaleResolveMap", + "ScaleType", + "SchemaBase", + "SchemeParams", + "SecondaryFieldDef", + "SelectionConfig", + "SelectionInit", + "SelectionInitInterval", + "SelectionInitIntervalMapping", + "SelectionInitMapping", + "SelectionParameter", + "SelectionResolution", + "SelectionType", + "SequenceGenerator", + "SequenceParams", + "SequentialMultiHue", + "SequentialSingleHue", + "ShapeDef", + "SharedEncoding", + "SingleDefUnitChannel", + "SingleTimeUnit", + "Sort", + "SortArray", + "SortByChannel", + "SortByChannelDesc", + "SortByEncoding", + "SortField", + "SortOrder", + "Spec", + "SphereGenerator", + "StackOffset", + "StackTransform", + "StandardType", + "Step", + "StepFor", + "Stream", + "StringFieldDef", + "StringFieldDefWithCondition", + "StringValueDefWithCondition", + "StrokeCap", + "StrokeJoin", + "StyleConfigIndex", + "SymbolShape", + "TextBaseline", + "TextDef", + "TextDirection", + "TickConfig", + "TickCount", + "TimeInterval", + "TimeIntervalStep", + "TimeLocale", + "TimeUnit", + "TimeUnitParams", + "TimeUnitTransform", + "TimeUnitTransformParams", + "TitleAnchor", + "TitleConfig", + "TitleFrame", + "TitleOrient", + "TitleParams", + "TooltipContent", + "TopLevelConcatSpec", + "TopLevelFacetSpec", + "TopLevelHConcatSpec", + "TopLevelLayerSpec", + "TopLevelParameter", + "TopLevelRepeatSpec", + "TopLevelSelectionParameter", + "TopLevelSpec", + "TopLevelUnitSpec", + "TopLevelVConcatSpec", + "TopoDataFormat", + "Transform", + "Type", + "TypeForShape", + "TypedFieldDef", + "UnitSpec", + "UnitSpecWithFrame", + "UrlData", + "UtcMultiTimeUnit", + "UtcSingleTimeUnit", + "VConcatSpecGenericSpec", + "ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull", + "ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull", + "ValueDefWithConditionMarkPropFieldOrDatumDefnumber", + "ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray", + "ValueDefWithConditionMarkPropFieldOrDatumDefstringnull", + "ValueDefWithConditionStringFieldDefText", + "ValueDefnumber", + "ValueDefnumberwidthheightExprRef", + "VariableParameter", + "Vector2DateTime", + "Vector2Vector2number", + "Vector2boolean", + "Vector2number", + "Vector2string", + "Vector3number", + "Vector7string", + "Vector10string", + "Vector12string", + "VegaLiteSchema", + "ViewBackground", + "ViewConfig", + "WindowEventType", + "WindowFieldDef", + "WindowOnlyOp", + "WindowTransform", + "load_schema", +] + + +def load_schema() -> dict: + """Load the json schema associated with this module's functions.""" + schema_bytes = pkgutil.get_data(__name__, "vega-lite-schema.json") + if schema_bytes is None: + msg = "Unable to load vega-lite-schema.json" + raise ValueError(msg) + return json.loads(schema_bytes.decode("utf-8")) + + +class VegaLiteSchema(SchemaBase): + _rootschema = load_schema() + + @classmethod + def _default_wrapper_classes(cls) -> Iterator[type[Any]]: + return _subclasses(VegaLiteSchema) + + +class Root(VegaLiteSchema): + """ + Root schema wrapper. + + A Vega-Lite top-level specification. This is the root class for all Vega-Lite + specifications. (The json schema is generated from this type.) + """ + + _schema = VegaLiteSchema._rootschema + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class Aggregate(VegaLiteSchema): + """Aggregate schema wrapper.""" + + _schema = {"$ref": "#/definitions/Aggregate"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class AggregateOp(VegaLiteSchema): + """AggregateOp schema wrapper.""" + + _schema = {"$ref": "#/definitions/AggregateOp"} + + def __init__(self, *args): + super().__init__(*args) + + +class AggregatedFieldDef(VegaLiteSchema): + """ + AggregatedFieldDef schema wrapper. + + Parameters + ---------- + op : :class:`AggregateOp`, Literal['argmax', 'argmin', 'average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + The aggregation operation to apply to the fields (e.g., ``"sum"``, ``"average"``, or + ``"count"``). See the `full list of supported aggregation operations + `__ for more information. + field : str, :class:`FieldName` + The data field for which to compute aggregate function. This is required for all + aggregation operations except ``"count"``. + as : str, :class:`FieldName` + The output field names to use for each aggregated field. + """ + + _schema = {"$ref": "#/definitions/AggregatedFieldDef"} + + def __init__( + self, + op: Optional[SchemaBase | AggregateOp_T] = Undefined, + field: Optional[str | SchemaBase] = Undefined, + **kwds, + ): + super().__init__(op=op, field=field, **kwds) + + +class Align(VegaLiteSchema): + """Align schema wrapper.""" + + _schema = {"$ref": "#/definitions/Align"} + + def __init__(self, *args): + super().__init__(*args) + + +class AnyMark(VegaLiteSchema): + """AnyMark schema wrapper.""" + + _schema = {"$ref": "#/definitions/AnyMark"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class AnyMarkConfig(VegaLiteSchema): + """AnyMarkConfig schema wrapper.""" + + _schema = {"$ref": "#/definitions/AnyMarkConfig"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class AreaConfig(AnyMarkConfig): + """ + AreaConfig schema wrapper. + + Parameters + ---------- + align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right'] + The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). + One of ``"left"``, ``"right"``, ``"center"``. + + **Note:** Expression reference is *not* supported for range marks. + angle : dict, float, :class:`ExprRef` + The rotation angle of the text, in degrees. + aria : bool, dict, :class:`ExprRef` + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG element, removing the mark item from the ARIA accessibility tree. + ariaRole : str, dict, :class:`ExprRef` + Sets the type of user interface element of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "role" attribute. Warning: this + property is experimental and may be changed in the future. + ariaRoleDescription : str, dict, :class:`ExprRef` + A human-readable, author-localized description for the role of the mark item for + `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "aria-roledescription" attribute. + Warning: this property is experimental and may be changed in the future. + aspect : bool, dict, :class:`ExprRef` + Whether to keep aspect ratio of image marks. + baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + For text marks, the vertical text baseline. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an + expression reference that provides one of the valid values. The ``"line-top"`` and + ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are + calculated relative to the ``lineHeight`` rather than ``fontSize`` alone. + + For range marks, the vertical alignment of the marks. One of ``"top"``, + ``"middle"``, ``"bottom"``. + + **Note:** Expression reference is *not* supported for range marks. + blend : dict, :class:`Blend`, :class:`ExprRef`, Literal[None, 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'] + The color blend mode for drawing an item on its current background. Any valid `CSS + mix-blend-mode `__ + value can be used. + + __Default value:__ ``"source-over"`` + color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + cornerRadius : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles or arcs' corners. + + **Default value:** ``0`` + cornerRadiusBottomLeft : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' bottom left corner. + + **Default value:** ``0`` + cornerRadiusBottomRight : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' bottom right corner. + + **Default value:** ``0`` + cornerRadiusTopLeft : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' top right corner. + + **Default value:** ``0`` + cornerRadiusTopRight : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' top left corner. + + **Default value:** ``0`` + cursor : dict, :class:`Cursor`, :class:`ExprRef`, Literal['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', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing'] + The mouse cursor used over the mark. Any valid `CSS cursor type + `__ can be used. + description : str, dict, :class:`ExprRef` + A text description of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the `"aria-label" attribute + `__. + dir : dict, :class:`ExprRef`, Literal['ltr', 'rtl'], :class:`TextDirection` + The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` + (right-to-left). This property determines on which side is truncated in response to + the limit parameter. + + **Default value:** ``"ltr"`` + dx : dict, float, :class:`ExprRef` + The horizontal offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + dy : dict, float, :class:`ExprRef` + The vertical offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + ellipsis : str, dict, :class:`ExprRef` + The ellipsis string for text truncated in response to the limit parameter. + + **Default value:** ``"…"`` + endAngle : dict, float, :class:`ExprRef` + The end angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + fill : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default fill color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove fill. + + **Default value:** (None) + fillOpacity : dict, float, :class:`ExprRef` + The fill opacity (value between [0,1]). + + **Default value:** ``1`` + filled : bool + Whether the mark's color should be used as fill color instead of stroke color. + + **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well + as ``geoshape`` marks for `graticule + `__ data sources; + otherwise, ``true``. + + **Note:** This property cannot be used in a `style config + `__. + font : str, dict, :class:`ExprRef` + The typeface to set the text in (e.g., ``"Helvetica Neue"``). + fontSize : dict, float, :class:`ExprRef` + The font size, in pixels. + + **Default value:** ``11`` + fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + The font style (e.g., ``"italic"``). + fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a + number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and + ``"bold"`` = ``700``). + height : dict, float, :class:`ExprRef` + Height of the marks. + href : str, dict, :class:`URI`, :class:`ExprRef` + A URL to load upon mouse click. If defined, the mark acts as a hyperlink. + innerRadius : dict, float, :class:`ExprRef` + The inner radius in pixels of arc marks. ``innerRadius`` is an alias for + ``radius2``. + + **Default value:** ``0`` + interpolate : dict, :class:`ExprRef`, :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after'] + The line interpolation method to use for line and area marks. One of the following: + + * ``"linear"``: piecewise linear segments, as in a polyline. + * ``"linear-closed"``: close the linear segments to form a polygon. + * ``"step"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"step-before"``: alternate between vertical and horizontal segments, as in a + step function. + * ``"step-after"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"basis"``: a B-spline, with control point duplication on the ends. + * ``"basis-open"``: an open B-spline; may not intersect the start or end. + * ``"basis-closed"``: a closed B-spline, as in a loop. + * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends. + * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end, + but will intersect other control points. + * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop. + * ``"bundle"``: equivalent to basis, except the tension parameter is used to + straighten the spline. + * ``"monotone"``: cubic interpolation that preserves monotonicity in y. + invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None + Invalid data mode, which defines how the marks and corresponding scales should + represent invalid values (``null`` and ``NaN`` in continuous scales *without* + defined output for invalid values). + + * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and + *scales*. For path marks (for line, area, trail), this option will create paths + that connect valid points, as if the data rows with invalid values do not exist. + + * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at + invalid values. For non-path marks, this is equivalent to ``"filter"``. All + *scale* domains will *exclude* these filtered data points. + + * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid + values. Hide invalid values for non-path marks. All *scale* domains will + *include* these filtered data points (for both path and non-path marks). + + * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each + scale will use the output for invalid values defined in ``config.scale.invalid`` + or, if unspecified, by default invalid values will produce the same visual values + as zero (if the scale includes zero) or the minimum value (if the scale does not + include zero). + + * ``"break-paths-show-path-domains"`` (default) — This is equivalent to + ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and + ``"filter"`` for non-path marks. + + **Note**: If any channel's scale has an output for invalid values defined in + ``config.scale.invalid``, all values for the scales will be considered "valid" since + they can produce a reasonable output for the scales. Thus, fields for such channels + will not be filtered and will not cause path breaks. + limit : dict, float, :class:`ExprRef` + The maximum length of the text mark in pixels. The text value will be automatically + truncated if the rendered size exceeds the limit. + + **Default value:** ``0`` -- indicating no limit + line : bool, dict, :class:`OverlayMarkDef` + A flag for overlaying line on top of area marks, or an object defining the + properties of the overlayed lines. + + * If this value is an empty object (``{}``) or ``true``, lines with default + properties will be used. + + * If this value is ``false``, no lines would be automatically added to area marks. + + **Default value:** ``false``. + lineBreak : str, dict, :class:`ExprRef` + A delimiter, such as a newline character, upon which to break text strings into + multiple lines. This property is ignored if the text is array-valued. + lineHeight : dict, float, :class:`ExprRef` + The line height in pixels (the spacing between subsequent lines of text) for + multi-line text marks. + opacity : dict, float, :class:`ExprRef` + The overall opacity (value between [0,1]). + + **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, + ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. + order : bool, None + For line and trail marks, this ``order`` property can be set to ``null`` or + ``false`` to make the lines use the original order in the data sources. + orient : :class:`Orientation`, Literal['horizontal', 'vertical'] + The orientation of a non-stacked bar, tick, area, and line charts. The value is + either horizontal (default) or vertical. + + * For bar, rule and tick, this determines whether the size of the bar and tick + should be applied to x or y dimension. + * For area, this property determines the orient property of the Vega output. + * For line and trail marks, this property determines the sort order of the points in + the line if ``config.sortLineBy`` is not specified. For stacked charts, this is + always determined by the orientation of the stack; therefore explicitly specified + value will be ignored. + outerRadius : dict, float, :class:`ExprRef` + The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``. + + **Default value:** ``0`` + padAngle : dict, float, :class:`ExprRef` + The angular padding applied to sides of the arc, in radians. + point : bool, dict, Literal['transparent'], :class:`OverlayMarkDef` + A flag for overlaying points on top of line or area marks, or an object defining the + properties of the overlayed points. + + * If this property is ``"transparent"``, transparent points will be used (for + enhancing tooltips and selections). + + * If this property is an empty object (``{}``) or ``true``, filled points with + default properties will be used. + + * If this property is ``false``, no points would be automatically added to line or + area marks. + + **Default value:** ``false``. + radius : dict, float, :class:`ExprRef` + For arc mark, the primary (outer) radius in pixels. + + For text marks, polar coordinate radial offset, in pixels, of the text from the + origin determined by the ``x`` and ``y`` properties. + + **Default value:** ``min(plot_width, plot_height)/2`` + radius2 : dict, float, :class:`ExprRef` + The secondary (inner) radius in pixels of arc marks. + + **Default value:** ``0`` + shape : str, dict, :class:`ExprRef`, :class:`SymbolShape` + Shape of the point marks. Supported values include: + + * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, + ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or + ``"triangle-left"``. + * the line symbol ``"stroke"`` + * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` + * a custom `SVG path string + `__ (For correct + sizing, custom shape paths should be defined within a square bounding box with + coordinates ranging from -1 to 1 along both the x and y dimensions.) + + **Default value:** ``"circle"`` + size : dict, float, :class:`ExprRef` + Default size for marks. + + * For ``point``/``circle``/``square``, this represents the pixel area of the marks. + Note that this value sets the area of the symbol; the side lengths will increase + with the square root of this value. + * For ``bar``, this represents the band size of the bar, in pixels. + * For ``text``, this represents the font size, in pixels. + + **Default value:** + + * ``30`` for point, circle, square marks; width/height's ``step`` + * ``2`` for bar marks with discrete dimensions; + * ``5`` for bar marks with continuous dimensions; + * ``11`` for text marks. + smooth : bool, dict, :class:`ExprRef` + A boolean flag (default true) indicating if the image should be smoothed when + resized. If false, individual pixels should be scaled directly rather than + interpolated with smoothing. For SVG rendering, this option may not work in some + browsers due to lack of standardization. + startAngle : dict, float, :class:`ExprRef` + The start angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + stroke : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default stroke color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove stroke. + + **Default value:** (None) + strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square'] + The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or + ``"square"``. + + **Default value:** ``"butt"`` + strokeDash : dict, Sequence[float], :class:`ExprRef` + An array of alternating stroke, space lengths for creating dashed or dotted lines. + strokeDashOffset : dict, float, :class:`ExprRef` + The offset (in pixels) into which to begin drawing with the stroke dash array. + strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel'] + The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. + + **Default value:** ``"miter"`` + strokeMiterLimit : dict, float, :class:`ExprRef` + The miter limit at which to bevel a line join. + strokeOffset : dict, float, :class:`ExprRef` + The offset in pixels at which to draw the group stroke and fill. If unspecified, the + default behavior is to dynamically offset stroked groups such that 1 pixel stroke + widths align with the pixel grid. + strokeOpacity : dict, float, :class:`ExprRef` + The stroke opacity (value between [0,1]). + + **Default value:** ``1`` + strokeWidth : dict, float, :class:`ExprRef` + The stroke width, in pixels. + tension : dict, float, :class:`ExprRef` + Depending on the interpolation type, sets the tension parameter (for line and area + marks). + text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef` + Placeholder text if the ``text`` channel is not specified + theta : dict, float, :class:`ExprRef` + * For arc marks, the arc length in radians if theta2 is not specified, otherwise the + start arc angle. (A value of 0 indicates up or “north”, increasing values proceed + clockwise.) + + * For text marks, polar coordinate angle in radians. + theta2 : dict, float, :class:`ExprRef` + The end angle of arc marks in radians. A value of 0 indicates up or “north”, + increasing values proceed clockwise. + timeUnitBandPosition : float + Default relative band position for a time unit. If set to ``0``, the marks will be + positioned at the beginning of the time unit band step. If set to ``0.5``, the marks + will be positioned in the middle of the time unit band step. + timeUnitBandSize : float + Default relative band size for a time unit. If set to ``1``, the bandwidth of the + marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the + marks will be half of the time unit band step. + tooltip : str, bool, dict, float, :class:`ExprRef`, :class:`TooltipContent`, None + The tooltip text string to show upon mouse hover or an object defining which fields + should the tooltip be derived from. + + * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from + ``encoding`` will be used. + * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the + highlighted data point will be used. + * If set to ``null`` or ``false``, then no tooltip will be used. + + See the `tooltip `__ + documentation for a detailed discussion about tooltip in Vega-Lite. + + **Default value:** ``null`` + url : str, dict, :class:`URI`, :class:`ExprRef` + The URL of the image file for image marks. + width : dict, float, :class:`ExprRef` + Width of the marks. + x : dict, float, :class:`ExprRef`, Literal['width'] + X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without + specified ``x2`` or ``width``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2 : dict, float, :class:`ExprRef`, Literal['width'] + X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + y : dict, float, :class:`ExprRef`, Literal['height'] + Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without + specified ``y2`` or ``height``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2 : dict, float, :class:`ExprRef`, Literal['height'] + Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + """ + + _schema = {"$ref": "#/definitions/AreaConfig"} + + def __init__( + self, + align: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + angle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ariaRole: Optional[str | Parameter | SchemaBase | Map] = Undefined, + ariaRoleDescription: Optional[str | Parameter | SchemaBase | Map] = Undefined, + aspect: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + baseline: Optional[Parameter | SchemaBase | Map | TextBaseline_T] = Undefined, + blend: Optional[Parameter | SchemaBase | Map | Blend_T] = Undefined, + color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadiusBottomLeft: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cornerRadiusBottomRight: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cornerRadiusTopLeft: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadiusTopRight: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cursor: Optional[Parameter | SchemaBase | Map | Cursor_T] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + dir: Optional[Parameter | SchemaBase | Map | TextDirection_T] = Undefined, + dx: Optional[float | Parameter | SchemaBase | Map] = Undefined, + dy: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ellipsis: Optional[str | Parameter | SchemaBase | Map] = Undefined, + endAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + fill: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + filled: Optional[bool] = Undefined, + font: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined, + height: Optional[float | Parameter | SchemaBase | Map] = Undefined, + href: Optional[str | Parameter | SchemaBase | Map] = Undefined, + innerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[Parameter | SchemaBase | Map | Interpolate_T] = Undefined, + invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined, + limit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + line: Optional[bool | SchemaBase | Map] = Undefined, + lineBreak: Optional[str | Parameter | SchemaBase | Map] = Undefined, + lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + order: Optional[bool | None] = Undefined, + orient: Optional[SchemaBase | Orientation_T] = Undefined, + outerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + padAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + point: Optional[bool | SchemaBase | Literal["transparent"] | Map] = Undefined, + radius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radius2: Optional[float | Parameter | SchemaBase | Map] = Undefined, + shape: Optional[str | Parameter | SchemaBase | Map] = Undefined, + size: Optional[float | Parameter | SchemaBase | Map] = Undefined, + smooth: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + startAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + stroke: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + strokeDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined, + strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tension: Optional[float | Parameter | SchemaBase | Map] = Undefined, + text: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined, + theta: Optional[float | Parameter | SchemaBase | Map] = Undefined, + theta2: Optional[float | Parameter | SchemaBase | Map] = Undefined, + timeUnitBandPosition: Optional[float] = Undefined, + timeUnitBandSize: Optional[float] = Undefined, + tooltip: Optional[ + str | bool | float | Parameter | SchemaBase | Map | None + ] = Undefined, + url: Optional[str | Parameter | SchemaBase | Map] = Undefined, + width: Optional[float | Parameter | SchemaBase | Map] = Undefined, + x: Optional[ + float | Parameter | SchemaBase | Literal["width"] | Map + ] = Undefined, + x2: Optional[ + float | Parameter | SchemaBase | Literal["width"] | Map + ] = Undefined, + y: Optional[ + float | Parameter | SchemaBase | Literal["height"] | Map + ] = Undefined, + y2: Optional[ + float | Parameter | SchemaBase | Literal["height"] | Map + ] = Undefined, + **kwds, + ): + super().__init__( + align=align, + angle=angle, + aria=aria, + ariaRole=ariaRole, + ariaRoleDescription=ariaRoleDescription, + aspect=aspect, + baseline=baseline, + blend=blend, + color=color, + cornerRadius=cornerRadius, + cornerRadiusBottomLeft=cornerRadiusBottomLeft, + cornerRadiusBottomRight=cornerRadiusBottomRight, + cornerRadiusTopLeft=cornerRadiusTopLeft, + cornerRadiusTopRight=cornerRadiusTopRight, + cursor=cursor, + description=description, + dir=dir, + dx=dx, + dy=dy, + ellipsis=ellipsis, + endAngle=endAngle, + fill=fill, + fillOpacity=fillOpacity, + filled=filled, + font=font, + fontSize=fontSize, + fontStyle=fontStyle, + fontWeight=fontWeight, + height=height, + href=href, + innerRadius=innerRadius, + interpolate=interpolate, + invalid=invalid, + limit=limit, + line=line, + lineBreak=lineBreak, + lineHeight=lineHeight, + opacity=opacity, + order=order, + orient=orient, + outerRadius=outerRadius, + padAngle=padAngle, + point=point, + radius=radius, + radius2=radius2, + shape=shape, + size=size, + smooth=smooth, + startAngle=startAngle, + stroke=stroke, + strokeCap=strokeCap, + strokeDash=strokeDash, + strokeDashOffset=strokeDashOffset, + strokeJoin=strokeJoin, + strokeMiterLimit=strokeMiterLimit, + strokeOffset=strokeOffset, + strokeOpacity=strokeOpacity, + strokeWidth=strokeWidth, + tension=tension, + text=text, + theta=theta, + theta2=theta2, + timeUnitBandPosition=timeUnitBandPosition, + timeUnitBandSize=timeUnitBandSize, + tooltip=tooltip, + url=url, + width=width, + x=x, + x2=x2, + y=y, + y2=y2, + **kwds, + ) + + +class ArgmaxDef(Aggregate): + """ + ArgmaxDef schema wrapper. + + Parameters + ---------- + argmax : str, :class:`FieldName` + + """ + + _schema = {"$ref": "#/definitions/ArgmaxDef"} + + def __init__(self, argmax: Optional[str | SchemaBase] = Undefined, **kwds): + super().__init__(argmax=argmax, **kwds) + + +class ArgminDef(Aggregate): + """ + ArgminDef schema wrapper. + + Parameters + ---------- + argmin : str, :class:`FieldName` + + """ + + _schema = {"$ref": "#/definitions/ArgminDef"} + + def __init__(self, argmin: Optional[str | SchemaBase] = Undefined, **kwds): + super().__init__(argmin=argmin, **kwds) + + +class AutoSizeParams(VegaLiteSchema): + """ + AutoSizeParams schema wrapper. + + Parameters + ---------- + contains : Literal['content', 'padding'] + Determines how size calculation should be performed, one of ``"content"`` or + ``"padding"``. The default setting (``"content"``) interprets the width and height + settings as the data rectangle (plotting) dimensions, to which padding is then + added. In contrast, the ``"padding"`` setting includes the padding within the view + size calculations, such that the width and height settings indicate the **total** + intended size of the view. + + **Default value**: ``"content"`` + resize : bool + A boolean flag indicating if autosize layout should be re-calculated on every view + update. + + **Default value**: ``false`` + type : :class:`AutosizeType`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y'] + The sizing format type. One of ``"pad"``, ``"fit"``, ``"fit-x"``, ``"fit-y"``, or + ``"none"``. See the `autosize type + `__ documentation for + descriptions of each. + + **Default value**: ``"pad"`` + """ + + _schema = {"$ref": "#/definitions/AutoSizeParams"} + + def __init__( + self, + contains: Optional[Literal["content", "padding"]] = Undefined, + resize: Optional[bool] = Undefined, + type: Optional[SchemaBase | AutosizeType_T] = Undefined, + **kwds, + ): + super().__init__(contains=contains, resize=resize, type=type, **kwds) + + +class AutosizeType(VegaLiteSchema): + """AutosizeType schema wrapper.""" + + _schema = {"$ref": "#/definitions/AutosizeType"} + + def __init__(self, *args): + super().__init__(*args) + + +class Axis(VegaLiteSchema): + """ + Axis schema wrapper. + + Parameters + ---------- + aria : bool, dict, :class:`ExprRef` + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG group, removing the axis from the ARIA accessibility tree. + + **Default value:** ``true`` + bandPosition : dict, float, :class:`ExprRef` + An interpolation fraction indicating where, for ``band`` scales, axis ticks should + be positioned. A value of ``0`` places ticks at the left edge of their bands. A + value of ``0.5`` places ticks in the middle of their bands. + + **Default value:** ``0.5`` + description : str, dict, :class:`ExprRef` + A text description of this axis for `ARIA accessibility + `__ (SVG output + only). If the ``aria`` property is true, for SVG output the `"aria-label" attribute + `__ + will be set to this description. If the description is unspecified it will be + automatically generated. + domain : bool + A boolean flag indicating if the domain (the axis baseline) should be included as + part of the axis. + + **Default value:** ``true`` + domainCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square'] + The stroke cap for the domain line's ending style. One of ``"butt"``, ``"round"`` or + ``"square"``. + + **Default value:** ``"butt"`` + domainColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Color of axis domain line. + + **Default value:** ``"gray"``. + domainDash : dict, Sequence[float], :class:`ExprRef` + An array of alternating [stroke, space] lengths for dashed domain lines. + domainDashOffset : dict, float, :class:`ExprRef` + The pixel offset at which to start drawing with the domain dash array. + domainOpacity : dict, float, :class:`ExprRef` + Opacity of the axis domain line. + domainWidth : dict, float, :class:`ExprRef` + Stroke width of axis domain line + + **Default value:** ``1`` + format : str, dict, :class:`Dict` + When used with the default ``"number"`` and ``"time"`` format type, the text + formatting pattern for labels of guides (axes, legends, headers) and text marks. + + * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's + `number format pattern `__. + * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time + format pattern `__. + + See the `format documentation `__ + for more examples. + + When used with a `custom formatType + `__, this + value will be passed as ``format`` alongside ``datum.value`` to the registered + function. + + **Default value:** Derived from `numberFormat + `__ config for number + format and from `timeFormat + `__ config for time + format. + formatType : str + The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom + format type + `__. + + **Default value:** + + * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``. + * ``"number"`` for quantitative fields as well as ordinal and nominal fields without + ``timeUnit``. + grid : bool + 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``. + gridCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square'] + The stroke cap for grid lines' ending style. One of ``"butt"``, ``"round"`` or + ``"square"``. + + **Default value:** ``"butt"`` + gridColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, :class:`ConditionalAxisColor`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Color of gridlines. + + **Default value:** ``"lightGray"``. + gridDash : dict, Sequence[float], :class:`ExprRef`, :class:`ConditionalAxisNumberArray` + An array of alternating [stroke, space] lengths for dashed grid lines. + gridDashOffset : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + The pixel offset at which to start drawing with the grid dash array. + gridOpacity : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + The stroke opacity of grid (value between [0,1]) + + **Default value:** ``1`` + gridWidth : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + The grid width, in pixels. + + **Default value:** ``1`` + labelAlign : dict, :class:`Align`, :class:`ExprRef`, :class:`ConditionalAxisLabelAlign`, Literal['left', 'center', 'right'] + Horizontal text alignment of axis tick labels, overriding the default setting for + the current axis orientation. + labelAngle : dict, float, :class:`ExprRef` + The rotation angle of the axis labels. + + **Default value:** ``-90`` for nominal and ordinal fields; ``0`` otherwise. + labelBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, :class:`ConditionalAxisLabelBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + Vertical text baseline of axis tick labels, overriding the default setting for the + current axis orientation. One of ``"alphabetic"`` (default), ``"top"``, + ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The ``"line-top"`` + and ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but + are calculated relative to the *lineHeight* rather than *fontSize* alone. + labelBound : bool, dict, float, :class:`ExprRef` + Indicates if labels should be hidden if they exceed the axis range. If ``false`` + (the default) no bounds overlap analysis is performed. If ``true``, labels will be + hidden if they exceed the axis range by more than 1 pixel. If this property is a + number, it specifies the pixel tolerance: the maximum amount by which a label + bounding box may exceed the axis range. + + **Default value:** ``false``. + labelColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, :class:`ConditionalAxisColor`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + The color of the tick label, can be in hex color code or regular color name. + labelExpr : str + `Vega expression `__ for customizing + labels. + + **Note:** The label text and value can be assessed via the ``label`` and ``value`` + properties of the axis's backing ``datum`` object. + labelFlush : bool, float + Indicates if the first and last axis labels should be aligned flush with the scale + range. Flush alignment for a horizontal axis will left-align the first label and + right-align the last label. For vertical axes, bottom and top text baselines are + applied instead. If this property is a number, it also indicates the number of + pixels by which to offset the first and last labels; for example, a value of 2 will + flush-align the first and last labels and also push them 2 pixels outward from the + center of the axis. The additional adjustment can sometimes help the labels better + visually group with corresponding axis ticks. + + **Default value:** ``true`` for axis of a continuous x-scale. Otherwise, ``false``. + labelFlushOffset : dict, float, :class:`ExprRef` + Indicates the number of pixels by which to offset flush-adjusted labels. For + example, a value of ``2`` will push flush-adjusted labels 2 pixels outward from the + center of the axis. Offsets can help the labels better visually group with + corresponding axis ticks. + + **Default value:** ``0``. + labelFont : str, dict, :class:`ExprRef`, :class:`ConditionalAxisString` + The font of the tick label. + labelFontSize : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + The font size of the label, in pixels. + labelFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`, :class:`ConditionalAxisLabelFontStyle` + Font style of the title. + labelFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, :class:`ConditionalAxisLabelFontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + Font weight of axis tick labels. + labelLimit : dict, float, :class:`ExprRef` + Maximum allowed pixel width of axis tick labels. + + **Default value:** ``180`` + labelLineHeight : dict, float, :class:`ExprRef` + Line height in pixels for multi-line label text or label text with ``"line-top"`` or + ``"line-bottom"`` baseline. + labelOffset : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + Position offset in pixels to apply to labels, in addition to tickOffset. + + **Default value:** ``0`` + labelOpacity : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + The opacity of the labels. + labelOverlap : bool, dict, :class:`ExprRef`, :class:`LabelOverlap`, Literal['greedy', 'parity'] + The strategy to use for resolving overlap of axis labels. If ``false`` (the + default), no overlap reduction is attempted. If set to ``true`` or ``"parity"``, a + strategy of removing every other label is used (this works well for standard linear + axes). If set to ``"greedy"``, a linear scan of the labels is performed, removing + any labels that overlaps with the last visible label (this often works better for + log-scaled axes). + + **Default value:** ``true`` for non-nominal fields with non-log scales; ``"greedy"`` + for log scales; otherwise ``false``. + labelPadding : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + The padding in pixels between labels and ticks. + + **Default value:** ``2`` + labelSeparation : dict, float, :class:`ExprRef` + The minimum separation that must be between label bounding boxes for them to be + considered non-overlapping (default ``0``). This property is ignored if + *labelOverlap* resolution is not enabled. + labels : bool + A boolean flag indicating if labels should be included as part of the axis. + + **Default value:** ``true``. + maxExtent : dict, float, :class:`ExprRef` + The maximum extent in pixels that axis ticks and labels should use. This determines + a maximum offset value for axis titles. + + **Default value:** ``undefined``. + minExtent : dict, float, :class:`ExprRef` + The minimum extent in pixels that axis ticks and labels should use. This determines + a minimum offset value for axis titles. + + **Default value:** ``30`` for y-axis; ``undefined`` for x-axis. + offset : dict, float, :class:`ExprRef` + 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) + orient : dict, :class:`ExprRef`, :class:`AxisOrient`, Literal['top', 'bottom', 'left', 'right'] + 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., + a y-axis oriented towards the right edge of the chart). + + **Default value:** ``"bottom"`` for x-axes and ``"left"`` for y-axes. + position : dict, float, :class:`ExprRef` + The anchor position of the axis in pixels. For x-axes with top or bottom + orientation, this sets the axis group x coordinate. For y-axes with left or right + orientation, this sets the axis group y coordinate. + + **Default value**: ``0`` + style : str, Sequence[str] + A string or array of strings indicating the name of custom styles to apply to the + axis. A style is a named collection of axis property defined within the `style + configuration `__. If + style is an array, later styles will override earlier styles. + + **Default value:** (none) **Note:** Any specified style will augment the default + style. For example, an x-axis mark with ``"style": "foo"`` will use ``config.axisX`` + and ``config.style.foo`` (the specified style ``"foo"`` has higher precedence). + tickBand : dict, :class:`ExprRef`, Literal['center', 'extent'] + For band scales, indicates if ticks and grid lines should be placed at the + ``"center"`` of a band (default) or at the band ``"extent"``s to indicate intervals + tickCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square'] + The stroke cap for the tick lines' ending style. One of ``"butt"``, ``"round"`` or + ``"square"``. + + **Default value:** ``"butt"`` + tickColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, :class:`ConditionalAxisColor`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + The color of the axis's tick. + + **Default value:** ``"gray"`` + tickCount : dict, float, :class:`ExprRef`, :class:`TimeInterval`, :class:`TimeIntervalStep`, Literal['millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'year'] + A desired number of ticks, for axes visualizing quantitative scales. The resulting + number may be different so that values are "nice" (multiples of 2, 5, 10) and lie + within the underlying scale's range. + + For scales of type ``"time"`` or ``"utc"``, the tick count can instead be a time + interval specifier. Legal string values are ``"millisecond"``, ``"second"``, + ``"minute"``, ``"hour"``, ``"day"``, ``"week"``, ``"month"``, and ``"year"``. + Alternatively, an object-valued interval specifier of the form ``{"interval": + "month", "step": 3}`` includes a desired number of interval steps. Here, ticks are + generated for each quarter (Jan, Apr, Jul, Oct) boundary. + + **Default value**: Determine using a formula ``ceil(width/40)`` for x and + ``ceil(height/40)`` for y. + tickDash : dict, Sequence[float], :class:`ExprRef`, :class:`ConditionalAxisNumberArray` + An array of alternating [stroke, space] lengths for dashed tick mark lines. + tickDashOffset : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + The pixel offset at which to start drawing with the tick mark dash array. + tickExtra : bool + Boolean flag indicating if an extra axis tick should be added for the initial + position of the axis. This flag is useful for styling axes for ``band`` scales such + that ticks are placed on band boundaries rather in the middle of a band. Use in + conjunction with ``"bandPosition": 1`` and an axis ``"padding"`` value of ``0``. + tickMinStep : dict, float, :class:`ExprRef` + The minimum desired step between axis ticks, in terms of scale domain values. For + example, a value of ``1`` indicates that ticks should not be less than 1 unit apart. + If ``tickMinStep`` is specified, the ``tickCount`` value will be adjusted, if + necessary, to enforce the minimum step value. + tickOffset : dict, float, :class:`ExprRef` + Position offset in pixels to apply to ticks, labels, and gridlines. + tickOpacity : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + Opacity of the ticks. + tickRound : bool + Boolean flag indicating if pixel position values should be rounded to the nearest + integer. + + **Default value:** ``true`` + tickSize : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + The size in pixels of axis ticks. + + **Default value:** ``5`` + tickWidth : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + The width, in pixels, of ticks. + + **Default value:** ``1`` + ticks : bool + Boolean value that determines whether the axis should include ticks. + + **Default value:** ``true`` + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + titleAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right'] + Horizontal text alignment of axis titles. + titleAnchor : dict, :class:`ExprRef`, :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end'] + Text anchor position for placing axis titles. + titleAngle : dict, float, :class:`ExprRef` + Angle in degrees of axis titles. + titleBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + Vertical text baseline for axis titles. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The + ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and + ``"bottom"``, but are calculated relative to the *lineHeight* rather than *fontSize* + alone. + titleColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Color of the title, can be in hex color code or regular color name. + titleFont : str, dict, :class:`ExprRef` + Font of the title. (e.g., ``"Helvetica Neue"``). + titleFontSize : dict, float, :class:`ExprRef` + Font size of the title. + titleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + Font style of the title. + titleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + Font weight of the title. This can be either a string (e.g ``"bold"``, ``"normal"``) + or a number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` + and ``"bold"`` = ``700``). + titleLimit : dict, float, :class:`ExprRef` + Maximum allowed pixel width of axis titles. + titleLineHeight : dict, float, :class:`ExprRef` + Line height in pixels for multi-line title text or title text with ``"line-top"`` or + ``"line-bottom"`` baseline. + titleOpacity : dict, float, :class:`ExprRef` + Opacity of the axis title. + titlePadding : dict, float, :class:`ExprRef` + The padding, in pixels, between title and axis. + titleX : dict, float, :class:`ExprRef` + X-coordinate of the axis title relative to the axis group. + titleY : dict, float, :class:`ExprRef` + Y-coordinate of the axis title relative to the axis group. + translate : dict, float, :class:`ExprRef` + Coordinate space translation offset for axis layout. By default, axes are translated + by a 0.5 pixel offset for both the x and y coordinates in order to align stroked + lines with the pixel grid. However, for vector graphics output these pixel-specific + adjustments may be undesirable, in which case translate can be changed (for example, + to zero). + + **Default value:** ``0.5`` + values : dict, Sequence[str], Sequence[bool], Sequence[float], :class:`ExprRef`, Sequence[dict, :class:`DateTime`] + Explicitly set the visible axis tick values. + zindex : float + A non-negative integer indicating the z-index of the axis. If zindex is 0, axes + should be drawn behind all chart elements. To put them in front, set ``zindex`` to + ``1`` or more. + + **Default value:** ``0`` (behind the marks). + """ + + _schema = {"$ref": "#/definitions/Axis"} + + def __init__( + self, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + bandPosition: Optional[float | Parameter | SchemaBase | Map] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[bool] = Undefined, + domainCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + domainColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + domainDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + domainDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + grid: Optional[bool] = Undefined, + gridCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + gridColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + gridDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + gridDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelBound: Optional[bool | float | Parameter | SchemaBase | Map] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFlush: Optional[bool | float] = Undefined, + labelFlushOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOverlap: Optional[ + bool | Parameter | SchemaBase | Literal["greedy", "parity"] | Map + ] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labels: Optional[bool] = Undefined, + maxExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + minExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[Parameter | SchemaBase | Map | AxisOrient_T] = Undefined, + position: Optional[float | Parameter | SchemaBase | Map] = Undefined, + style: Optional[str | Sequence[str]] = Undefined, + tickBand: Optional[ + Parameter | SchemaBase | Literal["center", "extent"] | Map + ] = Undefined, + tickCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + tickColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + tickCount: Optional[ + float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + tickDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + tickDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickExtra: Optional[bool] = Undefined, + tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickRound: Optional[bool] = Undefined, + tickSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ticks: Optional[bool] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined, + titleAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleX: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleY: Optional[float | Parameter | SchemaBase | Map] = Undefined, + translate: Optional[float | Parameter | SchemaBase | Map] = Undefined, + values: Optional[ + Parameter + | SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + ] = Undefined, + zindex: Optional[float] = Undefined, + **kwds, + ): + super().__init__( + aria=aria, + bandPosition=bandPosition, + description=description, + domain=domain, + domainCap=domainCap, + domainColor=domainColor, + domainDash=domainDash, + domainDashOffset=domainDashOffset, + domainOpacity=domainOpacity, + domainWidth=domainWidth, + format=format, + formatType=formatType, + grid=grid, + gridCap=gridCap, + gridColor=gridColor, + gridDash=gridDash, + gridDashOffset=gridDashOffset, + gridOpacity=gridOpacity, + gridWidth=gridWidth, + labelAlign=labelAlign, + labelAngle=labelAngle, + labelBaseline=labelBaseline, + labelBound=labelBound, + labelColor=labelColor, + labelExpr=labelExpr, + labelFlush=labelFlush, + labelFlushOffset=labelFlushOffset, + labelFont=labelFont, + labelFontSize=labelFontSize, + labelFontStyle=labelFontStyle, + labelFontWeight=labelFontWeight, + labelLimit=labelLimit, + labelLineHeight=labelLineHeight, + labelOffset=labelOffset, + labelOpacity=labelOpacity, + labelOverlap=labelOverlap, + labelPadding=labelPadding, + labelSeparation=labelSeparation, + labels=labels, + maxExtent=maxExtent, + minExtent=minExtent, + offset=offset, + orient=orient, + position=position, + style=style, + tickBand=tickBand, + tickCap=tickCap, + tickColor=tickColor, + tickCount=tickCount, + tickDash=tickDash, + tickDashOffset=tickDashOffset, + tickExtra=tickExtra, + tickMinStep=tickMinStep, + tickOffset=tickOffset, + tickOpacity=tickOpacity, + tickRound=tickRound, + tickSize=tickSize, + tickWidth=tickWidth, + ticks=ticks, + title=title, + titleAlign=titleAlign, + titleAnchor=titleAnchor, + titleAngle=titleAngle, + titleBaseline=titleBaseline, + titleColor=titleColor, + titleFont=titleFont, + titleFontSize=titleFontSize, + titleFontStyle=titleFontStyle, + titleFontWeight=titleFontWeight, + titleLimit=titleLimit, + titleLineHeight=titleLineHeight, + titleOpacity=titleOpacity, + titlePadding=titlePadding, + titleX=titleX, + titleY=titleY, + translate=translate, + values=values, + zindex=zindex, + **kwds, + ) + + +class AxisConfig(VegaLiteSchema): + """ + AxisConfig schema wrapper. + + Parameters + ---------- + aria : bool, dict, :class:`ExprRef` + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG group, removing the axis from the ARIA accessibility tree. + + **Default value:** ``true`` + bandPosition : dict, float, :class:`ExprRef` + An interpolation fraction indicating where, for ``band`` scales, axis ticks should + be positioned. A value of ``0`` places ticks at the left edge of their bands. A + value of ``0.5`` places ticks in the middle of their bands. + + **Default value:** ``0.5`` + description : str, dict, :class:`ExprRef` + A text description of this axis for `ARIA accessibility + `__ (SVG output + only). If the ``aria`` property is true, for SVG output the `"aria-label" attribute + `__ + will be set to this description. If the description is unspecified it will be + automatically generated. + disable : bool + Disable axis by default. + domain : bool + A boolean flag indicating if the domain (the axis baseline) should be included as + part of the axis. + + **Default value:** ``true`` + domainCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square'] + The stroke cap for the domain line's ending style. One of ``"butt"``, ``"round"`` or + ``"square"``. + + **Default value:** ``"butt"`` + domainColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Color of axis domain line. + + **Default value:** ``"gray"``. + domainDash : dict, Sequence[float], :class:`ExprRef` + An array of alternating [stroke, space] lengths for dashed domain lines. + domainDashOffset : dict, float, :class:`ExprRef` + The pixel offset at which to start drawing with the domain dash array. + domainOpacity : dict, float, :class:`ExprRef` + Opacity of the axis domain line. + domainWidth : dict, float, :class:`ExprRef` + Stroke width of axis domain line + + **Default value:** ``1`` + format : str, dict, :class:`Dict` + When used with the default ``"number"`` and ``"time"`` format type, the text + formatting pattern for labels of guides (axes, legends, headers) and text marks. + + * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's + `number format pattern `__. + * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time + format pattern `__. + + See the `format documentation `__ + for more examples. + + When used with a `custom formatType + `__, this + value will be passed as ``format`` alongside ``datum.value`` to the registered + function. + + **Default value:** Derived from `numberFormat + `__ config for number + format and from `timeFormat + `__ config for time + format. + formatType : str + The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom + format type + `__. + + **Default value:** + + * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``. + * ``"number"`` for quantitative fields as well as ordinal and nominal fields without + ``timeUnit``. + grid : bool + 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``. + gridCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square'] + The stroke cap for grid lines' ending style. One of ``"butt"``, ``"round"`` or + ``"square"``. + + **Default value:** ``"butt"`` + gridColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, :class:`ConditionalAxisColor`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Color of gridlines. + + **Default value:** ``"lightGray"``. + gridDash : dict, Sequence[float], :class:`ExprRef`, :class:`ConditionalAxisNumberArray` + An array of alternating [stroke, space] lengths for dashed grid lines. + gridDashOffset : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + The pixel offset at which to start drawing with the grid dash array. + gridOpacity : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + The stroke opacity of grid (value between [0,1]) + + **Default value:** ``1`` + gridWidth : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + The grid width, in pixels. + + **Default value:** ``1`` + labelAlign : dict, :class:`Align`, :class:`ExprRef`, :class:`ConditionalAxisLabelAlign`, Literal['left', 'center', 'right'] + Horizontal text alignment of axis tick labels, overriding the default setting for + the current axis orientation. + labelAngle : dict, float, :class:`ExprRef` + The rotation angle of the axis labels. + + **Default value:** ``-90`` for nominal and ordinal fields; ``0`` otherwise. + labelBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, :class:`ConditionalAxisLabelBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + Vertical text baseline of axis tick labels, overriding the default setting for the + current axis orientation. One of ``"alphabetic"`` (default), ``"top"``, + ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The ``"line-top"`` + and ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but + are calculated relative to the *lineHeight* rather than *fontSize* alone. + labelBound : bool, dict, float, :class:`ExprRef` + Indicates if labels should be hidden if they exceed the axis range. If ``false`` + (the default) no bounds overlap analysis is performed. If ``true``, labels will be + hidden if they exceed the axis range by more than 1 pixel. If this property is a + number, it specifies the pixel tolerance: the maximum amount by which a label + bounding box may exceed the axis range. + + **Default value:** ``false``. + labelColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, :class:`ConditionalAxisColor`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + The color of the tick label, can be in hex color code or regular color name. + labelExpr : str + `Vega expression `__ for customizing + labels. + + **Note:** The label text and value can be assessed via the ``label`` and ``value`` + properties of the axis's backing ``datum`` object. + labelFlush : bool, float + Indicates if the first and last axis labels should be aligned flush with the scale + range. Flush alignment for a horizontal axis will left-align the first label and + right-align the last label. For vertical axes, bottom and top text baselines are + applied instead. If this property is a number, it also indicates the number of + pixels by which to offset the first and last labels; for example, a value of 2 will + flush-align the first and last labels and also push them 2 pixels outward from the + center of the axis. The additional adjustment can sometimes help the labels better + visually group with corresponding axis ticks. + + **Default value:** ``true`` for axis of a continuous x-scale. Otherwise, ``false``. + labelFlushOffset : dict, float, :class:`ExprRef` + Indicates the number of pixels by which to offset flush-adjusted labels. For + example, a value of ``2`` will push flush-adjusted labels 2 pixels outward from the + center of the axis. Offsets can help the labels better visually group with + corresponding axis ticks. + + **Default value:** ``0``. + labelFont : str, dict, :class:`ExprRef`, :class:`ConditionalAxisString` + The font of the tick label. + labelFontSize : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + The font size of the label, in pixels. + labelFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`, :class:`ConditionalAxisLabelFontStyle` + Font style of the title. + labelFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, :class:`ConditionalAxisLabelFontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + Font weight of axis tick labels. + labelLimit : dict, float, :class:`ExprRef` + Maximum allowed pixel width of axis tick labels. + + **Default value:** ``180`` + labelLineHeight : dict, float, :class:`ExprRef` + Line height in pixels for multi-line label text or label text with ``"line-top"`` or + ``"line-bottom"`` baseline. + labelOffset : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + Position offset in pixels to apply to labels, in addition to tickOffset. + + **Default value:** ``0`` + labelOpacity : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + The opacity of the labels. + labelOverlap : bool, dict, :class:`ExprRef`, :class:`LabelOverlap`, Literal['greedy', 'parity'] + The strategy to use for resolving overlap of axis labels. If ``false`` (the + default), no overlap reduction is attempted. If set to ``true`` or ``"parity"``, a + strategy of removing every other label is used (this works well for standard linear + axes). If set to ``"greedy"``, a linear scan of the labels is performed, removing + any labels that overlaps with the last visible label (this often works better for + log-scaled axes). + + **Default value:** ``true`` for non-nominal fields with non-log scales; ``"greedy"`` + for log scales; otherwise ``false``. + labelPadding : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + The padding in pixels between labels and ticks. + + **Default value:** ``2`` + labelSeparation : dict, float, :class:`ExprRef` + The minimum separation that must be between label bounding boxes for them to be + considered non-overlapping (default ``0``). This property is ignored if + *labelOverlap* resolution is not enabled. + labels : bool + A boolean flag indicating if labels should be included as part of the axis. + + **Default value:** ``true``. + maxExtent : dict, float, :class:`ExprRef` + The maximum extent in pixels that axis ticks and labels should use. This determines + a maximum offset value for axis titles. + + **Default value:** ``undefined``. + minExtent : dict, float, :class:`ExprRef` + The minimum extent in pixels that axis ticks and labels should use. This determines + a minimum offset value for axis titles. + + **Default value:** ``30`` for y-axis; ``undefined`` for x-axis. + offset : dict, float, :class:`ExprRef` + 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) + orient : dict, :class:`ExprRef`, :class:`AxisOrient`, Literal['top', 'bottom', 'left', 'right'] + 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., + a y-axis oriented towards the right edge of the chart). + + **Default value:** ``"bottom"`` for x-axes and ``"left"`` for y-axes. + position : dict, float, :class:`ExprRef` + The anchor position of the axis in pixels. For x-axes with top or bottom + orientation, this sets the axis group x coordinate. For y-axes with left or right + orientation, this sets the axis group y coordinate. + + **Default value**: ``0`` + style : str, Sequence[str] + A string or array of strings indicating the name of custom styles to apply to the + axis. A style is a named collection of axis property defined within the `style + configuration `__. If + style is an array, later styles will override earlier styles. + + **Default value:** (none) **Note:** Any specified style will augment the default + style. For example, an x-axis mark with ``"style": "foo"`` will use ``config.axisX`` + and ``config.style.foo`` (the specified style ``"foo"`` has higher precedence). + tickBand : dict, :class:`ExprRef`, Literal['center', 'extent'] + For band scales, indicates if ticks and grid lines should be placed at the + ``"center"`` of a band (default) or at the band ``"extent"``s to indicate intervals + tickCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square'] + The stroke cap for the tick lines' ending style. One of ``"butt"``, ``"round"`` or + ``"square"``. + + **Default value:** ``"butt"`` + tickColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, :class:`ConditionalAxisColor`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + The color of the axis's tick. + + **Default value:** ``"gray"`` + tickCount : dict, float, :class:`ExprRef`, :class:`TimeInterval`, :class:`TimeIntervalStep`, Literal['millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'year'] + A desired number of ticks, for axes visualizing quantitative scales. The resulting + number may be different so that values are "nice" (multiples of 2, 5, 10) and lie + within the underlying scale's range. + + For scales of type ``"time"`` or ``"utc"``, the tick count can instead be a time + interval specifier. Legal string values are ``"millisecond"``, ``"second"``, + ``"minute"``, ``"hour"``, ``"day"``, ``"week"``, ``"month"``, and ``"year"``. + Alternatively, an object-valued interval specifier of the form ``{"interval": + "month", "step": 3}`` includes a desired number of interval steps. Here, ticks are + generated for each quarter (Jan, Apr, Jul, Oct) boundary. + + **Default value**: Determine using a formula ``ceil(width/40)`` for x and + ``ceil(height/40)`` for y. + tickDash : dict, Sequence[float], :class:`ExprRef`, :class:`ConditionalAxisNumberArray` + An array of alternating [stroke, space] lengths for dashed tick mark lines. + tickDashOffset : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + The pixel offset at which to start drawing with the tick mark dash array. + tickExtra : bool + Boolean flag indicating if an extra axis tick should be added for the initial + position of the axis. This flag is useful for styling axes for ``band`` scales such + that ticks are placed on band boundaries rather in the middle of a band. Use in + conjunction with ``"bandPosition": 1`` and an axis ``"padding"`` value of ``0``. + tickMinStep : dict, float, :class:`ExprRef` + The minimum desired step between axis ticks, in terms of scale domain values. For + example, a value of ``1`` indicates that ticks should not be less than 1 unit apart. + If ``tickMinStep`` is specified, the ``tickCount`` value will be adjusted, if + necessary, to enforce the minimum step value. + tickOffset : dict, float, :class:`ExprRef` + Position offset in pixels to apply to ticks, labels, and gridlines. + tickOpacity : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + Opacity of the ticks. + tickRound : bool + Boolean flag indicating if pixel position values should be rounded to the nearest + integer. + + **Default value:** ``true`` + tickSize : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + The size in pixels of axis ticks. + + **Default value:** ``5`` + tickWidth : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber` + The width, in pixels, of ticks. + + **Default value:** ``1`` + ticks : bool + Boolean value that determines whether the axis should include ticks. + + **Default value:** ``true`` + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + titleAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right'] + Horizontal text alignment of axis titles. + titleAnchor : dict, :class:`ExprRef`, :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end'] + Text anchor position for placing axis titles. + titleAngle : dict, float, :class:`ExprRef` + Angle in degrees of axis titles. + titleBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + Vertical text baseline for axis titles. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The + ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and + ``"bottom"``, but are calculated relative to the *lineHeight* rather than *fontSize* + alone. + titleColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Color of the title, can be in hex color code or regular color name. + titleFont : str, dict, :class:`ExprRef` + Font of the title. (e.g., ``"Helvetica Neue"``). + titleFontSize : dict, float, :class:`ExprRef` + Font size of the title. + titleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + Font style of the title. + titleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + Font weight of the title. This can be either a string (e.g ``"bold"``, ``"normal"``) + or a number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` + and ``"bold"`` = ``700``). + titleLimit : dict, float, :class:`ExprRef` + Maximum allowed pixel width of axis titles. + titleLineHeight : dict, float, :class:`ExprRef` + Line height in pixels for multi-line title text or title text with ``"line-top"`` or + ``"line-bottom"`` baseline. + titleOpacity : dict, float, :class:`ExprRef` + Opacity of the axis title. + titlePadding : dict, float, :class:`ExprRef` + The padding, in pixels, between title and axis. + titleX : dict, float, :class:`ExprRef` + X-coordinate of the axis title relative to the axis group. + titleY : dict, float, :class:`ExprRef` + Y-coordinate of the axis title relative to the axis group. + translate : dict, float, :class:`ExprRef` + Coordinate space translation offset for axis layout. By default, axes are translated + by a 0.5 pixel offset for both the x and y coordinates in order to align stroked + lines with the pixel grid. However, for vector graphics output these pixel-specific + adjustments may be undesirable, in which case translate can be changed (for example, + to zero). + + **Default value:** ``0.5`` + values : dict, Sequence[str], Sequence[bool], Sequence[float], :class:`ExprRef`, Sequence[dict, :class:`DateTime`] + Explicitly set the visible axis tick values. + zindex : float + A non-negative integer indicating the z-index of the axis. If zindex is 0, axes + should be drawn behind all chart elements. To put them in front, set ``zindex`` to + ``1`` or more. + + **Default value:** ``0`` (behind the marks). + """ + + _schema = {"$ref": "#/definitions/AxisConfig"} + + def __init__( + self, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + bandPosition: Optional[float | Parameter | SchemaBase | Map] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + disable: Optional[bool] = Undefined, + domain: Optional[bool] = Undefined, + domainCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + domainColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + domainDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + domainDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + grid: Optional[bool] = Undefined, + gridCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + gridColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + gridDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + gridDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelBound: Optional[bool | float | Parameter | SchemaBase | Map] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFlush: Optional[bool | float] = Undefined, + labelFlushOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOverlap: Optional[ + bool | Parameter | SchemaBase | Literal["greedy", "parity"] | Map + ] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labels: Optional[bool] = Undefined, + maxExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + minExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[Parameter | SchemaBase | Map | AxisOrient_T] = Undefined, + position: Optional[float | Parameter | SchemaBase | Map] = Undefined, + style: Optional[str | Sequence[str]] = Undefined, + tickBand: Optional[ + Parameter | SchemaBase | Literal["center", "extent"] | Map + ] = Undefined, + tickCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + tickColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + tickCount: Optional[ + float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + tickDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + tickDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickExtra: Optional[bool] = Undefined, + tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickRound: Optional[bool] = Undefined, + tickSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tickWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ticks: Optional[bool] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined, + titleAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleX: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleY: Optional[float | Parameter | SchemaBase | Map] = Undefined, + translate: Optional[float | Parameter | SchemaBase | Map] = Undefined, + values: Optional[ + Parameter + | SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + ] = Undefined, + zindex: Optional[float] = Undefined, + **kwds, + ): + super().__init__( + aria=aria, + bandPosition=bandPosition, + description=description, + disable=disable, + domain=domain, + domainCap=domainCap, + domainColor=domainColor, + domainDash=domainDash, + domainDashOffset=domainDashOffset, + domainOpacity=domainOpacity, + domainWidth=domainWidth, + format=format, + formatType=formatType, + grid=grid, + gridCap=gridCap, + gridColor=gridColor, + gridDash=gridDash, + gridDashOffset=gridDashOffset, + gridOpacity=gridOpacity, + gridWidth=gridWidth, + labelAlign=labelAlign, + labelAngle=labelAngle, + labelBaseline=labelBaseline, + labelBound=labelBound, + labelColor=labelColor, + labelExpr=labelExpr, + labelFlush=labelFlush, + labelFlushOffset=labelFlushOffset, + labelFont=labelFont, + labelFontSize=labelFontSize, + labelFontStyle=labelFontStyle, + labelFontWeight=labelFontWeight, + labelLimit=labelLimit, + labelLineHeight=labelLineHeight, + labelOffset=labelOffset, + labelOpacity=labelOpacity, + labelOverlap=labelOverlap, + labelPadding=labelPadding, + labelSeparation=labelSeparation, + labels=labels, + maxExtent=maxExtent, + minExtent=minExtent, + offset=offset, + orient=orient, + position=position, + style=style, + tickBand=tickBand, + tickCap=tickCap, + tickColor=tickColor, + tickCount=tickCount, + tickDash=tickDash, + tickDashOffset=tickDashOffset, + tickExtra=tickExtra, + tickMinStep=tickMinStep, + tickOffset=tickOffset, + tickOpacity=tickOpacity, + tickRound=tickRound, + tickSize=tickSize, + tickWidth=tickWidth, + ticks=ticks, + title=title, + titleAlign=titleAlign, + titleAnchor=titleAnchor, + titleAngle=titleAngle, + titleBaseline=titleBaseline, + titleColor=titleColor, + titleFont=titleFont, + titleFontSize=titleFontSize, + titleFontStyle=titleFontStyle, + titleFontWeight=titleFontWeight, + titleLimit=titleLimit, + titleLineHeight=titleLineHeight, + titleOpacity=titleOpacity, + titlePadding=titlePadding, + titleX=titleX, + titleY=titleY, + translate=translate, + values=values, + zindex=zindex, + **kwds, + ) + + +class AxisOrient(VegaLiteSchema): + """AxisOrient schema wrapper.""" + + _schema = {"$ref": "#/definitions/AxisOrient"} + + def __init__(self, *args): + super().__init__(*args) + + +class AxisResolveMap(VegaLiteSchema): + """ + AxisResolveMap schema wrapper. + + Parameters + ---------- + x : :class:`ResolveMode`, Literal['independent', 'shared'] + + y : :class:`ResolveMode`, Literal['independent', 'shared'] + + """ + + _schema = {"$ref": "#/definitions/AxisResolveMap"} + + def __init__( + self, + x: Optional[SchemaBase | ResolveMode_T] = Undefined, + y: Optional[SchemaBase | ResolveMode_T] = Undefined, + **kwds, + ): + super().__init__(x=x, y=y, **kwds) + + +class BBox(VegaLiteSchema): + """ + BBox schema wrapper. + + Bounding box https://tools.ietf.org/html/rfc7946#section-5 + """ + + _schema = {"$ref": "#/definitions/BBox"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class BarConfig(AnyMarkConfig): + """ + BarConfig schema wrapper. + + Parameters + ---------- + align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right'] + The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). + One of ``"left"``, ``"right"``, ``"center"``. + + **Note:** Expression reference is *not* supported for range marks. + angle : dict, float, :class:`ExprRef` + The rotation angle of the text, in degrees. + aria : bool, dict, :class:`ExprRef` + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG element, removing the mark item from the ARIA accessibility tree. + ariaRole : str, dict, :class:`ExprRef` + Sets the type of user interface element of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "role" attribute. Warning: this + property is experimental and may be changed in the future. + ariaRoleDescription : str, dict, :class:`ExprRef` + A human-readable, author-localized description for the role of the mark item for + `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "aria-roledescription" attribute. + Warning: this property is experimental and may be changed in the future. + aspect : bool, dict, :class:`ExprRef` + Whether to keep aspect ratio of image marks. + baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + For text marks, the vertical text baseline. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an + expression reference that provides one of the valid values. The ``"line-top"`` and + ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are + calculated relative to the ``lineHeight`` rather than ``fontSize`` alone. + + For range marks, the vertical alignment of the marks. One of ``"top"``, + ``"middle"``, ``"bottom"``. + + **Note:** Expression reference is *not* supported for range marks. + binSpacing : float + Offset between bars for binned field. The ideal value for this is either 0 + (preferred by statisticians) or 1 (Vega-Lite default, D3 example style). + + **Default value:** ``1`` + blend : dict, :class:`Blend`, :class:`ExprRef`, Literal[None, 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'] + The color blend mode for drawing an item on its current background. Any valid `CSS + mix-blend-mode `__ + value can be used. + + __Default value:__ ``"source-over"`` + color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + continuousBandSize : float + The default size of the bars on continuous scales. + + **Default value:** ``5`` + cornerRadius : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles or arcs' corners. + + **Default value:** ``0`` + cornerRadiusBottomLeft : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' bottom left corner. + + **Default value:** ``0`` + cornerRadiusBottomRight : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' bottom right corner. + + **Default value:** ``0`` + cornerRadiusEnd : dict, float, :class:`ExprRef` + * For vertical bars, top-left and top-right corner radius. + + * For horizontal bars, top-right and bottom-right corner radius. + cornerRadiusTopLeft : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' top right corner. + + **Default value:** ``0`` + cornerRadiusTopRight : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' top left corner. + + **Default value:** ``0`` + cursor : dict, :class:`Cursor`, :class:`ExprRef`, Literal['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', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing'] + The mouse cursor used over the mark. Any valid `CSS cursor type + `__ can be used. + description : str, dict, :class:`ExprRef` + A text description of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the `"aria-label" attribute + `__. + dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl'] + The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` + (right-to-left). This property determines on which side is truncated in response to + the limit parameter. + + **Default value:** ``"ltr"`` + discreteBandSize : dict, float, :class:`RelativeBandSize` + The default size of the bars with discrete dimensions. If unspecified, the default + size is ``step-2``, which provides 2 pixel offset between bars. + dx : dict, float, :class:`ExprRef` + The horizontal offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + dy : dict, float, :class:`ExprRef` + The vertical offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + ellipsis : str, dict, :class:`ExprRef` + The ellipsis string for text truncated in response to the limit parameter. + + **Default value:** ``"…"`` + endAngle : dict, float, :class:`ExprRef` + The end angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + fill : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default fill color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove fill. + + **Default value:** (None) + fillOpacity : dict, float, :class:`ExprRef` + The fill opacity (value between [0,1]). + + **Default value:** ``1`` + filled : bool + Whether the mark's color should be used as fill color instead of stroke color. + + **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well + as ``geoshape`` marks for `graticule + `__ data sources; + otherwise, ``true``. + + **Note:** This property cannot be used in a `style config + `__. + font : str, dict, :class:`ExprRef` + The typeface to set the text in (e.g., ``"Helvetica Neue"``). + fontSize : dict, float, :class:`ExprRef` + The font size, in pixels. + + **Default value:** ``11`` + fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + The font style (e.g., ``"italic"``). + fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a + number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and + ``"bold"`` = ``700``). + height : dict, float, :class:`ExprRef` + Height of the marks. + href : str, dict, :class:`URI`, :class:`ExprRef` + A URL to load upon mouse click. If defined, the mark acts as a hyperlink. + innerRadius : dict, float, :class:`ExprRef` + The inner radius in pixels of arc marks. ``innerRadius`` is an alias for + ``radius2``. + + **Default value:** ``0`` + interpolate : dict, :class:`ExprRef`, :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after'] + The line interpolation method to use for line and area marks. One of the following: + + * ``"linear"``: piecewise linear segments, as in a polyline. + * ``"linear-closed"``: close the linear segments to form a polygon. + * ``"step"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"step-before"``: alternate between vertical and horizontal segments, as in a + step function. + * ``"step-after"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"basis"``: a B-spline, with control point duplication on the ends. + * ``"basis-open"``: an open B-spline; may not intersect the start or end. + * ``"basis-closed"``: a closed B-spline, as in a loop. + * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends. + * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end, + but will intersect other control points. + * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop. + * ``"bundle"``: equivalent to basis, except the tension parameter is used to + straighten the spline. + * ``"monotone"``: cubic interpolation that preserves monotonicity in y. + invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None + Invalid data mode, which defines how the marks and corresponding scales should + represent invalid values (``null`` and ``NaN`` in continuous scales *without* + defined output for invalid values). + + * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and + *scales*. For path marks (for line, area, trail), this option will create paths + that connect valid points, as if the data rows with invalid values do not exist. + + * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at + invalid values. For non-path marks, this is equivalent to ``"filter"``. All + *scale* domains will *exclude* these filtered data points. + + * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid + values. Hide invalid values for non-path marks. All *scale* domains will + *include* these filtered data points (for both path and non-path marks). + + * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each + scale will use the output for invalid values defined in ``config.scale.invalid`` + or, if unspecified, by default invalid values will produce the same visual values + as zero (if the scale includes zero) or the minimum value (if the scale does not + include zero). + + * ``"break-paths-show-path-domains"`` (default) — This is equivalent to + ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and + ``"filter"`` for non-path marks. + + **Note**: If any channel's scale has an output for invalid values defined in + ``config.scale.invalid``, all values for the scales will be considered "valid" since + they can produce a reasonable output for the scales. Thus, fields for such channels + will not be filtered and will not cause path breaks. + limit : dict, float, :class:`ExprRef` + The maximum length of the text mark in pixels. The text value will be automatically + truncated if the rendered size exceeds the limit. + + **Default value:** ``0`` -- indicating no limit + lineBreak : str, dict, :class:`ExprRef` + A delimiter, such as a newline character, upon which to break text strings into + multiple lines. This property is ignored if the text is array-valued. + lineHeight : dict, float, :class:`ExprRef` + The line height in pixels (the spacing between subsequent lines of text) for + multi-line text marks. + minBandSize : dict, float, :class:`ExprRef` + The minimum band size for bar and rectangle marks. **Default value:** ``0.25`` + opacity : dict, float, :class:`ExprRef` + The overall opacity (value between [0,1]). + + **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, + ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. + order : bool, None + For line and trail marks, this ``order`` property can be set to ``null`` or + ``false`` to make the lines use the original order in the data sources. + orient : :class:`Orientation`, Literal['horizontal', 'vertical'] + The orientation of a non-stacked bar, tick, area, and line charts. The value is + either horizontal (default) or vertical. + + * For bar, rule and tick, this determines whether the size of the bar and tick + should be applied to x or y dimension. + * For area, this property determines the orient property of the Vega output. + * For line and trail marks, this property determines the sort order of the points in + the line if ``config.sortLineBy`` is not specified. For stacked charts, this is + always determined by the orientation of the stack; therefore explicitly specified + value will be ignored. + outerRadius : dict, float, :class:`ExprRef` + The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``. + + **Default value:** ``0`` + padAngle : dict, float, :class:`ExprRef` + The angular padding applied to sides of the arc, in radians. + radius : dict, float, :class:`ExprRef` + For arc mark, the primary (outer) radius in pixels. + + For text marks, polar coordinate radial offset, in pixels, of the text from the + origin determined by the ``x`` and ``y`` properties. + + **Default value:** ``min(plot_width, plot_height)/2`` + radius2 : dict, float, :class:`ExprRef` + The secondary (inner) radius in pixels of arc marks. + + **Default value:** ``0`` + shape : str, dict, :class:`ExprRef`, :class:`SymbolShape` + Shape of the point marks. Supported values include: + + * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, + ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or + ``"triangle-left"``. + * the line symbol ``"stroke"`` + * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` + * a custom `SVG path string + `__ (For correct + sizing, custom shape paths should be defined within a square bounding box with + coordinates ranging from -1 to 1 along both the x and y dimensions.) + + **Default value:** ``"circle"`` + size : dict, float, :class:`ExprRef` + Default size for marks. + + * For ``point``/``circle``/``square``, this represents the pixel area of the marks. + Note that this value sets the area of the symbol; the side lengths will increase + with the square root of this value. + * For ``bar``, this represents the band size of the bar, in pixels. + * For ``text``, this represents the font size, in pixels. + + **Default value:** + + * ``30`` for point, circle, square marks; width/height's ``step`` + * ``2`` for bar marks with discrete dimensions; + * ``5`` for bar marks with continuous dimensions; + * ``11`` for text marks. + smooth : bool, dict, :class:`ExprRef` + A boolean flag (default true) indicating if the image should be smoothed when + resized. If false, individual pixels should be scaled directly rather than + interpolated with smoothing. For SVG rendering, this option may not work in some + browsers due to lack of standardization. + startAngle : dict, float, :class:`ExprRef` + The start angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + stroke : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default stroke color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove stroke. + + **Default value:** (None) + strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square'] + The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or + ``"square"``. + + **Default value:** ``"butt"`` + strokeDash : dict, Sequence[float], :class:`ExprRef` + An array of alternating stroke, space lengths for creating dashed or dotted lines. + strokeDashOffset : dict, float, :class:`ExprRef` + The offset (in pixels) into which to begin drawing with the stroke dash array. + strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel'] + The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. + + **Default value:** ``"miter"`` + strokeMiterLimit : dict, float, :class:`ExprRef` + The miter limit at which to bevel a line join. + strokeOffset : dict, float, :class:`ExprRef` + The offset in pixels at which to draw the group stroke and fill. If unspecified, the + default behavior is to dynamically offset stroked groups such that 1 pixel stroke + widths align with the pixel grid. + strokeOpacity : dict, float, :class:`ExprRef` + The stroke opacity (value between [0,1]). + + **Default value:** ``1`` + strokeWidth : dict, float, :class:`ExprRef` + The stroke width, in pixels. + tension : dict, float, :class:`ExprRef` + Depending on the interpolation type, sets the tension parameter (for line and area + marks). + text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef` + Placeholder text if the ``text`` channel is not specified + theta : dict, float, :class:`ExprRef` + * For arc marks, the arc length in radians if theta2 is not specified, otherwise the + start arc angle. (A value of 0 indicates up or “north”, increasing values proceed + clockwise.) + + * For text marks, polar coordinate angle in radians. + theta2 : dict, float, :class:`ExprRef` + The end angle of arc marks in radians. A value of 0 indicates up or “north”, + increasing values proceed clockwise. + timeUnitBandPosition : float + Default relative band position for a time unit. If set to ``0``, the marks will be + positioned at the beginning of the time unit band step. If set to ``0.5``, the marks + will be positioned in the middle of the time unit band step. + timeUnitBandSize : float + Default relative band size for a time unit. If set to ``1``, the bandwidth of the + marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the + marks will be half of the time unit band step. + tooltip : str, bool, dict, float, :class:`ExprRef`, :class:`TooltipContent`, None + The tooltip text string to show upon mouse hover or an object defining which fields + should the tooltip be derived from. + + * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from + ``encoding`` will be used. + * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the + highlighted data point will be used. + * If set to ``null`` or ``false``, then no tooltip will be used. + + See the `tooltip `__ + documentation for a detailed discussion about tooltip in Vega-Lite. + + **Default value:** ``null`` + url : str, dict, :class:`URI`, :class:`ExprRef` + The URL of the image file for image marks. + width : dict, float, :class:`ExprRef` + Width of the marks. + x : dict, float, :class:`ExprRef`, Literal['width'] + X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without + specified ``x2`` or ``width``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2 : dict, float, :class:`ExprRef`, Literal['width'] + X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + y : dict, float, :class:`ExprRef`, Literal['height'] + Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without + specified ``y2`` or ``height``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2 : dict, float, :class:`ExprRef`, Literal['height'] + Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + """ + + _schema = {"$ref": "#/definitions/BarConfig"} + + def __init__( + self, + align: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + angle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ariaRole: Optional[str | Parameter | SchemaBase | Map] = Undefined, + ariaRoleDescription: Optional[str | Parameter | SchemaBase | Map] = Undefined, + aspect: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + baseline: Optional[Parameter | SchemaBase | Map | TextBaseline_T] = Undefined, + binSpacing: Optional[float] = Undefined, + blend: Optional[Parameter | SchemaBase | Map | Blend_T] = Undefined, + color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined, + continuousBandSize: Optional[float] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadiusBottomLeft: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cornerRadiusBottomRight: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cornerRadiusEnd: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadiusTopLeft: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadiusTopRight: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cursor: Optional[Parameter | SchemaBase | Map | Cursor_T] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + dir: Optional[Parameter | SchemaBase | Map | TextDirection_T] = Undefined, + discreteBandSize: Optional[float | SchemaBase | Map] = Undefined, + dx: Optional[float | Parameter | SchemaBase | Map] = Undefined, + dy: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ellipsis: Optional[str | Parameter | SchemaBase | Map] = Undefined, + endAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + fill: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + filled: Optional[bool] = Undefined, + font: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined, + height: Optional[float | Parameter | SchemaBase | Map] = Undefined, + href: Optional[str | Parameter | SchemaBase | Map] = Undefined, + innerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[Parameter | SchemaBase | Map | Interpolate_T] = Undefined, + invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined, + limit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + lineBreak: Optional[str | Parameter | SchemaBase | Map] = Undefined, + lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + minBandSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + order: Optional[bool | None] = Undefined, + orient: Optional[SchemaBase | Orientation_T] = Undefined, + outerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + padAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radius2: Optional[float | Parameter | SchemaBase | Map] = Undefined, + shape: Optional[str | Parameter | SchemaBase | Map] = Undefined, + size: Optional[float | Parameter | SchemaBase | Map] = Undefined, + smooth: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + startAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + stroke: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + strokeDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined, + strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tension: Optional[float | Parameter | SchemaBase | Map] = Undefined, + text: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined, + theta: Optional[float | Parameter | SchemaBase | Map] = Undefined, + theta2: Optional[float | Parameter | SchemaBase | Map] = Undefined, + timeUnitBandPosition: Optional[float] = Undefined, + timeUnitBandSize: Optional[float] = Undefined, + tooltip: Optional[ + str | bool | float | Parameter | SchemaBase | Map | None + ] = Undefined, + url: Optional[str | Parameter | SchemaBase | Map] = Undefined, + width: Optional[float | Parameter | SchemaBase | Map] = Undefined, + x: Optional[ + float | Parameter | SchemaBase | Literal["width"] | Map + ] = Undefined, + x2: Optional[ + float | Parameter | SchemaBase | Literal["width"] | Map + ] = Undefined, + y: Optional[ + float | Parameter | SchemaBase | Literal["height"] | Map + ] = Undefined, + y2: Optional[ + float | Parameter | SchemaBase | Literal["height"] | Map + ] = Undefined, + **kwds, + ): + super().__init__( + align=align, + angle=angle, + aria=aria, + ariaRole=ariaRole, + ariaRoleDescription=ariaRoleDescription, + aspect=aspect, + baseline=baseline, + binSpacing=binSpacing, + blend=blend, + color=color, + continuousBandSize=continuousBandSize, + cornerRadius=cornerRadius, + cornerRadiusBottomLeft=cornerRadiusBottomLeft, + cornerRadiusBottomRight=cornerRadiusBottomRight, + cornerRadiusEnd=cornerRadiusEnd, + cornerRadiusTopLeft=cornerRadiusTopLeft, + cornerRadiusTopRight=cornerRadiusTopRight, + cursor=cursor, + description=description, + dir=dir, + discreteBandSize=discreteBandSize, + dx=dx, + dy=dy, + ellipsis=ellipsis, + endAngle=endAngle, + fill=fill, + fillOpacity=fillOpacity, + filled=filled, + font=font, + fontSize=fontSize, + fontStyle=fontStyle, + fontWeight=fontWeight, + height=height, + href=href, + innerRadius=innerRadius, + interpolate=interpolate, + invalid=invalid, + limit=limit, + lineBreak=lineBreak, + lineHeight=lineHeight, + minBandSize=minBandSize, + opacity=opacity, + order=order, + orient=orient, + outerRadius=outerRadius, + padAngle=padAngle, + radius=radius, + radius2=radius2, + shape=shape, + size=size, + smooth=smooth, + startAngle=startAngle, + stroke=stroke, + strokeCap=strokeCap, + strokeDash=strokeDash, + strokeDashOffset=strokeDashOffset, + strokeJoin=strokeJoin, + strokeMiterLimit=strokeMiterLimit, + strokeOffset=strokeOffset, + strokeOpacity=strokeOpacity, + strokeWidth=strokeWidth, + tension=tension, + text=text, + theta=theta, + theta2=theta2, + timeUnitBandPosition=timeUnitBandPosition, + timeUnitBandSize=timeUnitBandSize, + tooltip=tooltip, + url=url, + width=width, + x=x, + x2=x2, + y=y, + y2=y2, + **kwds, + ) + + +class BaseTitleNoValueRefs(VegaLiteSchema): + """ + BaseTitleNoValueRefs schema wrapper. + + Parameters + ---------- + align : :class:`Align`, Literal['left', 'center', 'right'] + Horizontal text alignment for title text. One of ``"left"``, ``"center"``, or + ``"right"``. + anchor : dict, :class:`ExprRef`, :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end'] + The anchor position for placing the title and subtitle text. 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. + angle : dict, float, :class:`ExprRef` + Angle in degrees of title and subtitle text. + aria : bool, dict, :class:`ExprRef` + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG group, removing the title from the ARIA accessibility tree. + + **Default value:** ``true`` + baseline : :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + Vertical text baseline for title and subtitle text. One of ``"alphabetic"`` + (default), ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or + ``"line-bottom"``. The ``"line-top"`` and ``"line-bottom"`` values operate similarly + to ``"top"`` and ``"bottom"``, but are calculated relative to the *lineHeight* + rather than *fontSize* alone. + color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Text color for title text. + dx : dict, float, :class:`ExprRef` + Delta offset for title and subtitle text x-coordinate. + dy : dict, float, :class:`ExprRef` + Delta offset for title and subtitle text y-coordinate. + font : str, dict, :class:`ExprRef` + Font name for title text. + fontSize : dict, float, :class:`ExprRef` + Font size in pixels for title text. + fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + Font style for title text. + fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + Font weight for title text. This can be either a string (e.g ``"bold"``, + ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where + ``"normal"`` = ``400`` and ``"bold"`` = ``700``). + frame : str, dict, :class:`ExprRef`, :class:`TitleFrame`, Literal['bounds', 'group'] + The reference frame for the anchor position, one of ``"bounds"`` (to anchor relative + to the full bounding box) or ``"group"`` (to anchor relative to the group width or + height). + limit : dict, float, :class:`ExprRef` + The maximum allowed length in pixels of title and subtitle text. + lineHeight : dict, float, :class:`ExprRef` + Line height in pixels for multi-line title text or title text with ``"line-top"`` or + ``"line-bottom"`` baseline. + offset : dict, float, :class:`ExprRef` + The orthogonal offset in pixels by which to displace the title group from its + position along the edge of the chart. + orient : dict, :class:`ExprRef`, :class:`TitleOrient`, Literal['none', 'left', 'right', 'top', 'bottom'] + Default title orientation (``"top"``, ``"bottom"``, ``"left"``, or ``"right"``) + subtitleColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Text color for subtitle text. + subtitleFont : str, dict, :class:`ExprRef` + Font name for subtitle text. + subtitleFontSize : dict, float, :class:`ExprRef` + Font size in pixels for subtitle text. + subtitleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + Font style for subtitle text. + subtitleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + Font weight for subtitle text. This can be either a string (e.g ``"bold"``, + ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where + ``"normal"`` = ``400`` and ``"bold"`` = ``700``). + subtitleLineHeight : dict, float, :class:`ExprRef` + Line height in pixels for multi-line subtitle text. + subtitlePadding : dict, float, :class:`ExprRef` + The padding in pixels between title and subtitle text. + zindex : dict, float, :class:`ExprRef` + The integer z-index indicating the layering of the title group relative to other + axis, mark, and legend groups. + + **Default value:** ``0``. + """ + + _schema = {"$ref": "#/definitions/BaseTitleNoValueRefs"} + + def __init__( + self, + align: Optional[SchemaBase | Align_T] = Undefined, + anchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined, + angle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + baseline: Optional[SchemaBase | TextBaseline_T] = Undefined, + color: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + dx: Optional[float | Parameter | SchemaBase | Map] = Undefined, + dy: Optional[float | Parameter | SchemaBase | Map] = Undefined, + font: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined, + frame: Optional[str | Parameter | SchemaBase | Map | TitleFrame_T] = Undefined, + limit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[Parameter | SchemaBase | Map | TitleOrient_T] = Undefined, + subtitleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + subtitleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + subtitleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + subtitleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + subtitleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + subtitleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + subtitlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + zindex: Optional[float | Parameter | SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + align=align, + anchor=anchor, + angle=angle, + aria=aria, + baseline=baseline, + color=color, + dx=dx, + dy=dy, + font=font, + fontSize=fontSize, + fontStyle=fontStyle, + fontWeight=fontWeight, + frame=frame, + limit=limit, + lineHeight=lineHeight, + offset=offset, + orient=orient, + subtitleColor=subtitleColor, + subtitleFont=subtitleFont, + subtitleFontSize=subtitleFontSize, + subtitleFontStyle=subtitleFontStyle, + subtitleFontWeight=subtitleFontWeight, + subtitleLineHeight=subtitleLineHeight, + subtitlePadding=subtitlePadding, + zindex=zindex, + **kwds, + ) + + +class BinExtent(VegaLiteSchema): + """BinExtent schema wrapper.""" + + _schema = {"$ref": "#/definitions/BinExtent"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class BinParams(VegaLiteSchema): + """ + BinParams schema wrapper. + + Binning properties or boolean flag for determining whether to bin data or not. + + Parameters + ---------- + anchor : float + A value in the binned domain at which to anchor the bins, shifting the bin + boundaries if necessary to ensure that a boundary aligns with the anchor value. + + **Default value:** the minimum bin extent value + base : float + The number base to use for automatic bin determination (default is base 10). + + **Default value:** ``10`` + binned : bool + When set to ``true``, Vega-Lite treats the input data as already binned. + divide : Sequence[float] + Scale factors indicating allowable subdivisions. The default value is [5, 2], which + indicates that for base 10 numbers (the default base), the method may consider + dividing bin sizes by 5 and/or 2. For example, for an initial step size of 10, the + method can check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might + also satisfy the given constraints. + + **Default value:** ``[5, 2]`` + extent : dict, Sequence[float], :class:`BinExtent`, :class:`ParameterExtent` + A two-element (``[min, max]``) array indicating the range of desired bin values. + maxbins : float + Maximum number of bins. + + **Default value:** ``6`` for ``row``, ``column`` and ``shape`` channels; ``10`` for + other channels + minstep : float + A minimum allowable step size (particularly useful for integer values). + nice : bool + If true, attempts to make the bin boundaries use human-friendly boundaries, such as + multiples of ten. + + **Default value:** ``true`` + step : float + An exact step size to use between bins. + + **Note:** If provided, options such as maxbins will be ignored. + steps : Sequence[float] + An array of allowable step sizes to choose from. + """ + + _schema = {"$ref": "#/definitions/BinParams"} + + def __init__( + self, + anchor: Optional[float] = Undefined, + base: Optional[float] = Undefined, + binned: Optional[bool] = Undefined, + divide: Optional[Sequence[float]] = Undefined, + extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + maxbins: Optional[float] = Undefined, + minstep: Optional[float] = Undefined, + nice: Optional[bool] = Undefined, + step: Optional[float] = Undefined, + steps: Optional[Sequence[float]] = Undefined, + **kwds, + ): + super().__init__( + anchor=anchor, + base=base, + binned=binned, + divide=divide, + extent=extent, + maxbins=maxbins, + minstep=minstep, + nice=nice, + step=step, + steps=steps, + **kwds, + ) + + +class Binding(VegaLiteSchema): + """Binding schema wrapper.""" + + _schema = {"$ref": "#/definitions/Binding"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class BindCheckbox(Binding): + """ + BindCheckbox schema wrapper. + + Parameters + ---------- + input : Literal['checkbox'] + + debounce : float + If defined, delays event handling until the specified milliseconds have elapsed + since the last event was fired. + element : str, :class:`Element` + An optional CSS selector string indicating the parent element to which the input + element should be added. By default, all input elements are added within the parent + container of the Vega view. + name : str + By default, the signal name is used to label input elements. This ``name`` property + can be used instead to specify a custom label for the bound signal. + """ + + _schema = {"$ref": "#/definitions/BindCheckbox"} + + def __init__( + self, + input: Optional[Literal["checkbox"]] = Undefined, + debounce: Optional[float] = Undefined, + element: Optional[str | SchemaBase] = Undefined, + name: Optional[str] = Undefined, + **kwds, + ): + super().__init__( + input=input, debounce=debounce, element=element, name=name, **kwds + ) + + +class BindDirect(Binding): + """ + BindDirect schema wrapper. + + Parameters + ---------- + element : str, dict, :class:`Element` + An input element that exposes a *value* property and supports the `EventTarget + `__ interface, or a + CSS selector string to such an element. When the element updates and dispatches an + event, the *value* property will be used as the new, bound signal value. When the + signal updates independent of the element, the *value* property will be set to the + signal value and a new event will be dispatched on the element. + debounce : float + If defined, delays event handling until the specified milliseconds have elapsed + since the last event was fired. + event : str + The event (default ``"input"``) to listen for to track changes on the external + element. + """ + + _schema = {"$ref": "#/definitions/BindDirect"} + + def __init__( + self, + element: Optional[str | SchemaBase | Map] = Undefined, + debounce: Optional[float] = Undefined, + event: Optional[str] = Undefined, + **kwds, + ): + super().__init__(element=element, debounce=debounce, event=event, **kwds) + + +class BindInput(Binding): + """ + BindInput schema wrapper. + + Parameters + ---------- + autocomplete : str + A hint for form autofill. See the `HTML autocomplete attribute + `__ for + additional information. + debounce : float + If defined, delays event handling until the specified milliseconds have elapsed + since the last event was fired. + element : str, :class:`Element` + An optional CSS selector string indicating the parent element to which the input + element should be added. By default, all input elements are added within the parent + container of the Vega view. + input : str + The type of input element to use. The valid values are ``"checkbox"``, ``"radio"``, + ``"range"``, ``"select"``, and any other legal `HTML form input type + `__. + name : str + By default, the signal name is used to label input elements. This ``name`` property + can be used instead to specify a custom label for the bound signal. + placeholder : str + Text that appears in the form control when it has no value set. + """ + + _schema = {"$ref": "#/definitions/BindInput"} + + def __init__( + self, + autocomplete: Optional[str] = Undefined, + debounce: Optional[float] = Undefined, + element: Optional[str | SchemaBase] = Undefined, + input: Optional[str] = Undefined, + name: Optional[str] = Undefined, + placeholder: Optional[str] = Undefined, + **kwds, + ): + super().__init__( + autocomplete=autocomplete, + debounce=debounce, + element=element, + input=input, + name=name, + placeholder=placeholder, + **kwds, + ) + + +class BindRadioSelect(Binding): + """ + BindRadioSelect schema wrapper. + + Parameters + ---------- + input : Literal['radio', 'select'] + + options : Sequence[Any] + An array of options to select from. + debounce : float + If defined, delays event handling until the specified milliseconds have elapsed + since the last event was fired. + element : str, :class:`Element` + An optional CSS selector string indicating the parent element to which the input + element should be added. By default, all input elements are added within the parent + container of the Vega view. + labels : Sequence[str] + An array of label strings to represent the ``options`` values. If unspecified, the + ``options`` value will be coerced to a string and used as the label. + name : str + By default, the signal name is used to label input elements. This ``name`` property + can be used instead to specify a custom label for the bound signal. + """ + + _schema = {"$ref": "#/definitions/BindRadioSelect"} + + def __init__( + self, + input: Optional[Literal["radio", "select"]] = Undefined, + options: Optional[Sequence[Any]] = Undefined, + debounce: Optional[float] = Undefined, + element: Optional[str | SchemaBase] = Undefined, + labels: Optional[Sequence[str]] = Undefined, + name: Optional[str] = Undefined, + **kwds, + ): + super().__init__( + input=input, + options=options, + debounce=debounce, + element=element, + labels=labels, + name=name, + **kwds, + ) + + +class BindRange(Binding): + """ + BindRange schema wrapper. + + Parameters + ---------- + input : Literal['range'] + + debounce : float + If defined, delays event handling until the specified milliseconds have elapsed + since the last event was fired. + element : str, :class:`Element` + An optional CSS selector string indicating the parent element to which the input + element should be added. By default, all input elements are added within the parent + container of the Vega view. + max : float + Sets the maximum slider value. Defaults to the larger of the signal value and + ``100``. + min : float + Sets the minimum slider value. Defaults to the smaller of the signal value and + ``0``. + name : str + By default, the signal name is used to label input elements. This ``name`` property + can be used instead to specify a custom label for the bound signal. + step : float + Sets the minimum slider increment. If undefined, the step size will be automatically + determined based on the ``min`` and ``max`` values. + """ + + _schema = {"$ref": "#/definitions/BindRange"} + + def __init__( + self, + input: Optional[Literal["range"]] = Undefined, + debounce: Optional[float] = Undefined, + element: Optional[str | SchemaBase] = Undefined, + max: Optional[float] = Undefined, + min: Optional[float] = Undefined, + name: Optional[str] = Undefined, + step: Optional[float] = Undefined, + **kwds, + ): + super().__init__( + input=input, + debounce=debounce, + element=element, + max=max, + min=min, + name=name, + step=step, + **kwds, + ) + + +class BinnedTimeUnit(VegaLiteSchema): + """BinnedTimeUnit schema wrapper.""" + + _schema = {"$ref": "#/definitions/BinnedTimeUnit"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class Blend(VegaLiteSchema): + """Blend schema wrapper.""" + + _schema = {"$ref": "#/definitions/Blend"} + + def __init__(self, *args): + super().__init__(*args) + + +class BoxPlotConfig(VegaLiteSchema): + """ + BoxPlotConfig schema wrapper. + + Parameters + ---------- + box : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + extent : float, Literal['min-max'] + The extent of the whiskers. Available options include: + + * ``"min-max"``: min and max are the lower and upper whiskers respectively. + * A number representing multiple of the interquartile range. This number will be + multiplied by the IQR to determine whisker boundary, which spans from the smallest + data to the largest data within the range *[Q1 - k * IQR, Q3 + k * IQR]* where + *Q1* and *Q3* are the first and third quartiles while *IQR* is the interquartile + range (*Q3-Q1*). + + **Default value:** ``1.5``. + median : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + outliers : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + rule : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + size : float + Size of the box and median tick of a box plot + ticks : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + """ + + _schema = {"$ref": "#/definitions/BoxPlotConfig"} + + def __init__( + self, + box: Optional[bool | SchemaBase | Map] = Undefined, + extent: Optional[float | Literal["min-max"]] = Undefined, + median: Optional[bool | SchemaBase | Map] = Undefined, + outliers: Optional[bool | SchemaBase | Map] = Undefined, + rule: Optional[bool | SchemaBase | Map] = Undefined, + size: Optional[float] = Undefined, + ticks: Optional[bool | SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + box=box, + extent=extent, + median=median, + outliers=outliers, + rule=rule, + size=size, + ticks=ticks, + **kwds, + ) + + +class BrushConfig(VegaLiteSchema): + """ + BrushConfig schema wrapper. + + Parameters + ---------- + cursor : :class:`Cursor`, Literal['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', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing'] + The mouse cursor used over the interval mark. Any valid `CSS cursor type + `__ can be used. + fill : str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + The fill color of the interval mark. + + **Default value:** ``"#333333"`` + fillOpacity : float + The fill opacity of the interval mark (a value between ``0`` and ``1``). + + **Default value:** ``0.125`` + stroke : str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + The stroke color of the interval mark. + + **Default value:** ``"#ffffff"`` + strokeDash : Sequence[float] + An array of alternating stroke and space lengths, for creating dashed or dotted + lines. + strokeDashOffset : float + The offset (in pixels) with which to begin drawing the stroke dash array. + strokeOpacity : float + The stroke opacity of the interval mark (a value between ``0`` and ``1``). + strokeWidth : float + The stroke width of the interval mark. + """ + + _schema = {"$ref": "#/definitions/BrushConfig"} + + def __init__( + self, + cursor: Optional[SchemaBase | Cursor_T] = Undefined, + fill: Optional[str | SchemaBase | ColorName_T] = Undefined, + fillOpacity: Optional[float] = Undefined, + stroke: Optional[str | SchemaBase | ColorName_T] = Undefined, + strokeDash: Optional[Sequence[float]] = Undefined, + strokeDashOffset: Optional[float] = Undefined, + strokeOpacity: Optional[float] = Undefined, + strokeWidth: Optional[float] = Undefined, + **kwds, + ): + super().__init__( + cursor=cursor, + fill=fill, + fillOpacity=fillOpacity, + stroke=stroke, + strokeDash=strokeDash, + strokeDashOffset=strokeDashOffset, + strokeOpacity=strokeOpacity, + strokeWidth=strokeWidth, + **kwds, + ) + + +class Color(VegaLiteSchema): + """Color schema wrapper.""" + + _schema = {"$ref": "#/definitions/Color"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ColorDef(VegaLiteSchema): + """ColorDef schema wrapper.""" + + _schema = {"$ref": "#/definitions/ColorDef"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ColorName(Color): + """ColorName schema wrapper.""" + + _schema = {"$ref": "#/definitions/ColorName"} + + def __init__(self, *args): + super().__init__(*args) + + +class ColorScheme(VegaLiteSchema): + """ColorScheme schema wrapper.""" + + _schema = {"$ref": "#/definitions/ColorScheme"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class Categorical(ColorScheme): + """Categorical schema wrapper.""" + + _schema = {"$ref": "#/definitions/Categorical"} + + def __init__(self, *args): + super().__init__(*args) + + +class CompositeMark(AnyMark): + """CompositeMark schema wrapper.""" + + _schema = {"$ref": "#/definitions/CompositeMark"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class BoxPlot(CompositeMark): + """BoxPlot schema wrapper.""" + + _schema = {"$ref": "#/definitions/BoxPlot"} + + def __init__(self, *args): + super().__init__(*args) + + +class CompositeMarkDef(AnyMark): + """CompositeMarkDef schema wrapper.""" + + _schema = {"$ref": "#/definitions/CompositeMarkDef"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class BoxPlotDef(CompositeMarkDef): + """ + BoxPlotDef schema wrapper. + + Parameters + ---------- + type : :class:`BoxPlot`, Literal['boxplot'] + The mark type. This could a primitive mark type (one of ``"bar"``, ``"circle"``, + ``"square"``, ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"geoshape"``, + ``"rule"``, and ``"text"``) or a composite mark type (``"boxplot"``, + ``"errorband"``, ``"errorbar"``). + box : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + clip : bool + Whether a composite mark be clipped to the enclosing group's width and height. + color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + extent : float, Literal['min-max'] + The extent of the whiskers. Available options include: + + * ``"min-max"``: min and max are the lower and upper whiskers respectively. + * A number representing multiple of the interquartile range. This number will be + multiplied by the IQR to determine whisker boundary, which spans from the smallest + data to the largest data within the range *[Q1 - k * IQR, Q3 + k * IQR]* where + *Q1* and *Q3* are the first and third quartiles while *IQR* is the interquartile + range (*Q3-Q1*). + + **Default value:** ``1.5``. + invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None + Invalid data mode, which defines how the marks and corresponding scales should + represent invalid values (``null`` and ``NaN`` in continuous scales *without* + defined output for invalid values). + + * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and + *scales*. For path marks (for line, area, trail), this option will create paths + that connect valid points, as if the data rows with invalid values do not exist. + + * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at + invalid values. For non-path marks, this is equivalent to ``"filter"``. All + *scale* domains will *exclude* these filtered data points. + + * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid + values. Hide invalid values for non-path marks. All *scale* domains will + *include* these filtered data points (for both path and non-path marks). + + * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each + scale will use the output for invalid values defined in ``config.scale.invalid`` + or, if unspecified, by default invalid values will produce the same visual values + as zero (if the scale includes zero) or the minimum value (if the scale does not + include zero). + + * ``"break-paths-show-path-domains"`` (default) — This is equivalent to + ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and + ``"filter"`` for non-path marks. + + **Note**: If any channel's scale has an output for invalid values defined in + ``config.scale.invalid``, all values for the scales will be considered "valid" since + they can produce a reasonable output for the scales. Thus, fields for such channels + will not be filtered and will not cause path breaks. + median : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + opacity : float + The opacity (value between [0,1]) of the mark. + orient : :class:`Orientation`, Literal['horizontal', 'vertical'] + Orientation of the box plot. This is normally automatically determined based on + types of fields on x and y channels. However, an explicit ``orient`` be specified + when the orientation is ambiguous. + + **Default value:** ``"vertical"``. + outliers : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + rule : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + size : float + Size of the box and median tick of a box plot + ticks : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + """ + + _schema = {"$ref": "#/definitions/BoxPlotDef"} + + def __init__( + self, + type: Optional[SchemaBase | BoxPlot_T] = Undefined, + box: Optional[bool | SchemaBase | Map] = Undefined, + clip: Optional[bool] = Undefined, + color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined, + extent: Optional[float | Literal["min-max"]] = Undefined, + invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined, + median: Optional[bool | SchemaBase | Map] = Undefined, + opacity: Optional[float] = Undefined, + orient: Optional[SchemaBase | Orientation_T] = Undefined, + outliers: Optional[bool | SchemaBase | Map] = Undefined, + rule: Optional[bool | SchemaBase | Map] = Undefined, + size: Optional[float] = Undefined, + ticks: Optional[bool | SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + type=type, + box=box, + clip=clip, + color=color, + extent=extent, + invalid=invalid, + median=median, + opacity=opacity, + orient=orient, + outliers=outliers, + rule=rule, + size=size, + ticks=ticks, + **kwds, + ) + + +class CompositionConfig(VegaLiteSchema): + """ + CompositionConfig schema wrapper. + + Parameters + ---------- + columns : float + The number of columns to include in the view composition layout. + + **Default value**: ``undefined`` -- An infinite number of columns (a single row) + will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the + ``column`` channel (for ``facet`` and ``repeat``). + + **Note**: + + 1) This property is only for: + + * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``) + * the ``facet`` and ``repeat`` operator with one field/repetition definition + (without row/column nesting) + + 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``) + and to using the ``row`` channel (for ``facet`` and ``repeat``). + spacing : float + The default spacing in pixels between composed sub-views. + + **Default value**: ``20`` + """ + + _schema = {"$ref": "#/definitions/CompositionConfig"} + + def __init__( + self, + columns: Optional[float] = Undefined, + spacing: Optional[float] = Undefined, + **kwds, + ): + super().__init__(columns=columns, spacing=spacing, **kwds) + + +class ConditionalAxisColor(VegaLiteSchema): + """ConditionalAxisColor schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalAxisColor"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalAxisLabelAlign(VegaLiteSchema): + """ConditionalAxisLabelAlign schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalAxisLabelAlign"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalAxisLabelBaseline(VegaLiteSchema): + """ConditionalAxisLabelBaseline schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalAxisLabelBaseline"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalAxisLabelFontStyle(VegaLiteSchema): + """ConditionalAxisLabelFontStyle schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalAxisLabelFontStyle"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalAxisLabelFontWeight(VegaLiteSchema): + """ConditionalAxisLabelFontWeight schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalAxisLabelFontWeight"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalAxisNumber(VegaLiteSchema): + """ConditionalAxisNumber schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalAxisNumber"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalAxisNumberArray(VegaLiteSchema): + """ConditionalAxisNumberArray schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalAxisNumberArray"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalAxisPropertyAlignnull(VegaLiteSchema): + """ConditionalAxisPropertyAlignnull schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalAxisProperty<(Align|null)>"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalAxisPropertyColornull(VegaLiteSchema): + """ConditionalAxisPropertyColornull schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalAxisProperty<(Color|null)>"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalAxisPropertyFontStylenull(VegaLiteSchema): + """ConditionalAxisPropertyFontStylenull schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalAxisProperty<(FontStyle|null)>"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalAxisPropertyFontWeightnull(VegaLiteSchema): + """ConditionalAxisPropertyFontWeightnull schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalAxisProperty<(FontWeight|null)>"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalAxisPropertyTextBaselinenull(VegaLiteSchema): + """ConditionalAxisPropertyTextBaselinenull schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalAxisProperty<(TextBaseline|null)>"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalAxisPropertynumberArraynull(VegaLiteSchema): + """ConditionalAxisPropertynumberArraynull schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalAxisProperty<(number[]|null)>"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalAxisPropertynumbernull(VegaLiteSchema): + """ConditionalAxisPropertynumbernull schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalAxisProperty<(number|null)>"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalAxisPropertystringnull(VegaLiteSchema): + """ConditionalAxisPropertystringnull schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalAxisProperty<(string|null)>"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalAxisString(VegaLiteSchema): + """ConditionalAxisString schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalAxisString"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalMarkPropFieldOrDatumDef(VegaLiteSchema): + """ConditionalMarkPropFieldOrDatumDef schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalMarkPropFieldOrDatumDefTypeForShape(VegaLiteSchema): + """ConditionalMarkPropFieldOrDatumDefTypeForShape schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalParameterMarkPropFieldOrDatumDef(ConditionalMarkPropFieldOrDatumDef): + """ConditionalParameterMarkPropFieldOrDatumDef schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalParameter"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalParameterMarkPropFieldOrDatumDefTypeForShape( + ConditionalMarkPropFieldOrDatumDefTypeForShape +): + """ConditionalParameterMarkPropFieldOrDatumDefTypeForShape schema wrapper.""" + + _schema = { + "$ref": "#/definitions/ConditionalParameter>" + } + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalPredicateMarkPropFieldOrDatumDef(ConditionalMarkPropFieldOrDatumDef): + """ConditionalPredicateMarkPropFieldOrDatumDef schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalPredicate"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape( + ConditionalMarkPropFieldOrDatumDefTypeForShape +): + """ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape schema wrapper.""" + + _schema = { + "$ref": "#/definitions/ConditionalPredicate>" + } + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalPredicateValueDefAlignnullExprRef(VegaLiteSchema): + """ConditionalPredicateValueDefAlignnullExprRef schema wrapper.""" + + _schema = { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>" + } + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalPredicateValueDefColornullExprRef(VegaLiteSchema): + """ConditionalPredicateValueDefColornullExprRef schema wrapper.""" + + _schema = { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>" + } + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalPredicateValueDefFontStylenullExprRef(VegaLiteSchema): + """ConditionalPredicateValueDefFontStylenullExprRef schema wrapper.""" + + _schema = { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>" + } + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalPredicateValueDefFontWeightnullExprRef(VegaLiteSchema): + """ConditionalPredicateValueDefFontWeightnullExprRef schema wrapper.""" + + _schema = { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>" + } + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalPredicateValueDefTextBaselinenullExprRef(VegaLiteSchema): + """ConditionalPredicateValueDefTextBaselinenullExprRef schema wrapper.""" + + _schema = { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>" + } + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalPredicateValueDefnumberArraynullExprRef(VegaLiteSchema): + """ConditionalPredicateValueDefnumberArraynullExprRef schema wrapper.""" + + _schema = { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>" + } + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalPredicateValueDefnumbernullExprRef(VegaLiteSchema): + """ConditionalPredicateValueDefnumbernullExprRef schema wrapper.""" + + _schema = { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>" + } + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalStringFieldDef(VegaLiteSchema): + """ConditionalStringFieldDef schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalStringFieldDef"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalParameterStringFieldDef(ConditionalStringFieldDef): + r""" + ConditionalParameterStringFieldDef schema wrapper. + + Parameters + ---------- + param : str, :class:`ParameterName` + Filter using a parameter name. + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + empty : bool + For selection parameters, the predicate of empty selections returns true by default. + Override this behavior, by setting this property ``empty: false``. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + format : str, dict, :class:`Dict` + When used with the default ``"number"`` and ``"time"`` format type, the text + formatting pattern for labels of guides (axes, legends, headers) and text marks. + + * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's + `number format pattern `__. + * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time + format pattern `__. + + See the `format documentation `__ + for more examples. + + When used with a `custom formatType + `__, this + value will be passed as ``format`` alongside ``datum.value`` to the registered + function. + + **Default value:** Derived from `numberFormat + `__ config for number + format and from `timeFormat + `__ config for time + format. + formatType : str + The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom + format type + `__. + + **Default value:** + + * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``. + * ``"number"`` for quantitative fields as well as ordinal and nominal fields without + ``timeUnit``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/ConditionalParameter"} + + def __init__( + self, + param: Optional[str | SchemaBase] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + empty: Optional[bool] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + param=param, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + empty=empty, + field=field, + format=format, + formatType=formatType, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +class ConditionalPredicateStringFieldDef(ConditionalStringFieldDef): + r""" + ConditionalPredicateStringFieldDef schema wrapper. + + Parameters + ---------- + test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition` + Predicate for triggering the condition + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + format : str, dict, :class:`Dict` + When used with the default ``"number"`` and ``"time"`` format type, the text + formatting pattern for labels of guides (axes, legends, headers) and text marks. + + * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's + `number format pattern `__. + * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time + format pattern `__. + + See the `format documentation `__ + for more examples. + + When used with a `custom formatType + `__, this + value will be passed as ``format`` alongside ``datum.value`` to the registered + function. + + **Default value:** Derived from `numberFormat + `__ config for number + format and from `timeFormat + `__ config for time + format. + formatType : str + The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom + format type + `__. + + **Default value:** + + * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``. + * ``"number"`` for quantitative fields as well as ordinal and nominal fields without + ``timeUnit``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/ConditionalPredicate"} + + def __init__( + self, + test: Optional[str | SchemaBase | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + test=test, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + format=format, + formatType=formatType, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +class ConditionalValueDefGradientstringnullExprRef(VegaLiteSchema): + """ConditionalValueDefGradientstringnullExprRef schema wrapper.""" + + _schema = { + "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>" + } + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalParameterValueDefGradientstringnullExprRef( + ConditionalValueDefGradientstringnullExprRef +): + """ + ConditionalParameterValueDefGradientstringnullExprRef schema wrapper. + + Parameters + ---------- + param : str, :class:`ParameterName` + Filter using a parameter name. + value : str, dict, :class:`ExprRef`, :class:`Gradient`, :class:`LinearGradient`, :class:`RadialGradient`, None + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + empty : bool + For selection parameters, the predicate of empty selections returns true by default. + Override this behavior, by setting this property ``empty: false``. + """ + + _schema = { + "$ref": "#/definitions/ConditionalParameter>" + } + + def __init__( + self, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + empty: Optional[bool] = Undefined, + **kwds, + ): + super().__init__(param=param, value=value, empty=empty, **kwds) + + +class ConditionalPredicateValueDefGradientstringnullExprRef( + ConditionalValueDefGradientstringnullExprRef +): + """ + ConditionalPredicateValueDefGradientstringnullExprRef schema wrapper. + + Parameters + ---------- + test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition` + Predicate for triggering the condition + value : str, dict, :class:`ExprRef`, :class:`Gradient`, :class:`LinearGradient`, :class:`RadialGradient`, None + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _schema = { + "$ref": "#/definitions/ConditionalPredicate>" + } + + def __init__( + self, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + **kwds, + ): + super().__init__(test=test, value=value, **kwds) + + +class ConditionalValueDefTextExprRef(VegaLiteSchema): + """ConditionalValueDefTextExprRef schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalValueDef<(Text|ExprRef)>"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalParameterValueDefTextExprRef(ConditionalValueDefTextExprRef): + """ + ConditionalParameterValueDefTextExprRef schema wrapper. + + Parameters + ---------- + param : str, :class:`ParameterName` + Filter using a parameter name. + value : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef` + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + empty : bool + For selection parameters, the predicate of empty selections returns true by default. + Override this behavior, by setting this property ``empty: false``. + """ + + _schema = {"$ref": "#/definitions/ConditionalParameter>"} + + def __init__( + self, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined, + empty: Optional[bool] = Undefined, + **kwds, + ): + super().__init__(param=param, value=value, empty=empty, **kwds) + + +class ConditionalPredicateValueDefTextExprRef(ConditionalValueDefTextExprRef): + """ + ConditionalPredicateValueDefTextExprRef schema wrapper. + + Parameters + ---------- + test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition` + Predicate for triggering the condition + value : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef` + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _schema = {"$ref": "#/definitions/ConditionalPredicate>"} + + def __init__( + self, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined, + **kwds, + ): + super().__init__(test=test, value=value, **kwds) + + +class ConditionalValueDefnumber(VegaLiteSchema): + """ConditionalValueDefnumber schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalValueDef"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalParameterValueDefnumber(ConditionalValueDefnumber): + """ + ConditionalParameterValueDefnumber schema wrapper. + + Parameters + ---------- + param : str, :class:`ParameterName` + Filter using a parameter name. + value : float + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + empty : bool + For selection parameters, the predicate of empty selections returns true by default. + Override this behavior, by setting this property ``empty: false``. + """ + + _schema = {"$ref": "#/definitions/ConditionalParameter>"} + + def __init__( + self, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[float] = Undefined, + empty: Optional[bool] = Undefined, + **kwds, + ): + super().__init__(param=param, value=value, empty=empty, **kwds) + + +class ConditionalPredicateValueDefnumber(ConditionalValueDefnumber): + """ + ConditionalPredicateValueDefnumber schema wrapper. + + Parameters + ---------- + test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition` + Predicate for triggering the condition + value : float + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _schema = {"$ref": "#/definitions/ConditionalPredicate>"} + + def __init__( + self, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[float] = Undefined, + **kwds, + ): + super().__init__(test=test, value=value, **kwds) + + +class ConditionalValueDefnumberArrayExprRef(VegaLiteSchema): + """ConditionalValueDefnumberArrayExprRef schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalValueDef<(number[]|ExprRef)>"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalParameterValueDefnumberArrayExprRef( + ConditionalValueDefnumberArrayExprRef +): + """ + ConditionalParameterValueDefnumberArrayExprRef schema wrapper. + + Parameters + ---------- + param : str, :class:`ParameterName` + Filter using a parameter name. + value : dict, Sequence[float], :class:`ExprRef` + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + empty : bool + For selection parameters, the predicate of empty selections returns true by default. + Override this behavior, by setting this property ``empty: false``. + """ + + _schema = { + "$ref": "#/definitions/ConditionalParameter>" + } + + def __init__( + self, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + empty: Optional[bool] = Undefined, + **kwds, + ): + super().__init__(param=param, value=value, empty=empty, **kwds) + + +class ConditionalPredicateValueDefnumberArrayExprRef( + ConditionalValueDefnumberArrayExprRef +): + """ + ConditionalPredicateValueDefnumberArrayExprRef schema wrapper. + + Parameters + ---------- + test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition` + Predicate for triggering the condition + value : dict, Sequence[float], :class:`ExprRef` + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _schema = { + "$ref": "#/definitions/ConditionalPredicate>" + } + + def __init__( + self, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + **kwds, + ): + super().__init__(test=test, value=value, **kwds) + + +class ConditionalValueDefnumberExprRef(VegaLiteSchema): + """ConditionalValueDefnumberExprRef schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalParameterValueDefnumberExprRef(ConditionalValueDefnumberExprRef): + """ + ConditionalParameterValueDefnumberExprRef schema wrapper. + + Parameters + ---------- + param : str, :class:`ParameterName` + Filter using a parameter name. + value : dict, float, :class:`ExprRef` + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + empty : bool + For selection parameters, the predicate of empty selections returns true by default. + Override this behavior, by setting this property ``empty: false``. + """ + + _schema = {"$ref": "#/definitions/ConditionalParameter>"} + + def __init__( + self, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + empty: Optional[bool] = Undefined, + **kwds, + ): + super().__init__(param=param, value=value, empty=empty, **kwds) + + +class ConditionalPredicateValueDefnumberExprRef(ConditionalValueDefnumberExprRef): + """ + ConditionalPredicateValueDefnumberExprRef schema wrapper. + + Parameters + ---------- + test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition` + Predicate for triggering the condition + value : dict, float, :class:`ExprRef` + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _schema = {"$ref": "#/definitions/ConditionalPredicate>"} + + def __init__( + self, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__(test=test, value=value, **kwds) + + +class ConditionalValueDefstringExprRef(VegaLiteSchema): + """ConditionalValueDefstringExprRef schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalValueDef<(string|ExprRef)>"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalParameterValueDefstringExprRef(ConditionalValueDefstringExprRef): + """ + ConditionalParameterValueDefstringExprRef schema wrapper. + + Parameters + ---------- + param : str, :class:`ParameterName` + Filter using a parameter name. + value : str, dict, :class:`ExprRef` + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + empty : bool + For selection parameters, the predicate of empty selections returns true by default. + Override this behavior, by setting this property ``empty: false``. + """ + + _schema = {"$ref": "#/definitions/ConditionalParameter>"} + + def __init__( + self, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map] = Undefined, + empty: Optional[bool] = Undefined, + **kwds, + ): + super().__init__(param=param, value=value, empty=empty, **kwds) + + +class ConditionalPredicateValueDefstringExprRef(ConditionalValueDefstringExprRef): + """ + ConditionalPredicateValueDefstringExprRef schema wrapper. + + Parameters + ---------- + test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition` + Predicate for triggering the condition + value : str, dict, :class:`ExprRef` + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _schema = {"$ref": "#/definitions/ConditionalPredicate>"} + + def __init__( + self, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__(test=test, value=value, **kwds) + + +class ConditionalValueDefstringnullExprRef(VegaLiteSchema): + """ConditionalValueDefstringnullExprRef schema wrapper.""" + + _schema = {"$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConditionalParameterValueDefstringnullExprRef( + ConditionalValueDefstringnullExprRef +): + """ + ConditionalParameterValueDefstringnullExprRef schema wrapper. + + Parameters + ---------- + param : str, :class:`ParameterName` + Filter using a parameter name. + value : str, dict, :class:`ExprRef`, None + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + empty : bool + For selection parameters, the predicate of empty selections returns true by default. + Override this behavior, by setting this property ``empty: false``. + """ + + _schema = { + "$ref": "#/definitions/ConditionalParameter>" + } + + def __init__( + self, + param: Optional[str | SchemaBase] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + empty: Optional[bool] = Undefined, + **kwds, + ): + super().__init__(param=param, value=value, empty=empty, **kwds) + + +class ConditionalPredicateValueDefstringnullExprRef( + ConditionalValueDefstringnullExprRef +): + """ + ConditionalPredicateValueDefstringnullExprRef schema wrapper. + + Parameters + ---------- + test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition` + Predicate for triggering the condition + value : str, dict, :class:`ExprRef`, None + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _schema = { + "$ref": "#/definitions/ConditionalPredicate>" + } + + def __init__( + self, + test: Optional[str | SchemaBase | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + **kwds, + ): + super().__init__(test=test, value=value, **kwds) + + +class Config(VegaLiteSchema): + """ + Config schema wrapper. + + Parameters + ---------- + arc : dict, :class:`RectConfig` + Arc-specific Config + area : dict, :class:`AreaConfig` + Area-Specific Config + aria : bool + A boolean flag indicating if ARIA default attributes should be included for marks + and guides (SVG output only). If false, the ``"aria-hidden"`` attribute will be set + for all guides, removing them from the ARIA accessibility tree and Vega-Lite will + not generate default descriptions for marks. + + **Default value:** ``true``. + autosize : dict, :class:`AutosizeType`, :class:`AutoSizeParams`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y'] + How the visualization size should be determined. If a string, should be one of + ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify + parameters for content sizing and automatic resizing. + + **Default value**: ``pad`` + axis : dict, :class:`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 `__. + axisBand : dict, :class:`AxisConfig` + Config for axes with "band" scales. + axisBottom : dict, :class:`AxisConfig` + Config for x-axis along the bottom edge of the chart. + axisDiscrete : dict, :class:`AxisConfig` + Config for axes with "point" or "band" scales. + axisLeft : dict, :class:`AxisConfig` + Config for y-axis along the left edge of the chart. + axisPoint : dict, :class:`AxisConfig` + Config for axes with "point" scales. + axisQuantitative : dict, :class:`AxisConfig` + Config for quantitative axes. + axisRight : dict, :class:`AxisConfig` + Config for y-axis along the right edge of the chart. + axisTemporal : dict, :class:`AxisConfig` + Config for temporal axes. + axisTop : dict, :class:`AxisConfig` + Config for x-axis along the top edge of the chart. + axisX : dict, :class:`AxisConfig` + X-axis specific config. + axisXBand : dict, :class:`AxisConfig` + Config for x-axes with "band" scales. + axisXDiscrete : dict, :class:`AxisConfig` + Config for x-axes with "point" or "band" scales. + axisXPoint : dict, :class:`AxisConfig` + Config for x-axes with "point" scales. + axisXQuantitative : dict, :class:`AxisConfig` + Config for x-quantitative axes. + axisXTemporal : dict, :class:`AxisConfig` + Config for x-temporal axes. + axisY : dict, :class:`AxisConfig` + Y-axis specific config. + axisYBand : dict, :class:`AxisConfig` + Config for y-axes with "band" scales. + axisYDiscrete : dict, :class:`AxisConfig` + Config for y-axes with "point" or "band" scales. + axisYPoint : dict, :class:`AxisConfig` + Config for y-axes with "point" scales. + axisYQuantitative : dict, :class:`AxisConfig` + Config for y-quantitative axes. + axisYTemporal : dict, :class:`AxisConfig` + Config for y-temporal axes. + background : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + CSS color property to use as the background of the entire view. + + **Default value:** ``"white"`` + bar : dict, :class:`BarConfig` + Bar-Specific Config + boxplot : dict, :class:`BoxPlotConfig` + Box Config + circle : dict, :class:`MarkConfig` + Circle-Specific Config + concat : dict, :class:`CompositionConfig` + Default configuration for all concatenation and repeat view composition operators + (``concat``, ``hconcat``, ``vconcat``, and ``repeat``) + countTitle : str + Default axis and legend title for count fields. + + **Default value:** ``'Count of Records``. + customFormatTypes : bool + Allow the ``formatType`` property for text marks and guides to accept a custom + formatter function `registered as a Vega expression + `__. + errorband : dict, :class:`ErrorBandConfig` + ErrorBand Config + errorbar : dict, :class:`ErrorBarConfig` + ErrorBar Config + facet : dict, :class:`CompositionConfig` + Default configuration for the ``facet`` view composition operator + fieldTitle : Literal['verbal', 'functional', 'plain'] + Defines how Vega-Lite generates title for fields. There are three possible styles: + + * ``"verbal"`` (Default) - displays function in a verbal style (e.g., "Sum of + field", "Year-month of date", "field (binned)"). + * ``"function"`` - displays function using parentheses and capitalized texts (e.g., + "SUM(field)", "YEARMONTH(date)", "BIN(field)"). + * ``"plain"`` - displays only the field name without functions (e.g., "field", + "date", "field"). + font : str + Default font for all text marks, titles, and labels. + geoshape : dict, :class:`MarkConfig` + Geoshape-Specific Config + header : dict, :class:`HeaderConfig` + Header configuration, which determines default properties for all `headers + `__. + + For a full list of header configuration options, please see the `corresponding + section of in the header documentation + `__. + headerColumn : dict, :class:`HeaderConfig` + Header configuration, which determines default properties for column `headers + `__. + + For a full list of header configuration options, please see the `corresponding + section of in the header documentation + `__. + headerFacet : dict, :class:`HeaderConfig` + Header configuration, which determines default properties for non-row/column facet + `headers `__. + + For a full list of header configuration options, please see the `corresponding + section of in the header documentation + `__. + headerRow : dict, :class:`HeaderConfig` + Header configuration, which determines default properties for row `headers + `__. + + For a full list of header configuration options, please see the `corresponding + section of in the header documentation + `__. + image : dict, :class:`RectConfig` + Image-specific Config + legend : dict, :class:`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 `__. + line : dict, :class:`LineConfig` + Line-Specific Config + lineBreak : str, dict, :class:`ExprRef` + A delimiter, such as a newline character, upon which to break text strings into + multiple lines. This property provides a global default for text marks, which is + overridden by mark or style config settings, and by the lineBreak mark encoding + channel. If signal-valued, either string or regular expression (regexp) values are + valid. + locale : dict, :class:`Locale` + Locale definitions for string parsing and formatting of number and date values. The + locale object should contain ``number`` and/or ``time`` properties with `locale + definitions `__. Locale definitions + provided in the config block may be overridden by the View constructor locale + option. + mark : dict, :class:`MarkConfig` + Mark Config + normalizedNumberFormat : str + If normalizedNumberFormatType is not specified, D3 number format for axis labels, + text marks, and tooltips of normalized stacked fields (fields with ``stack: + "normalize"``). For example ``"s"`` for SI units. Use `D3's number format pattern + `__. + + If ``config.normalizedNumberFormatType`` is specified and + ``config.customFormatTypes`` is ``true``, this value will be passed as ``format`` + alongside ``datum.value`` to the ``config.numberFormatType`` function. **Default + value:** ``%`` + normalizedNumberFormatType : str + `Custom format type + `__ for + ``config.normalizedNumberFormat``. + + **Default value:** ``undefined`` -- This is equilvalent to call D3-format, which is + exposed as `format in Vega-Expression + `__. **Note:** You must also + set ``customFormatTypes`` to ``true`` to use this feature. + numberFormat : str + If numberFormatType is not specified, D3 number format for guide labels, text marks, + and tooltips of non-normalized fields (fields *without* ``stack: "normalize"``). For + example ``"s"`` for SI units. Use `D3's number format pattern + `__. + + If ``config.numberFormatType`` is specified and ``config.customFormatTypes`` is + ``true``, this value will be passed as ``format`` alongside ``datum.value`` to the + ``config.numberFormatType`` function. + numberFormatType : str + `Custom format type + `__ for + ``config.numberFormat``. + + **Default value:** ``undefined`` -- This is equilvalent to call D3-format, which is + exposed as `format in Vega-Expression + `__. **Note:** You must also + set ``customFormatTypes`` to ``true`` to use this feature. + padding : dict, float, :class:`ExprRef`, :class:`Padding` + The default visualization padding, in pixels, from the edge of the visualization + canvas to the data rectangle. If a number, specifies padding for all sides. If an + object, the value should have the format ``{"left": 5, "top": 5, "right": 5, + "bottom": 5}`` to specify padding for each side of the visualization. + + **Default value**: ``5`` + params : Sequence[dict, :class:`TopLevelParameter`, :class:`VariableParameter`, :class:`TopLevelSelectionParameter`] + Dynamic variables or selections that parameterize a visualization. + point : dict, :class:`MarkConfig` + Point-Specific Config + projection : dict, :class:`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 + `__. + range : dict, :class:`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 + `__. + rect : dict, :class:`RectConfig` + Rect-Specific Config + rule : dict, :class:`MarkConfig` + Rule-Specific Config + scale : dict, :class:`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 `__. + selection : dict, :class:`SelectionConfig` + An object hash for defining default properties for each type of selections. + square : dict, :class:`MarkConfig` + Square-Specific Config + style : dict, :class:`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 + `__. + text : dict, :class:`MarkConfig` + Text-Specific Config + tick : dict, :class:`TickConfig` + Tick-Specific Config + timeFormat : str + Default time format for raw time values (without time units) in text marks, legend + labels and header labels. + + **Default value:** ``"%b %d, %Y"`` **Note:** Axes automatically determine the format + for each label automatically so this config does not affect axes. + timeFormatType : str + `Custom format type + `__ for + ``config.timeFormat``. + + **Default value:** ``undefined`` -- This is equilvalent to call D3-time-format, + which is exposed as `timeFormat in Vega-Expression + `__. **Note:** You must + also set ``customFormatTypes`` to ``true`` and there must *not* be a ``timeUnit`` + defined to use this feature. + title : dict, :class:`TitleConfig` + 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 `__. + tooltipFormat : dict, :class:`FormatConfig` + Define `custom format configuration + `__ for tooltips. If + unspecified, default format config will be applied. + trail : dict, :class:`LineConfig` + Trail-Specific Config + view : dict, :class:`ViewConfig` + Default properties for `single view plots + `__. + """ + + _schema = {"$ref": "#/definitions/Config"} + + def __init__( + self, + arc: Optional[SchemaBase | Map] = Undefined, + area: Optional[SchemaBase | Map] = Undefined, + aria: Optional[bool] = Undefined, + autosize: Optional[SchemaBase | Map | AutosizeType_T] = Undefined, + axis: Optional[SchemaBase | Map] = Undefined, + axisBand: Optional[SchemaBase | Map] = Undefined, + axisBottom: Optional[SchemaBase | Map] = Undefined, + axisDiscrete: Optional[SchemaBase | Map] = Undefined, + axisLeft: Optional[SchemaBase | Map] = Undefined, + axisPoint: Optional[SchemaBase | Map] = Undefined, + axisQuantitative: Optional[SchemaBase | Map] = Undefined, + axisRight: Optional[SchemaBase | Map] = Undefined, + axisTemporal: Optional[SchemaBase | Map] = Undefined, + axisTop: Optional[SchemaBase | Map] = Undefined, + axisX: Optional[SchemaBase | Map] = Undefined, + axisXBand: Optional[SchemaBase | Map] = Undefined, + axisXDiscrete: Optional[SchemaBase | Map] = Undefined, + axisXPoint: Optional[SchemaBase | Map] = Undefined, + axisXQuantitative: Optional[SchemaBase | Map] = Undefined, + axisXTemporal: Optional[SchemaBase | Map] = Undefined, + axisY: Optional[SchemaBase | Map] = Undefined, + axisYBand: Optional[SchemaBase | Map] = Undefined, + axisYDiscrete: Optional[SchemaBase | Map] = Undefined, + axisYPoint: Optional[SchemaBase | Map] = Undefined, + axisYQuantitative: Optional[SchemaBase | Map] = Undefined, + axisYTemporal: Optional[SchemaBase | Map] = Undefined, + background: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T + ] = Undefined, + bar: Optional[SchemaBase | Map] = Undefined, + boxplot: Optional[SchemaBase | Map] = Undefined, + circle: Optional[SchemaBase | Map] = Undefined, + concat: Optional[SchemaBase | Map] = Undefined, + countTitle: Optional[str] = Undefined, + customFormatTypes: Optional[bool] = Undefined, + errorband: Optional[SchemaBase | Map] = Undefined, + errorbar: Optional[SchemaBase | Map] = Undefined, + facet: Optional[SchemaBase | Map] = Undefined, + fieldTitle: Optional[Literal["verbal", "functional", "plain"]] = Undefined, + font: Optional[str] = Undefined, + geoshape: Optional[SchemaBase | Map] = Undefined, + header: Optional[SchemaBase | Map] = Undefined, + headerColumn: Optional[SchemaBase | Map] = Undefined, + headerFacet: Optional[SchemaBase | Map] = Undefined, + headerRow: Optional[SchemaBase | Map] = Undefined, + image: Optional[SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map] = Undefined, + line: Optional[SchemaBase | Map] = Undefined, + lineBreak: Optional[str | Parameter | SchemaBase | Map] = Undefined, + locale: Optional[SchemaBase | Map] = Undefined, + mark: Optional[SchemaBase | Map] = Undefined, + normalizedNumberFormat: Optional[str] = Undefined, + normalizedNumberFormatType: Optional[str] = Undefined, + numberFormat: Optional[str] = Undefined, + numberFormatType: Optional[str] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + params: Optional[Sequence[SchemaBase | Map]] = Undefined, + point: Optional[SchemaBase | Map] = Undefined, + projection: Optional[SchemaBase | Map] = Undefined, + range: Optional[SchemaBase | Map] = Undefined, + rect: Optional[SchemaBase | Map] = Undefined, + rule: Optional[SchemaBase | Map] = Undefined, + scale: Optional[SchemaBase | Map] = Undefined, + selection: Optional[SchemaBase | Map] = Undefined, + square: Optional[SchemaBase | Map] = Undefined, + style: Optional[SchemaBase | Map] = Undefined, + text: Optional[SchemaBase | Map] = Undefined, + tick: Optional[SchemaBase | Map] = Undefined, + timeFormat: Optional[str] = Undefined, + timeFormatType: Optional[str] = Undefined, + title: Optional[SchemaBase | Map] = Undefined, + tooltipFormat: Optional[SchemaBase | Map] = Undefined, + trail: Optional[SchemaBase | Map] = Undefined, + view: Optional[SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + arc=arc, + area=area, + aria=aria, + autosize=autosize, + axis=axis, + axisBand=axisBand, + axisBottom=axisBottom, + axisDiscrete=axisDiscrete, + axisLeft=axisLeft, + axisPoint=axisPoint, + axisQuantitative=axisQuantitative, + axisRight=axisRight, + axisTemporal=axisTemporal, + axisTop=axisTop, + axisX=axisX, + axisXBand=axisXBand, + axisXDiscrete=axisXDiscrete, + axisXPoint=axisXPoint, + axisXQuantitative=axisXQuantitative, + axisXTemporal=axisXTemporal, + axisY=axisY, + axisYBand=axisYBand, + axisYDiscrete=axisYDiscrete, + axisYPoint=axisYPoint, + axisYQuantitative=axisYQuantitative, + axisYTemporal=axisYTemporal, + background=background, + bar=bar, + boxplot=boxplot, + circle=circle, + concat=concat, + countTitle=countTitle, + customFormatTypes=customFormatTypes, + errorband=errorband, + errorbar=errorbar, + facet=facet, + fieldTitle=fieldTitle, + font=font, + geoshape=geoshape, + header=header, + headerColumn=headerColumn, + headerFacet=headerFacet, + headerRow=headerRow, + image=image, + legend=legend, + line=line, + lineBreak=lineBreak, + locale=locale, + mark=mark, + normalizedNumberFormat=normalizedNumberFormat, + normalizedNumberFormatType=normalizedNumberFormatType, + numberFormat=numberFormat, + numberFormatType=numberFormatType, + padding=padding, + params=params, + point=point, + projection=projection, + range=range, + rect=rect, + rule=rule, + scale=scale, + selection=selection, + square=square, + style=style, + text=text, + tick=tick, + timeFormat=timeFormat, + timeFormatType=timeFormatType, + title=title, + tooltipFormat=tooltipFormat, + trail=trail, + view=view, + **kwds, + ) + + +class Cursor(VegaLiteSchema): + """Cursor schema wrapper.""" + + _schema = {"$ref": "#/definitions/Cursor"} + + def __init__(self, *args): + super().__init__(*args) + + +class Cyclical(ColorScheme): + """Cyclical schema wrapper.""" + + _schema = {"$ref": "#/definitions/Cyclical"} + + def __init__(self, *args): + super().__init__(*args) + + +class Data(VegaLiteSchema): + """Data schema wrapper.""" + + _schema = {"$ref": "#/definitions/Data"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class DataFormat(VegaLiteSchema): + """DataFormat schema wrapper.""" + + _schema = {"$ref": "#/definitions/DataFormat"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class CsvDataFormat(DataFormat): + """ + CsvDataFormat schema wrapper. + + Parameters + ---------- + parse : dict, :class:`Parse`, None + 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 : Literal['csv', 'tsv'] + Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``. + + **Default value:** 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"} + + def __init__( + self, + parse: Optional[SchemaBase | Map | None] = Undefined, + type: Optional[Literal["csv", "tsv"]] = Undefined, + **kwds, + ): + super().__init__(parse=parse, type=type, **kwds) + + +class DataSource(Data): + """DataSource schema wrapper.""" + + _schema = {"$ref": "#/definitions/DataSource"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class Datasets(VegaLiteSchema): + """Datasets schema wrapper.""" + + _schema = {"$ref": "#/definitions/Datasets"} + + def __init__(self, **kwds): + super().__init__(**kwds) + + +class Day(VegaLiteSchema): + """Day schema wrapper.""" + + _schema = {"$ref": "#/definitions/Day"} + + def __init__(self, *args): + super().__init__(*args) + + +class Dict(VegaLiteSchema): + """Dict schema wrapper.""" + + _schema = {"$ref": "#/definitions/Dict"} + + def __init__(self, **kwds): + super().__init__(**kwds) + + +class DictInlineDataset(VegaLiteSchema): + """DictInlineDataset schema wrapper.""" + + _schema = {"$ref": "#/definitions/Dict"} + + def __init__(self, **kwds): + super().__init__(**kwds) + + +class DictSelectionInit(VegaLiteSchema): + """DictSelectionInit schema wrapper.""" + + _schema = {"$ref": "#/definitions/Dict"} + + def __init__(self, **kwds): + super().__init__(**kwds) + + +class DictSelectionInitInterval(VegaLiteSchema): + """DictSelectionInitInterval schema wrapper.""" + + _schema = {"$ref": "#/definitions/Dict"} + + def __init__(self, **kwds): + super().__init__(**kwds) + + +class Diverging(ColorScheme): + """Diverging schema wrapper.""" + + _schema = {"$ref": "#/definitions/Diverging"} + + def __init__(self, *args): + super().__init__(*args) + + +class DomainUnionWith(VegaLiteSchema): + """ + DomainUnionWith schema wrapper. + + Parameters + ---------- + unionWith : Sequence[str, bool, dict, float, :class:`DateTime`] + Customized domain values to be union with the field's values or explicitly defined + domain. Should be an array of valid scale domain values. + """ + + _schema = {"$ref": "#/definitions/DomainUnionWith"} + + def __init__( + self, + unionWith: Optional[ + Sequence[str | bool | float | Temporal | SchemaBase | Map] + ] = Undefined, + **kwds, + ): + super().__init__(unionWith=unionWith, **kwds) + + +class DsvDataFormat(DataFormat): + """ + DsvDataFormat schema wrapper. + + Parameters + ---------- + delimiter : str + 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 : dict, :class:`Parse`, None + 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 : Literal['dsv'] + Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``. + + **Default value:** 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"} + + def __init__( + self, + delimiter: Optional[str] = Undefined, + parse: Optional[SchemaBase | Map | None] = Undefined, + type: Optional[Literal["dsv"]] = Undefined, + **kwds, + ): + super().__init__(delimiter=delimiter, parse=parse, type=type, **kwds) + + +class Element(VegaLiteSchema): + """Element schema wrapper.""" + + _schema = {"$ref": "#/definitions/Element"} + + def __init__(self, *args): + super().__init__(*args) + + +class Encoding(VegaLiteSchema): + """ + Encoding schema wrapper. + + Parameters + ---------- + angle : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber` + Rotation angle of point and text marks. + color : dict, :class:`ColorDef`, :class:`FieldOrDatumDefWithConditionDatumDefGradientstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull` + Color of the marks - either fill or stroke color based on the ``filled`` property + 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. + + *Note:* 1) For fine-grained control over both fill and stroke colors of the marks, + please use the ``fill`` and ``stroke`` channels. The ``fill`` or ``stroke`` + encodings have higher precedence than ``color``, thus may override the ``color`` + encoding if conflicting encodings are specified. 2) See the scale documentation for + more information about customizing `color scheme + `__. + description : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition` + A text description of this mark for ARIA accessibility (SVG output only). For SVG + output the ``"aria-label"`` attribute will be set to this description. + detail : dict, :class:`FieldDefWithoutScale`, Sequence[dict, :class:`FieldDefWithoutScale`] + 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 : dict, :class:`ColorDef`, :class:`FieldOrDatumDefWithConditionDatumDefGradientstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull` + Fill color of the marks. **Default value:** If undefined, the default color depends + on `mark config `__'s + ``color`` property. + + *Note:* The ``fill`` encoding has higher precedence than ``color``, thus may + override the ``color`` encoding if conflicting encodings are specified. + fillOpacity : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber` + Fill opacity of the marks. + + **Default value:** If undefined, the default opacity depends on `mark config + `__'s ``fillOpacity`` + property. + href : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition` + A URL to load upon mouse click. + key : dict, :class:`FieldDefWithoutScale` + A data field to use as a unique key for data binding. When a visualization's data is + updated, the key value will be used to match data elements to existing mark + instances. Use a key channel to enable object constancy for transitions over dynamic + data. + latitude : dict, :class:`DatumDef`, :class:`LatLongDef`, :class:`LatLongFieldDef` + Latitude position of geographically projected marks. + latitude2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef` + Latitude-2 position for geographically projected ranged ``"area"``, ``"bar"``, + ``"rect"``, and ``"rule"``. + longitude : dict, :class:`DatumDef`, :class:`LatLongDef`, :class:`LatLongFieldDef` + Longitude position of geographically projected marks. + longitude2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef` + Longitude-2 position for geographically projected ranged ``"area"``, ``"bar"``, + ``"rect"``, and ``"rule"``. + opacity : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber` + Opacity of the marks. + + **Default value:** If undefined, the default opacity depends on `mark config + `__'s ``opacity`` + property. + order : dict, :class:`OrderOnlyDef`, :class:`OrderFieldDef`, :class:`OrderValueDef`, Sequence[dict, :class:`OrderFieldDef`] + Order of the marks. + + * For stacked marks, this ``order`` channel encodes `stack order + `__. + * For line and trail marks, this ``order`` channel encodes order of data points in + the lines. This can be useful for creating `a connected scatterplot + `__. Setting + ``order`` to ``{"value": null}`` makes the line marks use the original order in + the data sources. + * Otherwise, this ``order`` channel encodes layer order of the marks. + + **Note**: In aggregate plots, ``order`` field should be ``aggregate``d to avoid + creating additional aggregation grouping. + radius : dict, :class:`PolarDef`, :class:`PositionValueDef`, :class:`PositionDatumDefBase`, :class:`PositionFieldDefBase` + The outer radius in pixels of arc marks. + radius2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef` + The inner radius in pixels of arc marks. + shape : dict, :class:`ShapeDef`, :class:`FieldOrDatumDefWithConditionDatumDefstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull` + Shape of the mark. + + 1. For ``point`` marks the supported values include: - plotting shapes: + ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, ``"triangle-up"``, + ``"triangle-down"``, ``"triangle-right"``, or ``"triangle-left"``. - the line + symbol ``"stroke"`` - centered directional shapes ``"arrow"``, ``"wedge"``, or + ``"triangle"`` - a custom `SVG path string + `__ (For correct + sizing, custom shape paths should be defined within a square bounding box with + coordinates ranging from -1 to 1 along both the x and y dimensions.) + + 2. 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. (``"circle"`` if unset.) + size : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber` + 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 size. + * For ``"text"`` - the text's font size. + * Size is unsupported for ``"line"``, ``"area"``, and ``"rect"``. (Use ``"trail"`` + instead of line with varying size) + stroke : dict, :class:`ColorDef`, :class:`FieldOrDatumDefWithConditionDatumDefGradientstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull` + Stroke color of the marks. **Default value:** If undefined, the default color + depends on `mark config + `__'s ``color`` + property. + + *Note:* The ``stroke`` encoding has higher precedence than ``color``, thus may + override the ``color`` encoding if conflicting encodings are specified. + strokeDash : dict, :class:`NumericArrayMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumberArray`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray` + Stroke dash of the marks. + + **Default value:** ``[1,0]`` (No dash). + strokeOpacity : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber` + Stroke opacity of the marks. + + **Default value:** If undefined, the default opacity depends on `mark config + `__'s + ``strokeOpacity`` property. + strokeWidth : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber` + Stroke width of the marks. + + **Default value:** If undefined, the default stroke width depends on `mark config + `__'s ``strokeWidth`` + property. + text : dict, :class:`TextDef`, :class:`ValueDefWithConditionStringFieldDefText`, :class:`FieldOrDatumDefWithConditionStringDatumDefText`, :class:`FieldOrDatumDefWithConditionStringFieldDefText` + Text of the ``text`` mark. + theta : dict, :class:`PolarDef`, :class:`PositionValueDef`, :class:`PositionDatumDefBase`, :class:`PositionFieldDefBase` + * For arc marks, the arc length in radians if theta2 is not specified, otherwise the + start arc angle. (A value of 0 indicates up or “north”, increasing values proceed + clockwise.) + + * For text marks, polar coordinate angle in radians. + theta2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef` + The end angle of arc marks in radians. A value of 0 indicates up or “north”, + increasing values proceed clockwise. + tooltip : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`, Sequence[dict, :class:`StringFieldDef`], None + The tooltip text to show upon mouse hover. Specifying ``tooltip`` encoding overrides + `the tooltip property in the mark definition + `__. + + See the `tooltip `__ + documentation for a detailed discussion about tooltip in Vega-Lite. + url : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition` + The URL of an image mark. + x : dict, :class:`PositionDef`, :class:`PositionDatumDef`, :class:`PositionFieldDef`, :class:`PositionValueDef` + X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without + specified ``x2`` or ``width``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef` + X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + xError : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef` + Error value of x coordinates for error specified ``"errorbar"`` and ``"errorband"``. + xError2 : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef` + Secondary error value of x coordinates for error specified ``"errorbar"`` and + ``"errorband"``. + xOffset : dict, :class:`OffsetDef`, :class:`ScaleDatumDef`, :class:`ScaleFieldDef`, :class:`ValueDefnumber` + Offset of x-position of the marks + y : dict, :class:`PositionDef`, :class:`PositionDatumDef`, :class:`PositionFieldDef`, :class:`PositionValueDef` + Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without + specified ``y2`` or ``height``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef` + Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + yError : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef` + Error value of y coordinates for error specified ``"errorbar"`` and ``"errorband"``. + yError2 : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef` + Secondary error value of y coordinates for error specified ``"errorbar"`` and + ``"errorband"``. + yOffset : dict, :class:`OffsetDef`, :class:`ScaleDatumDef`, :class:`ScaleFieldDef`, :class:`ValueDefnumber` + Offset of y-position of the marks + """ + + _schema = {"$ref": "#/definitions/Encoding"} + + def __init__( + self, + angle: Optional[SchemaBase | Map] = Undefined, + color: Optional[SchemaBase | Map] = Undefined, + description: Optional[SchemaBase | Map] = Undefined, + detail: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + fill: Optional[SchemaBase | Map] = Undefined, + fillOpacity: Optional[SchemaBase | Map] = Undefined, + href: Optional[SchemaBase | Map] = Undefined, + key: Optional[SchemaBase | Map] = Undefined, + latitude: Optional[SchemaBase | Map] = Undefined, + latitude2: Optional[SchemaBase | Map] = Undefined, + longitude: Optional[SchemaBase | Map] = Undefined, + longitude2: Optional[SchemaBase | Map] = Undefined, + opacity: Optional[SchemaBase | Map] = Undefined, + order: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + radius: Optional[SchemaBase | Map] = Undefined, + radius2: Optional[SchemaBase | Map] = Undefined, + shape: Optional[SchemaBase | Map] = Undefined, + size: Optional[SchemaBase | Map] = Undefined, + stroke: Optional[SchemaBase | Map] = Undefined, + strokeDash: Optional[SchemaBase | Map] = Undefined, + strokeOpacity: Optional[SchemaBase | Map] = Undefined, + strokeWidth: Optional[SchemaBase | Map] = Undefined, + text: Optional[SchemaBase | Map] = Undefined, + theta: Optional[SchemaBase | Map] = Undefined, + theta2: Optional[SchemaBase | Map] = Undefined, + tooltip: Optional[ + SchemaBase | Sequence[SchemaBase | Map] | Map | None + ] = Undefined, + url: Optional[SchemaBase | Map] = Undefined, + x: Optional[SchemaBase | Map] = Undefined, + x2: Optional[SchemaBase | Map] = Undefined, + xError: Optional[SchemaBase | Map] = Undefined, + xError2: Optional[SchemaBase | Map] = Undefined, + xOffset: Optional[SchemaBase | Map] = Undefined, + y: Optional[SchemaBase | Map] = Undefined, + y2: Optional[SchemaBase | Map] = Undefined, + yError: Optional[SchemaBase | Map] = Undefined, + yError2: Optional[SchemaBase | Map] = Undefined, + yOffset: Optional[SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + angle=angle, + color=color, + description=description, + detail=detail, + fill=fill, + fillOpacity=fillOpacity, + href=href, + key=key, + latitude=latitude, + latitude2=latitude2, + longitude=longitude, + longitude2=longitude2, + opacity=opacity, + order=order, + radius=radius, + radius2=radius2, + shape=shape, + size=size, + stroke=stroke, + strokeDash=strokeDash, + strokeOpacity=strokeOpacity, + strokeWidth=strokeWidth, + text=text, + theta=theta, + theta2=theta2, + tooltip=tooltip, + url=url, + x=x, + x2=x2, + xError=xError, + xError2=xError2, + xOffset=xOffset, + y=y, + y2=y2, + yError=yError, + yError2=yError2, + yOffset=yOffset, + **kwds, + ) + + +class ErrorBand(CompositeMark): + """ErrorBand schema wrapper.""" + + _schema = {"$ref": "#/definitions/ErrorBand"} + + def __init__(self, *args): + super().__init__(*args) + + +class ErrorBandConfig(VegaLiteSchema): + """ + ErrorBandConfig schema wrapper. + + Parameters + ---------- + band : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + borders : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + extent : :class:`ErrorBarExtent`, Literal['ci', 'iqr', 'stderr', 'stdev'] + The extent of the band. Available options include: + + * ``"ci"``: Extend the band to the confidence interval of the mean. + * ``"stderr"``: The size of band are set to the value of standard error, extending + from the mean. + * ``"stdev"``: The size of band are set to the value of standard deviation, + extending from the mean. + * ``"iqr"``: Extend the band to the q1 and q3. + + **Default value:** ``"stderr"``. + interpolate : :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after'] + The line interpolation method for the error band. One of the following: + + * ``"linear"``: piecewise linear segments, as in a polyline. + * ``"linear-closed"``: close the linear segments to form a polygon. + * ``"step"``: a piecewise constant function (a step function) consisting of + alternating horizontal and vertical lines. The y-value changes at the midpoint of + each pair of adjacent x-values. + * ``"step-before"``: a piecewise constant function (a step function) consisting of + alternating horizontal and vertical lines. The y-value changes before the x-value. + * ``"step-after"``: a piecewise constant function (a step function) consisting of + alternating horizontal and vertical lines. The y-value changes after the x-value. + * ``"basis"``: a B-spline, with control point duplication on the ends. + * ``"basis-open"``: an open B-spline; may not intersect the start or end. + * ``"basis-closed"``: a closed B-spline, as in a loop. + * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends. + * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end, + but will intersect other control points. + * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop. + * ``"bundle"``: equivalent to basis, except the tension parameter is used to + straighten the spline. + * ``"monotone"``: cubic interpolation that preserves monotonicity in y. + tension : float + The tension parameter for the interpolation type of the error band. + """ + + _schema = {"$ref": "#/definitions/ErrorBandConfig"} + + def __init__( + self, + band: Optional[bool | SchemaBase | Map] = Undefined, + borders: Optional[bool | SchemaBase | Map] = Undefined, + extent: Optional[SchemaBase | ErrorBarExtent_T] = Undefined, + interpolate: Optional[SchemaBase | Interpolate_T] = Undefined, + tension: Optional[float] = Undefined, + **kwds, + ): + super().__init__( + band=band, + borders=borders, + extent=extent, + interpolate=interpolate, + tension=tension, + **kwds, + ) + + +class ErrorBandDef(CompositeMarkDef): + """ + ErrorBandDef schema wrapper. + + Parameters + ---------- + type : :class:`ErrorBand`, Literal['errorband'] + The mark type. This could a primitive mark type (one of ``"bar"``, ``"circle"``, + ``"square"``, ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"geoshape"``, + ``"rule"``, and ``"text"``) or a composite mark type (``"boxplot"``, + ``"errorband"``, ``"errorbar"``). + band : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + borders : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + clip : bool + Whether a composite mark be clipped to the enclosing group's width and height. + color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + extent : :class:`ErrorBarExtent`, Literal['ci', 'iqr', 'stderr', 'stdev'] + The extent of the band. Available options include: + + * ``"ci"``: Extend the band to the confidence interval of the mean. + * ``"stderr"``: The size of band are set to the value of standard error, extending + from the mean. + * ``"stdev"``: The size of band are set to the value of standard deviation, + extending from the mean. + * ``"iqr"``: Extend the band to the q1 and q3. + + **Default value:** ``"stderr"``. + interpolate : :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after'] + The line interpolation method for the error band. One of the following: + + * ``"linear"``: piecewise linear segments, as in a polyline. + * ``"linear-closed"``: close the linear segments to form a polygon. + * ``"step"``: a piecewise constant function (a step function) consisting of + alternating horizontal and vertical lines. The y-value changes at the midpoint of + each pair of adjacent x-values. + * ``"step-before"``: a piecewise constant function (a step function) consisting of + alternating horizontal and vertical lines. The y-value changes before the x-value. + * ``"step-after"``: a piecewise constant function (a step function) consisting of + alternating horizontal and vertical lines. The y-value changes after the x-value. + * ``"basis"``: a B-spline, with control point duplication on the ends. + * ``"basis-open"``: an open B-spline; may not intersect the start or end. + * ``"basis-closed"``: a closed B-spline, as in a loop. + * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends. + * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end, + but will intersect other control points. + * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop. + * ``"bundle"``: equivalent to basis, except the tension parameter is used to + straighten the spline. + * ``"monotone"``: cubic interpolation that preserves monotonicity in y. + opacity : float + The opacity (value between [0,1]) of the mark. + orient : :class:`Orientation`, Literal['horizontal', 'vertical'] + Orientation of the error band. This is normally automatically determined, but can be + specified when the orientation is ambiguous and cannot be automatically determined. + tension : float + The tension parameter for the interpolation type of the error band. + """ + + _schema = {"$ref": "#/definitions/ErrorBandDef"} + + def __init__( + self, + type: Optional[SchemaBase | ErrorBand_T] = Undefined, + band: Optional[bool | SchemaBase | Map] = Undefined, + borders: Optional[bool | SchemaBase | Map] = Undefined, + clip: Optional[bool] = Undefined, + color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined, + extent: Optional[SchemaBase | ErrorBarExtent_T] = Undefined, + interpolate: Optional[SchemaBase | Interpolate_T] = Undefined, + opacity: Optional[float] = Undefined, + orient: Optional[SchemaBase | Orientation_T] = Undefined, + tension: Optional[float] = Undefined, + **kwds, + ): + super().__init__( + type=type, + band=band, + borders=borders, + clip=clip, + color=color, + extent=extent, + interpolate=interpolate, + opacity=opacity, + orient=orient, + tension=tension, + **kwds, + ) + + +class ErrorBar(CompositeMark): + """ErrorBar schema wrapper.""" + + _schema = {"$ref": "#/definitions/ErrorBar"} + + def __init__(self, *args): + super().__init__(*args) + + +class ErrorBarConfig(VegaLiteSchema): + """ + ErrorBarConfig schema wrapper. + + Parameters + ---------- + extent : :class:`ErrorBarExtent`, Literal['ci', 'iqr', 'stderr', 'stdev'] + The extent of the rule. Available options include: + + * ``"ci"``: Extend the rule to the confidence interval of the mean. + * ``"stderr"``: The size of rule are set to the value of standard error, extending + from the mean. + * ``"stdev"``: The size of rule are set to the value of standard deviation, + extending from the mean. + * ``"iqr"``: Extend the rule to the q1 and q3. + + **Default value:** ``"stderr"``. + rule : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + size : float + Size of the ticks of an error bar + thickness : float + Thickness of the ticks and the bar of an error bar + ticks : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + """ + + _schema = {"$ref": "#/definitions/ErrorBarConfig"} + + def __init__( + self, + extent: Optional[SchemaBase | ErrorBarExtent_T] = Undefined, + rule: Optional[bool | SchemaBase | Map] = Undefined, + size: Optional[float] = Undefined, + thickness: Optional[float] = Undefined, + ticks: Optional[bool | SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + extent=extent, + rule=rule, + size=size, + thickness=thickness, + ticks=ticks, + **kwds, + ) + + +class ErrorBarDef(CompositeMarkDef): + """ + ErrorBarDef schema wrapper. + + Parameters + ---------- + type : :class:`ErrorBar`, Literal['errorbar'] + The mark type. This could a primitive mark type (one of ``"bar"``, ``"circle"``, + ``"square"``, ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"geoshape"``, + ``"rule"``, and ``"text"``) or a composite mark type (``"boxplot"``, + ``"errorband"``, ``"errorbar"``). + clip : bool + Whether a composite mark be clipped to the enclosing group's width and height. + color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + extent : :class:`ErrorBarExtent`, Literal['ci', 'iqr', 'stderr', 'stdev'] + The extent of the rule. Available options include: + + * ``"ci"``: Extend the rule to the confidence interval of the mean. + * ``"stderr"``: The size of rule are set to the value of standard error, extending + from the mean. + * ``"stdev"``: The size of rule are set to the value of standard deviation, + extending from the mean. + * ``"iqr"``: Extend the rule to the q1 and q3. + + **Default value:** ``"stderr"``. + opacity : float + The opacity (value between [0,1]) of the mark. + orient : :class:`Orientation`, Literal['horizontal', 'vertical'] + Orientation of the error bar. This is normally automatically determined, but can be + specified when the orientation is ambiguous and cannot be automatically determined. + rule : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + size : float + Size of the ticks of an error bar + thickness : float + Thickness of the ticks and the bar of an error bar + ticks : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + """ + + _schema = {"$ref": "#/definitions/ErrorBarDef"} + + def __init__( + self, + type: Optional[SchemaBase | ErrorBar_T] = Undefined, + clip: Optional[bool] = Undefined, + color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined, + extent: Optional[SchemaBase | ErrorBarExtent_T] = Undefined, + opacity: Optional[float] = Undefined, + orient: Optional[SchemaBase | Orientation_T] = Undefined, + rule: Optional[bool | SchemaBase | Map] = Undefined, + size: Optional[float] = Undefined, + thickness: Optional[float] = Undefined, + ticks: Optional[bool | SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + type=type, + clip=clip, + color=color, + extent=extent, + opacity=opacity, + orient=orient, + rule=rule, + size=size, + thickness=thickness, + ticks=ticks, + **kwds, + ) + + +class ErrorBarExtent(VegaLiteSchema): + """ErrorBarExtent schema wrapper.""" + + _schema = {"$ref": "#/definitions/ErrorBarExtent"} + + def __init__(self, *args): + super().__init__(*args) + + +class Expr(VegaLiteSchema): + """Expr schema wrapper.""" + + _schema = {"$ref": "#/definitions/Expr"} + + def __init__(self, *args): + super().__init__(*args) + + +class ExprRef(VegaLiteSchema): + """ + ExprRef schema wrapper. + + Parameters + ---------- + expr : str + Vega expression (which can refer to Vega-Lite parameters). + """ + + _schema = {"$ref": "#/definitions/ExprRef"} + + def __init__(self, expr: Optional[str] = Undefined, **kwds): + super().__init__(expr=expr, **kwds) + + +class FacetEncodingFieldDef(VegaLiteSchema): + r""" + FacetEncodingFieldDef schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none'] + The alignment to apply to grid rows and columns. The supported string values are + ``"all"``, ``"each"``, and ``"none"``. + + * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply + placed one after the other. + * For ``"each"``, subviews will be aligned into a clean grid structure, but each row + or column may be of variable size. + * For ``"all"``, subviews will be aligned and each row or column will be sized + identically based on the maximum observed size. String values for this property + will be applied to both grid rows and columns. + + Alternatively, an object value of the form ``{"row": string, "column": string}`` can + be used to supply different alignments for rows and columns. + + **Default value:** ``"all"``. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + bounds : Literal['full', 'flush'] + The bounds calculation method to use for determining the extent of a sub-plot. One + of ``full`` (the default) or ``flush``. + + * If set to ``full``, the entire calculated bounds (including axes, title, and + legend) will be used. + * If set to ``flush``, only the specified width and height values for the sub-view + will be used. The ``flush`` setting can be useful when attempting to place + sub-plots without axes or legends into a uniform grid structure. + + **Default value:** ``"full"`` + center : bool, dict, :class:`RowColboolean` + Boolean flag indicating if subviews should be centered relative to their respective + rows or columns. + + An object value of the form ``{"row": boolean, "column": boolean}`` can be used to + supply different centering values for rows and columns. + + **Default value:** ``false`` + columns : float + The number of columns to include in the view composition layout. + + **Default value**: ``undefined`` -- An infinite number of columns (a single row) + will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the + ``column`` channel (for ``facet`` and ``repeat``). + + **Note**: + + 1) This property is only for: + + * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``) + * the ``facet`` and ``repeat`` operator with one field/repetition definition + (without row/column nesting) + + 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``) + and to using the ``row`` channel (for ``facet`` and ``repeat``). + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + header : dict, :class:`Header`, None + An object defining properties of a facet's header. + sort : dict, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, Sequence[dict, :class:`DateTime`], Literal['ascending', 'descending'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` is not supported for ``row`` and ``column``. + spacing : dict, float, :class:`RowColnumber` + The spacing in pixels between sub-views of the composition operator. An object of + the form ``{"row": number, "column": number}`` can be used to set different spacing + values for rows and columns. + + **Default value**: Depends on ``"spacing"`` property of `the view composition + configuration `__ + (``20`` by default) + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/FacetEncodingFieldDef"} + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + align: Optional[SchemaBase | Map | LayoutAlign_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + bounds: Optional[Literal["full", "flush"]] = Undefined, + center: Optional[bool | SchemaBase | Map] = Undefined, + columns: Optional[float] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + header: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | SortOrder_T + | None + ] = Undefined, + spacing: Optional[float | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + align=align, + bandPosition=bandPosition, + bin=bin, + bounds=bounds, + center=center, + columns=columns, + field=field, + header=header, + sort=sort, + spacing=spacing, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +class FacetFieldDef(VegaLiteSchema): + r""" + FacetFieldDef schema wrapper. + + Parameters + ---------- + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + header : dict, :class:`Header`, None + An object defining properties of a facet's header. + sort : dict, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, Sequence[dict, :class:`DateTime`], Literal['ascending', 'descending'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` is not supported for ``row`` and ``column``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/FacetFieldDef"} + + def __init__( + self, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + header: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | SortOrder_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + header=header, + sort=sort, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +class FacetMapping(VegaLiteSchema): + """ + FacetMapping schema wrapper. + + Parameters + ---------- + column : dict, :class:`FacetFieldDef` + A field definition for the horizontal facet of trellis plots. + row : dict, :class:`FacetFieldDef` + A field definition for the vertical facet of trellis plots. + """ + + _schema = {"$ref": "#/definitions/FacetMapping"} + + def __init__( + self, + column: Optional[SchemaBase | Map] = Undefined, + row: Optional[SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__(column=column, row=row, **kwds) + + +class FacetedEncoding(VegaLiteSchema): + """ + FacetedEncoding schema wrapper. + + Parameters + ---------- + angle : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber` + Rotation angle of point and text marks. + color : dict, :class:`ColorDef`, :class:`FieldOrDatumDefWithConditionDatumDefGradientstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull` + Color of the marks - either fill or stroke color based on the ``filled`` property + 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. + + *Note:* 1) For fine-grained control over both fill and stroke colors of the marks, + please use the ``fill`` and ``stroke`` channels. The ``fill`` or ``stroke`` + encodings have higher precedence than ``color``, thus may override the ``color`` + encoding if conflicting encodings are specified. 2) See the scale documentation for + more information about customizing `color scheme + `__. + column : dict, :class:`RowColumnEncodingFieldDef` + A field definition for the horizontal facet of trellis plots. + description : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition` + A text description of this mark for ARIA accessibility (SVG output only). For SVG + output the ``"aria-label"`` attribute will be set to this description. + detail : dict, :class:`FieldDefWithoutScale`, Sequence[dict, :class:`FieldDefWithoutScale`] + 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. + facet : dict, :class:`FacetEncodingFieldDef` + A field definition for the (flexible) facet of trellis plots. + + If either ``row`` or ``column`` is specified, this channel will be ignored. + fill : dict, :class:`ColorDef`, :class:`FieldOrDatumDefWithConditionDatumDefGradientstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull` + Fill color of the marks. **Default value:** If undefined, the default color depends + on `mark config `__'s + ``color`` property. + + *Note:* The ``fill`` encoding has higher precedence than ``color``, thus may + override the ``color`` encoding if conflicting encodings are specified. + fillOpacity : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber` + Fill opacity of the marks. + + **Default value:** If undefined, the default opacity depends on `mark config + `__'s ``fillOpacity`` + property. + href : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition` + A URL to load upon mouse click. + key : dict, :class:`FieldDefWithoutScale` + A data field to use as a unique key for data binding. When a visualization's data is + updated, the key value will be used to match data elements to existing mark + instances. Use a key channel to enable object constancy for transitions over dynamic + data. + latitude : dict, :class:`DatumDef`, :class:`LatLongDef`, :class:`LatLongFieldDef` + Latitude position of geographically projected marks. + latitude2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef` + Latitude-2 position for geographically projected ranged ``"area"``, ``"bar"``, + ``"rect"``, and ``"rule"``. + longitude : dict, :class:`DatumDef`, :class:`LatLongDef`, :class:`LatLongFieldDef` + Longitude position of geographically projected marks. + longitude2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef` + Longitude-2 position for geographically projected ranged ``"area"``, ``"bar"``, + ``"rect"``, and ``"rule"``. + opacity : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber` + Opacity of the marks. + + **Default value:** If undefined, the default opacity depends on `mark config + `__'s ``opacity`` + property. + order : dict, :class:`OrderOnlyDef`, :class:`OrderFieldDef`, :class:`OrderValueDef`, Sequence[dict, :class:`OrderFieldDef`] + Order of the marks. + + * For stacked marks, this ``order`` channel encodes `stack order + `__. + * For line and trail marks, this ``order`` channel encodes order of data points in + the lines. This can be useful for creating `a connected scatterplot + `__. Setting + ``order`` to ``{"value": null}`` makes the line marks use the original order in + the data sources. + * Otherwise, this ``order`` channel encodes layer order of the marks. + + **Note**: In aggregate plots, ``order`` field should be ``aggregate``d to avoid + creating additional aggregation grouping. + radius : dict, :class:`PolarDef`, :class:`PositionValueDef`, :class:`PositionDatumDefBase`, :class:`PositionFieldDefBase` + The outer radius in pixels of arc marks. + radius2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef` + The inner radius in pixels of arc marks. + row : dict, :class:`RowColumnEncodingFieldDef` + A field definition for the vertical facet of trellis plots. + shape : dict, :class:`ShapeDef`, :class:`FieldOrDatumDefWithConditionDatumDefstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull` + Shape of the mark. + + 1. For ``point`` marks the supported values include: - plotting shapes: + ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, ``"triangle-up"``, + ``"triangle-down"``, ``"triangle-right"``, or ``"triangle-left"``. - the line + symbol ``"stroke"`` - centered directional shapes ``"arrow"``, ``"wedge"``, or + ``"triangle"`` - a custom `SVG path string + `__ (For correct + sizing, custom shape paths should be defined within a square bounding box with + coordinates ranging from -1 to 1 along both the x and y dimensions.) + + 2. 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. (``"circle"`` if unset.) + size : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber` + 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 size. + * For ``"text"`` - the text's font size. + * Size is unsupported for ``"line"``, ``"area"``, and ``"rect"``. (Use ``"trail"`` + instead of line with varying size) + stroke : dict, :class:`ColorDef`, :class:`FieldOrDatumDefWithConditionDatumDefGradientstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull` + Stroke color of the marks. **Default value:** If undefined, the default color + depends on `mark config + `__'s ``color`` + property. + + *Note:* The ``stroke`` encoding has higher precedence than ``color``, thus may + override the ``color`` encoding if conflicting encodings are specified. + strokeDash : dict, :class:`NumericArrayMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumberArray`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray` + Stroke dash of the marks. + + **Default value:** ``[1,0]`` (No dash). + strokeOpacity : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber` + Stroke opacity of the marks. + + **Default value:** If undefined, the default opacity depends on `mark config + `__'s + ``strokeOpacity`` property. + strokeWidth : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber` + Stroke width of the marks. + + **Default value:** If undefined, the default stroke width depends on `mark config + `__'s ``strokeWidth`` + property. + text : dict, :class:`TextDef`, :class:`ValueDefWithConditionStringFieldDefText`, :class:`FieldOrDatumDefWithConditionStringDatumDefText`, :class:`FieldOrDatumDefWithConditionStringFieldDefText` + Text of the ``text`` mark. + theta : dict, :class:`PolarDef`, :class:`PositionValueDef`, :class:`PositionDatumDefBase`, :class:`PositionFieldDefBase` + * For arc marks, the arc length in radians if theta2 is not specified, otherwise the + start arc angle. (A value of 0 indicates up or “north”, increasing values proceed + clockwise.) + + * For text marks, polar coordinate angle in radians. + theta2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef` + The end angle of arc marks in radians. A value of 0 indicates up or “north”, + increasing values proceed clockwise. + tooltip : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`, Sequence[dict, :class:`StringFieldDef`], None + The tooltip text to show upon mouse hover. Specifying ``tooltip`` encoding overrides + `the tooltip property in the mark definition + `__. + + See the `tooltip `__ + documentation for a detailed discussion about tooltip in Vega-Lite. + url : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition` + The URL of an image mark. + x : dict, :class:`PositionDef`, :class:`PositionDatumDef`, :class:`PositionFieldDef`, :class:`PositionValueDef` + X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without + specified ``x2`` or ``width``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef` + X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + xError : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef` + Error value of x coordinates for error specified ``"errorbar"`` and ``"errorband"``. + xError2 : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef` + Secondary error value of x coordinates for error specified ``"errorbar"`` and + ``"errorband"``. + xOffset : dict, :class:`OffsetDef`, :class:`ScaleDatumDef`, :class:`ScaleFieldDef`, :class:`ValueDefnumber` + Offset of x-position of the marks + y : dict, :class:`PositionDef`, :class:`PositionDatumDef`, :class:`PositionFieldDef`, :class:`PositionValueDef` + Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without + specified ``y2`` or ``height``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef` + Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + yError : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef` + Error value of y coordinates for error specified ``"errorbar"`` and ``"errorband"``. + yError2 : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef` + Secondary error value of y coordinates for error specified ``"errorbar"`` and + ``"errorband"``. + yOffset : dict, :class:`OffsetDef`, :class:`ScaleDatumDef`, :class:`ScaleFieldDef`, :class:`ValueDefnumber` + Offset of y-position of the marks + """ + + _schema = {"$ref": "#/definitions/FacetedEncoding"} + + def __init__( + self, + angle: Optional[SchemaBase | Map] = Undefined, + color: Optional[SchemaBase | Map] = Undefined, + column: Optional[SchemaBase | Map] = Undefined, + description: Optional[SchemaBase | Map] = Undefined, + detail: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + facet: Optional[SchemaBase | Map] = Undefined, + fill: Optional[SchemaBase | Map] = Undefined, + fillOpacity: Optional[SchemaBase | Map] = Undefined, + href: Optional[SchemaBase | Map] = Undefined, + key: Optional[SchemaBase | Map] = Undefined, + latitude: Optional[SchemaBase | Map] = Undefined, + latitude2: Optional[SchemaBase | Map] = Undefined, + longitude: Optional[SchemaBase | Map] = Undefined, + longitude2: Optional[SchemaBase | Map] = Undefined, + opacity: Optional[SchemaBase | Map] = Undefined, + order: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + radius: Optional[SchemaBase | Map] = Undefined, + radius2: Optional[SchemaBase | Map] = Undefined, + row: Optional[SchemaBase | Map] = Undefined, + shape: Optional[SchemaBase | Map] = Undefined, + size: Optional[SchemaBase | Map] = Undefined, + stroke: Optional[SchemaBase | Map] = Undefined, + strokeDash: Optional[SchemaBase | Map] = Undefined, + strokeOpacity: Optional[SchemaBase | Map] = Undefined, + strokeWidth: Optional[SchemaBase | Map] = Undefined, + text: Optional[SchemaBase | Map] = Undefined, + theta: Optional[SchemaBase | Map] = Undefined, + theta2: Optional[SchemaBase | Map] = Undefined, + tooltip: Optional[ + SchemaBase | Sequence[SchemaBase | Map] | Map | None + ] = Undefined, + url: Optional[SchemaBase | Map] = Undefined, + x: Optional[SchemaBase | Map] = Undefined, + x2: Optional[SchemaBase | Map] = Undefined, + xError: Optional[SchemaBase | Map] = Undefined, + xError2: Optional[SchemaBase | Map] = Undefined, + xOffset: Optional[SchemaBase | Map] = Undefined, + y: Optional[SchemaBase | Map] = Undefined, + y2: Optional[SchemaBase | Map] = Undefined, + yError: Optional[SchemaBase | Map] = Undefined, + yError2: Optional[SchemaBase | Map] = Undefined, + yOffset: Optional[SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + angle=angle, + color=color, + column=column, + description=description, + detail=detail, + facet=facet, + fill=fill, + fillOpacity=fillOpacity, + href=href, + key=key, + latitude=latitude, + latitude2=latitude2, + longitude=longitude, + longitude2=longitude2, + opacity=opacity, + order=order, + radius=radius, + radius2=radius2, + row=row, + shape=shape, + size=size, + stroke=stroke, + strokeDash=strokeDash, + strokeOpacity=strokeOpacity, + strokeWidth=strokeWidth, + text=text, + theta=theta, + theta2=theta2, + tooltip=tooltip, + url=url, + x=x, + x2=x2, + xError=xError, + xError2=xError2, + xOffset=xOffset, + y=y, + y2=y2, + yError=yError, + yError2=yError2, + yOffset=yOffset, + **kwds, + ) + + +class Feature(VegaLiteSchema): + """ + Feature schema wrapper. + + A feature object which contains a geometry and associated properties. + https://tools.ietf.org/html/rfc7946#section-3.2 + + Parameters + ---------- + geometry : dict, :class:`Point`, :class:`Polygon`, :class:`Geometry`, :class:`LineString`, :class:`MultiPoint`, :class:`MultiPolygon`, :class:`MultiLineString`, :class:`GeometryCollection` + The feature's geometry + properties : dict, :class:`GeoJsonProperties`, None + Properties associated with this feature. + type : Literal['Feature'] + Specifies the type of GeoJSON object. + bbox : :class:`BBox`, Sequence[float] + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + id : str, float + A value that uniquely identifies this feature in a + https://tools.ietf.org/html/rfc7946#section-3.2. + """ + + _schema = {"$ref": "#/definitions/Feature"} + + def __init__( + self, + geometry: Optional[SchemaBase | Map] = Undefined, + properties: Optional[SchemaBase | Map | None] = Undefined, + type: Optional[Literal["Feature"]] = Undefined, + bbox: Optional[SchemaBase | Sequence[float]] = Undefined, + id: Optional[str | float] = Undefined, + **kwds, + ): + super().__init__( + geometry=geometry, + properties=properties, + type=type, + bbox=bbox, + id=id, + **kwds, + ) + + +class FeatureCollection(VegaLiteSchema): + """ + FeatureCollection schema wrapper. + + A collection of feature objects. https://tools.ietf.org/html/rfc7946#section-3.3 + + Parameters + ---------- + features : Sequence[dict, :class:`FeatureGeometryGeoJsonProperties`] + + type : Literal['FeatureCollection'] + Specifies the type of GeoJSON object. + bbox : :class:`BBox`, Sequence[float] + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + """ + + _schema = {"$ref": "#/definitions/FeatureCollection"} + + def __init__( + self, + features: Optional[Sequence[SchemaBase | Map]] = Undefined, + type: Optional[Literal["FeatureCollection"]] = Undefined, + bbox: Optional[SchemaBase | Sequence[float]] = Undefined, + **kwds, + ): + super().__init__(features=features, type=type, bbox=bbox, **kwds) + + +class FeatureGeometryGeoJsonProperties(VegaLiteSchema): + """ + FeatureGeometryGeoJsonProperties schema wrapper. + + A feature object which contains a geometry and associated properties. + https://tools.ietf.org/html/rfc7946#section-3.2 + + Parameters + ---------- + geometry : dict, :class:`Point`, :class:`Polygon`, :class:`Geometry`, :class:`LineString`, :class:`MultiPoint`, :class:`MultiPolygon`, :class:`MultiLineString`, :class:`GeometryCollection` + The feature's geometry + properties : dict, :class:`GeoJsonProperties`, None + Properties associated with this feature. + type : Literal['Feature'] + Specifies the type of GeoJSON object. + bbox : :class:`BBox`, Sequence[float] + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + id : str, float + A value that uniquely identifies this feature in a + https://tools.ietf.org/html/rfc7946#section-3.2. + """ + + _schema = {"$ref": "#/definitions/Feature"} + + def __init__( + self, + geometry: Optional[SchemaBase | Map] = Undefined, + properties: Optional[SchemaBase | Map | None] = Undefined, + type: Optional[Literal["Feature"]] = Undefined, + bbox: Optional[SchemaBase | Sequence[float]] = Undefined, + id: Optional[str | float] = Undefined, + **kwds, + ): + super().__init__( + geometry=geometry, + properties=properties, + type=type, + bbox=bbox, + id=id, + **kwds, + ) + + +class Field(VegaLiteSchema): + """Field schema wrapper.""" + + _schema = {"$ref": "#/definitions/Field"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class FieldDefWithoutScale(VegaLiteSchema): + r""" + FieldDefWithoutScale schema wrapper. + + Definition object for a data field, its type and transformation of an encoding channel. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/FieldDefWithoutScale"} + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +class FieldName(Field): + """FieldName schema wrapper.""" + + _schema = {"$ref": "#/definitions/FieldName"} + + def __init__(self, *args): + super().__init__(*args) + + +class FieldOrDatumDefWithConditionStringFieldDefstring(VegaLiteSchema): + r""" + FieldOrDatumDefWithConditionStringFieldDefstring schema wrapper. + + Parameters + ---------- + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`, Sequence[dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + format : str, dict, :class:`Dict` + When used with the default ``"number"`` and ``"time"`` format type, the text + formatting pattern for labels of guides (axes, legends, headers) and text marks. + + * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's + `number format pattern `__. + * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time + format pattern `__. + + See the `format documentation `__ + for more examples. + + When used with a `custom formatType + `__, this + value will be passed as ``format`` alongside ``datum.value`` to the registered + function. + + **Default value:** Derived from `numberFormat + `__ config for number + format and from `timeFormat + `__ config for time + format. + formatType : str + The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom + format type + `__. + + **Default value:** + + * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``. + * ``"number"`` for quantitative fields as well as ordinal and nominal fields without + ``timeUnit``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = { + "$ref": "#/definitions/FieldOrDatumDefWithCondition" + } + + def __init__( + self, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + format=format, + formatType=formatType, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +class FieldRange(VegaLiteSchema): + """ + FieldRange schema wrapper. + + Parameters + ---------- + field : str + + """ + + _schema = {"$ref": "#/definitions/FieldRange"} + + def __init__(self, field: Optional[str] = Undefined, **kwds): + super().__init__(field=field, **kwds) + + +class Fit(VegaLiteSchema): + """Fit schema wrapper.""" + + _schema = {"$ref": "#/definitions/Fit"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class FontStyle(VegaLiteSchema): + """FontStyle schema wrapper.""" + + _schema = {"$ref": "#/definitions/FontStyle"} + + def __init__(self, *args): + super().__init__(*args) + + +class FontWeight(VegaLiteSchema): + """FontWeight schema wrapper.""" + + _schema = {"$ref": "#/definitions/FontWeight"} + + def __init__(self, *args): + super().__init__(*args) + + +class FormatConfig(VegaLiteSchema): + """ + FormatConfig schema wrapper. + + Parameters + ---------- + normalizedNumberFormat : str + If normalizedNumberFormatType is not specified, D3 number format for axis labels, + text marks, and tooltips of normalized stacked fields (fields with ``stack: + "normalize"``). For example ``"s"`` for SI units. Use `D3's number format pattern + `__. + + If ``config.normalizedNumberFormatType`` is specified and + ``config.customFormatTypes`` is ``true``, this value will be passed as ``format`` + alongside ``datum.value`` to the ``config.numberFormatType`` function. **Default + value:** ``%`` + normalizedNumberFormatType : str + `Custom format type + `__ for + ``config.normalizedNumberFormat``. + + **Default value:** ``undefined`` -- This is equilvalent to call D3-format, which is + exposed as `format in Vega-Expression + `__. **Note:** You must also + set ``customFormatTypes`` to ``true`` to use this feature. + numberFormat : str + If numberFormatType is not specified, D3 number format for guide labels, text marks, + and tooltips of non-normalized fields (fields *without* ``stack: "normalize"``). For + example ``"s"`` for SI units. Use `D3's number format pattern + `__. + + If ``config.numberFormatType`` is specified and ``config.customFormatTypes`` is + ``true``, this value will be passed as ``format`` alongside ``datum.value`` to the + ``config.numberFormatType`` function. + numberFormatType : str + `Custom format type + `__ for + ``config.numberFormat``. + + **Default value:** ``undefined`` -- This is equilvalent to call D3-format, which is + exposed as `format in Vega-Expression + `__. **Note:** You must also + set ``customFormatTypes`` to ``true`` to use this feature. + timeFormat : str + Default time format for raw time values (without time units) in text marks, legend + labels and header labels. + + **Default value:** ``"%b %d, %Y"`` **Note:** Axes automatically determine the format + for each label automatically so this config does not affect axes. + timeFormatType : str + `Custom format type + `__ for + ``config.timeFormat``. + + **Default value:** ``undefined`` -- This is equilvalent to call D3-time-format, + which is exposed as `timeFormat in Vega-Expression + `__. **Note:** You must + also set ``customFormatTypes`` to ``true`` and there must *not* be a ``timeUnit`` + defined to use this feature. + """ + + _schema = {"$ref": "#/definitions/FormatConfig"} + + def __init__( + self, + normalizedNumberFormat: Optional[str] = Undefined, + normalizedNumberFormatType: Optional[str] = Undefined, + numberFormat: Optional[str] = Undefined, + numberFormatType: Optional[str] = Undefined, + timeFormat: Optional[str] = Undefined, + timeFormatType: Optional[str] = Undefined, + **kwds, + ): + super().__init__( + normalizedNumberFormat=normalizedNumberFormat, + normalizedNumberFormatType=normalizedNumberFormatType, + numberFormat=numberFormat, + numberFormatType=numberFormatType, + timeFormat=timeFormat, + timeFormatType=timeFormatType, + **kwds, + ) + + +class Generator(Data): + """Generator schema wrapper.""" + + _schema = {"$ref": "#/definitions/Generator"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class GenericUnitSpecEncodingAnyMark(VegaLiteSchema): + """ + GenericUnitSpecEncodingAnyMark schema wrapper. + + Base interface for a unit (single-view) specification. + + Parameters + ---------- + mark : dict, :class:`Mark`, :class:`AnyMark`, :class:`BoxPlot`, :class:`MarkDef`, :class:`ErrorBar`, :class:`ErrorBand`, :class:`BoxPlotDef`, :class:`ErrorBarDef`, :class:`ErrorBandDef`, :class:`CompositeMark`, :class:`CompositeMarkDef`, Literal['arc', 'area', 'bar', 'image', 'line', 'point', 'rect', 'rule', 'text', 'tick', 'trail', 'circle', 'square', 'geoshape', 'boxplot', 'errorband', 'errorbar'] + A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``, + ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and + ``"text"``) or a `mark definition object + `__. + data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None + An object describing the data source. Set to ``null`` to ignore the parent's data + source. If no data is set, it is derived from the parent. + description : str + Description of this mark for commenting purpose. + encoding : dict, :class:`Encoding` + A key-value mapping between encoding channels and definition of fields. + name : str + Name of the visualization for later reference. + params : Sequence[dict, :class:`SelectionParameter`] + An array of parameters that may either be simple variables, or more complex + selections that map user input to data queries. + projection : dict, :class:`Projection` + An object defining properties of geographic projection, which will be applied to + ``shape`` path for ``"geoshape"`` marks and to ``latitude`` and ``"longitude"`` + channels for other marks. + title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams` + Title for the plot. + transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`] + An array of data transformations such as filter and new field calculation. + """ + + _schema = {"$ref": "#/definitions/GenericUnitSpec"} + + def __init__( + self, + mark: Optional[SchemaBase | Map | Mark_T | CompositeMark_T] = Undefined, + data: Optional[SchemaBase | Map | None] = Undefined, + description: Optional[str] = Undefined, + encoding: Optional[SchemaBase | Map] = Undefined, + name: Optional[str] = Undefined, + params: Optional[Sequence[SchemaBase | Map]] = Undefined, + projection: Optional[SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + transform: Optional[Sequence[SchemaBase | Map]] = Undefined, + **kwds, + ): + super().__init__( + mark=mark, + data=data, + description=description, + encoding=encoding, + name=name, + params=params, + projection=projection, + title=title, + transform=transform, + **kwds, + ) + + +class GeoJsonFeature(Fit): + """ + GeoJsonFeature schema wrapper. + + A feature object which contains a geometry and associated properties. + https://tools.ietf.org/html/rfc7946#section-3.2 + + Parameters + ---------- + geometry : dict, :class:`Point`, :class:`Polygon`, :class:`Geometry`, :class:`LineString`, :class:`MultiPoint`, :class:`MultiPolygon`, :class:`MultiLineString`, :class:`GeometryCollection` + The feature's geometry + properties : dict, :class:`GeoJsonProperties`, None + Properties associated with this feature. + type : Literal['Feature'] + Specifies the type of GeoJSON object. + bbox : :class:`BBox`, Sequence[float] + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + id : str, float + A value that uniquely identifies this feature in a + https://tools.ietf.org/html/rfc7946#section-3.2. + """ + + _schema = {"$ref": "#/definitions/GeoJsonFeature"} + + def __init__( + self, + geometry: Optional[SchemaBase | Map] = Undefined, + properties: Optional[SchemaBase | Map | None] = Undefined, + type: Optional[Literal["Feature"]] = Undefined, + bbox: Optional[SchemaBase | Sequence[float]] = Undefined, + id: Optional[str | float] = Undefined, + **kwds, + ): + super().__init__( + geometry=geometry, + properties=properties, + type=type, + bbox=bbox, + id=id, + **kwds, + ) + + +class GeoJsonFeatureCollection(Fit): + """ + GeoJsonFeatureCollection schema wrapper. + + A collection of feature objects. https://tools.ietf.org/html/rfc7946#section-3.3 + + Parameters + ---------- + features : Sequence[dict, :class:`FeatureGeometryGeoJsonProperties`] + + type : Literal['FeatureCollection'] + Specifies the type of GeoJSON object. + bbox : :class:`BBox`, Sequence[float] + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + """ + + _schema = {"$ref": "#/definitions/GeoJsonFeatureCollection"} + + def __init__( + self, + features: Optional[Sequence[SchemaBase | Map]] = Undefined, + type: Optional[Literal["FeatureCollection"]] = Undefined, + bbox: Optional[SchemaBase | Sequence[float]] = Undefined, + **kwds, + ): + super().__init__(features=features, type=type, bbox=bbox, **kwds) + + +class GeoJsonProperties(VegaLiteSchema): + """GeoJsonProperties schema wrapper.""" + + _schema = {"$ref": "#/definitions/GeoJsonProperties"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class Geometry(VegaLiteSchema): + """ + Geometry schema wrapper. + + Union of geometry objects. https://tools.ietf.org/html/rfc7946#section-3 + """ + + _schema = {"$ref": "#/definitions/Geometry"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class GeometryCollection(Geometry): + """ + GeometryCollection schema wrapper. + + Geometry Collection https://tools.ietf.org/html/rfc7946#section-3.1.8 + + Parameters + ---------- + geometries : Sequence[dict, :class:`Point`, :class:`Polygon`, :class:`Geometry`, :class:`LineString`, :class:`MultiPoint`, :class:`MultiPolygon`, :class:`MultiLineString`, :class:`GeometryCollection`] + + type : Literal['GeometryCollection'] + Specifies the type of GeoJSON object. + bbox : :class:`BBox`, Sequence[float] + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + """ + + _schema = {"$ref": "#/definitions/GeometryCollection"} + + def __init__( + self, + geometries: Optional[Sequence[SchemaBase | Map]] = Undefined, + type: Optional[Literal["GeometryCollection"]] = Undefined, + bbox: Optional[SchemaBase | Sequence[float]] = Undefined, + **kwds, + ): + super().__init__(geometries=geometries, type=type, bbox=bbox, **kwds) + + +class Gradient(VegaLiteSchema): + """Gradient schema wrapper.""" + + _schema = {"$ref": "#/definitions/Gradient"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class GradientStop(VegaLiteSchema): + """ + GradientStop schema wrapper. + + Parameters + ---------- + color : str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + The color value at this point in the gradient. + offset : float + The offset fraction for the color stop, indicating its position within the gradient. + """ + + _schema = {"$ref": "#/definitions/GradientStop"} + + def __init__( + self, + color: Optional[str | SchemaBase | ColorName_T] = Undefined, + offset: Optional[float] = Undefined, + **kwds, + ): + super().__init__(color=color, offset=offset, **kwds) + + +class GraticuleGenerator(Generator): + """ + GraticuleGenerator schema wrapper. + + Parameters + ---------- + graticule : dict, Literal[True], :class:`GraticuleParams` + Generate graticule GeoJSON data for geographic reference lines. + name : str + Provide a placeholder name and bind data at runtime. + """ + + _schema = {"$ref": "#/definitions/GraticuleGenerator"} + + def __init__( + self, + graticule: Optional[SchemaBase | Literal[True] | Map] = Undefined, + name: Optional[str] = Undefined, + **kwds, + ): + super().__init__(graticule=graticule, name=name, **kwds) + + +class GraticuleParams(VegaLiteSchema): + """ + GraticuleParams schema wrapper. + + Parameters + ---------- + extent : :class:`Vector2Vector2number`, Sequence[Sequence[float], :class:`Vector2number`] + Sets both the major and minor extents to the same values. + extentMajor : :class:`Vector2Vector2number`, Sequence[Sequence[float], :class:`Vector2number`] + The major extent of the graticule as a two-element array of coordinates. + extentMinor : :class:`Vector2Vector2number`, Sequence[Sequence[float], :class:`Vector2number`] + The minor extent of the graticule as a two-element array of coordinates. + precision : float + The precision of the graticule in degrees. + + **Default value:** ``2.5`` + step : Sequence[float], :class:`Vector2number` + Sets both the major and minor step angles to the same values. + stepMajor : Sequence[float], :class:`Vector2number` + The major step angles of the graticule. + + **Default value:** ``[90, 360]`` + stepMinor : Sequence[float], :class:`Vector2number` + The minor step angles of the graticule. + + **Default value:** ``[10, 10]`` + """ + + _schema = {"$ref": "#/definitions/GraticuleParams"} + + def __init__( + self, + extent: Optional[ + SchemaBase | Sequence[SchemaBase | Sequence[float]] + ] = Undefined, + extentMajor: Optional[ + SchemaBase | Sequence[SchemaBase | Sequence[float]] + ] = Undefined, + extentMinor: Optional[ + SchemaBase | Sequence[SchemaBase | Sequence[float]] + ] = Undefined, + precision: Optional[float] = Undefined, + step: Optional[SchemaBase | Sequence[float]] = Undefined, + stepMajor: Optional[SchemaBase | Sequence[float]] = Undefined, + stepMinor: Optional[SchemaBase | Sequence[float]] = Undefined, + **kwds, + ): + super().__init__( + extent=extent, + extentMajor=extentMajor, + extentMinor=extentMinor, + precision=precision, + step=step, + stepMajor=stepMajor, + stepMinor=stepMinor, + **kwds, + ) + + +class Header(VegaLiteSchema): + """ + Header schema wrapper. + + Headers of row / column channels for faceted plots. + + Parameters + ---------- + format : str, dict, :class:`Dict` + When used with the default ``"number"`` and ``"time"`` format type, the text + formatting pattern for labels of guides (axes, legends, headers) and text marks. + + * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's + `number format pattern `__. + * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time + format pattern `__. + + See the `format documentation `__ + for more examples. + + When used with a `custom formatType + `__, this + value will be passed as ``format`` alongside ``datum.value`` to the registered + function. + + **Default value:** Derived from `numberFormat + `__ config for number + format and from `timeFormat + `__ config for time + format. + formatType : str + The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom + format type + `__. + + **Default value:** + + * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``. + * ``"number"`` for quantitative fields as well as ordinal and nominal fields without + ``timeUnit``. + labelAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right'] + Horizontal text alignment of header labels. One of ``"left"``, ``"center"``, or + ``"right"``. + labelAnchor : :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end'] + The anchor position for placing the labels. One of ``"start"``, ``"middle"``, or + ``"end"``. For example, with a label orientation of top these anchor positions map + to a left-, center-, or right-aligned label. + labelAngle : float + The rotation angle of the header labels. + + **Default value:** ``0`` for column header, ``-90`` for row header. + labelBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + The vertical text baseline for the header labels. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The + ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and + ``"bottom"``, but are calculated relative to the ``titleLineHeight`` rather than + ``titleFontSize`` alone. + labelColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + The color of the header label, can be in hex color code or regular color name. + labelExpr : str + `Vega expression `__ for customizing + labels. + + **Note:** The label text and value can be assessed via the ``label`` and ``value`` + properties of the header's backing ``datum`` object. + labelFont : str, dict, :class:`ExprRef` + The font of the header label. + labelFontSize : dict, float, :class:`ExprRef` + The font size of the header label, in pixels. + labelFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + The font style of the header label. + labelFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + The font weight of the header label. + labelLimit : dict, float, :class:`ExprRef` + The maximum length of the header label in pixels. The text value will be + automatically truncated if the rendered size exceeds the limit. + + **Default value:** ``0``, indicating no limit + labelLineHeight : dict, float, :class:`ExprRef` + Line height in pixels for multi-line header labels or title text with ``"line-top"`` + or ``"line-bottom"`` baseline. + labelOrient : :class:`Orient`, Literal['left', 'right', 'top', 'bottom'] + The orientation of the header label. One of ``"top"``, ``"bottom"``, ``"left"`` or + ``"right"``. + labelPadding : dict, float, :class:`ExprRef` + The padding, in pixel, between facet header's label and the plot. + + **Default value:** ``10`` + labels : bool + A boolean flag indicating if labels should be included as part of the header. + + **Default value:** ``true``. + orient : :class:`Orient`, Literal['left', 'right', 'top', 'bottom'] + Shortcut for setting both labelOrient and titleOrient. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + titleAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right'] + Horizontal text alignment (to the anchor) of header titles. + titleAnchor : :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end'] + 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. + titleAngle : float + The rotation angle of the header title. + + **Default value:** ``0``. + titleBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + The vertical text baseline for the header title. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The + ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and + ``"bottom"``, but are calculated relative to the ``titleLineHeight`` rather than + ``titleFontSize`` alone. + + **Default value:** ``"middle"`` + titleColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + Color of the header title, can be in hex color code or regular color name. + titleFont : str, dict, :class:`ExprRef` + Font of the header title. (e.g., ``"Helvetica Neue"``). + titleFontSize : dict, float, :class:`ExprRef` + Font size of the header title. + titleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + The font style of the header title. + titleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + Font weight of the header title. This can be either a string (e.g ``"bold"``, + ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where + ``"normal"`` = ``400`` and ``"bold"`` = ``700``). + titleLimit : dict, float, :class:`ExprRef` + The maximum length of the header title in pixels. The text value will be + automatically truncated if the rendered size exceeds the limit. + + **Default value:** ``0``, indicating no limit + titleLineHeight : dict, float, :class:`ExprRef` + Line height in pixels for multi-line header title text or title text with + ``"line-top"`` or ``"line-bottom"`` baseline. + titleOrient : :class:`Orient`, Literal['left', 'right', 'top', 'bottom'] + The orientation of the header title. One of ``"top"``, ``"bottom"``, ``"left"`` or + ``"right"``. + titlePadding : dict, float, :class:`ExprRef` + The padding, in pixel, between facet header's title and the label. + + **Default value:** ``10`` + """ + + _schema = {"$ref": "#/definitions/Header"} + + def __init__( + self, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelAnchor: Optional[SchemaBase | TitleAnchor_T] = Undefined, + labelAngle: Optional[float] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOrient: Optional[SchemaBase | Orient_T] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labels: Optional[bool] = Undefined, + orient: Optional[SchemaBase | Orient_T] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[SchemaBase | TitleAnchor_T] = Undefined, + titleAngle: Optional[float] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOrient: Optional[SchemaBase | Orient_T] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + format=format, + formatType=formatType, + labelAlign=labelAlign, + labelAnchor=labelAnchor, + labelAngle=labelAngle, + labelBaseline=labelBaseline, + labelColor=labelColor, + labelExpr=labelExpr, + labelFont=labelFont, + labelFontSize=labelFontSize, + labelFontStyle=labelFontStyle, + labelFontWeight=labelFontWeight, + labelLimit=labelLimit, + labelLineHeight=labelLineHeight, + labelOrient=labelOrient, + labelPadding=labelPadding, + labels=labels, + orient=orient, + title=title, + titleAlign=titleAlign, + titleAnchor=titleAnchor, + titleAngle=titleAngle, + titleBaseline=titleBaseline, + titleColor=titleColor, + titleFont=titleFont, + titleFontSize=titleFontSize, + titleFontStyle=titleFontStyle, + titleFontWeight=titleFontWeight, + titleLimit=titleLimit, + titleLineHeight=titleLineHeight, + titleOrient=titleOrient, + titlePadding=titlePadding, + **kwds, + ) + + +class HeaderConfig(VegaLiteSchema): + """ + HeaderConfig schema wrapper. + + Parameters + ---------- + format : str, dict, :class:`Dict` + When used with the default ``"number"`` and ``"time"`` format type, the text + formatting pattern for labels of guides (axes, legends, headers) and text marks. + + * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's + `number format pattern `__. + * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time + format pattern `__. + + See the `format documentation `__ + for more examples. + + When used with a `custom formatType + `__, this + value will be passed as ``format`` alongside ``datum.value`` to the registered + function. + + **Default value:** Derived from `numberFormat + `__ config for number + format and from `timeFormat + `__ config for time + format. + formatType : str + The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom + format type + `__. + + **Default value:** + + * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``. + * ``"number"`` for quantitative fields as well as ordinal and nominal fields without + ``timeUnit``. + labelAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right'] + Horizontal text alignment of header labels. One of ``"left"``, ``"center"``, or + ``"right"``. + labelAnchor : :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end'] + The anchor position for placing the labels. One of ``"start"``, ``"middle"``, or + ``"end"``. For example, with a label orientation of top these anchor positions map + to a left-, center-, or right-aligned label. + labelAngle : float + The rotation angle of the header labels. + + **Default value:** ``0`` for column header, ``-90`` for row header. + labelBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + The vertical text baseline for the header labels. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The + ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and + ``"bottom"``, but are calculated relative to the ``titleLineHeight`` rather than + ``titleFontSize`` alone. + labelColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + The color of the header label, can be in hex color code or regular color name. + labelExpr : str + `Vega expression `__ for customizing + labels. + + **Note:** The label text and value can be assessed via the ``label`` and ``value`` + properties of the header's backing ``datum`` object. + labelFont : str, dict, :class:`ExprRef` + The font of the header label. + labelFontSize : dict, float, :class:`ExprRef` + The font size of the header label, in pixels. + labelFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + The font style of the header label. + labelFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + The font weight of the header label. + labelLimit : dict, float, :class:`ExprRef` + The maximum length of the header label in pixels. The text value will be + automatically truncated if the rendered size exceeds the limit. + + **Default value:** ``0``, indicating no limit + labelLineHeight : dict, float, :class:`ExprRef` + Line height in pixels for multi-line header labels or title text with ``"line-top"`` + or ``"line-bottom"`` baseline. + labelOrient : :class:`Orient`, Literal['left', 'right', 'top', 'bottom'] + The orientation of the header label. One of ``"top"``, ``"bottom"``, ``"left"`` or + ``"right"``. + labelPadding : dict, float, :class:`ExprRef` + The padding, in pixel, between facet header's label and the plot. + + **Default value:** ``10`` + labels : bool + A boolean flag indicating if labels should be included as part of the header. + + **Default value:** ``true``. + orient : :class:`Orient`, Literal['left', 'right', 'top', 'bottom'] + Shortcut for setting both labelOrient and titleOrient. + title : None + Set to null to disable title for the axis, legend, or header. + titleAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right'] + Horizontal text alignment (to the anchor) of header titles. + titleAnchor : :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end'] + 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. + titleAngle : float + The rotation angle of the header title. + + **Default value:** ``0``. + titleBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + The vertical text baseline for the header title. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The + ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and + ``"bottom"``, but are calculated relative to the ``titleLineHeight`` rather than + ``titleFontSize`` alone. + + **Default value:** ``"middle"`` + titleColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + Color of the header title, can be in hex color code or regular color name. + titleFont : str, dict, :class:`ExprRef` + Font of the header title. (e.g., ``"Helvetica Neue"``). + titleFontSize : dict, float, :class:`ExprRef` + Font size of the header title. + titleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + The font style of the header title. + titleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + Font weight of the header title. This can be either a string (e.g ``"bold"``, + ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where + ``"normal"`` = ``400`` and ``"bold"`` = ``700``). + titleLimit : dict, float, :class:`ExprRef` + The maximum length of the header title in pixels. The text value will be + automatically truncated if the rendered size exceeds the limit. + + **Default value:** ``0``, indicating no limit + titleLineHeight : dict, float, :class:`ExprRef` + Line height in pixels for multi-line header title text or title text with + ``"line-top"`` or ``"line-bottom"`` baseline. + titleOrient : :class:`Orient`, Literal['left', 'right', 'top', 'bottom'] + The orientation of the header title. One of ``"top"``, ``"bottom"``, ``"left"`` or + ``"right"``. + titlePadding : dict, float, :class:`ExprRef` + The padding, in pixel, between facet header's title and the label. + + **Default value:** ``10`` + """ + + _schema = {"$ref": "#/definitions/HeaderConfig"} + + def __init__( + self, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelAnchor: Optional[SchemaBase | TitleAnchor_T] = Undefined, + labelAngle: Optional[float] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOrient: Optional[SchemaBase | Orient_T] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labels: Optional[bool] = Undefined, + orient: Optional[SchemaBase | Orient_T] = Undefined, + title: Optional[None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[SchemaBase | TitleAnchor_T] = Undefined, + titleAngle: Optional[float] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOrient: Optional[SchemaBase | Orient_T] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + format=format, + formatType=formatType, + labelAlign=labelAlign, + labelAnchor=labelAnchor, + labelAngle=labelAngle, + labelBaseline=labelBaseline, + labelColor=labelColor, + labelExpr=labelExpr, + labelFont=labelFont, + labelFontSize=labelFontSize, + labelFontStyle=labelFontStyle, + labelFontWeight=labelFontWeight, + labelLimit=labelLimit, + labelLineHeight=labelLineHeight, + labelOrient=labelOrient, + labelPadding=labelPadding, + labels=labels, + orient=orient, + title=title, + titleAlign=titleAlign, + titleAnchor=titleAnchor, + titleAngle=titleAngle, + titleBaseline=titleBaseline, + titleColor=titleColor, + titleFont=titleFont, + titleFontSize=titleFontSize, + titleFontStyle=titleFontStyle, + titleFontWeight=titleFontWeight, + titleLimit=titleLimit, + titleLineHeight=titleLineHeight, + titleOrient=titleOrient, + titlePadding=titlePadding, + **kwds, + ) + + +class HexColor(Color): + """HexColor schema wrapper.""" + + _schema = {"$ref": "#/definitions/HexColor"} + + def __init__(self, *args): + super().__init__(*args) + + +class ImputeMethod(VegaLiteSchema): + """ImputeMethod schema wrapper.""" + + _schema = {"$ref": "#/definitions/ImputeMethod"} + + def __init__(self, *args): + super().__init__(*args) + + +class ImputeParams(VegaLiteSchema): + """ + ImputeParams schema wrapper. + + Parameters + ---------- + frame : Sequence[float, None] + A frame specification as a two-element array used to control the window over which + the specified method is applied. The array entries should either be a number + indicating the offset from the current data object, or null to indicate unbounded + rows preceding or following the current data object. For example, the value ``[-5, + 5]`` indicates that the window should include five objects preceding and five + objects following the current object. + + **Default value:**: ``[null, null]`` indicating that the window includes all + objects. + keyvals : dict, Sequence[Any], :class:`ImputeSequence` + Defines the key values that should be considered for imputation. An array of key + values or an object defining a `number sequence + `__. + + If provided, this will be used in addition to the key values observed within the + input data. If not provided, the values will be derived from all unique values of + the ``key`` field. For ``impute`` in ``encoding``, the key field is the x-field if + the y-field is imputed, or vice versa. + + If there is no impute grouping, this property *must* be specified. + method : :class:`ImputeMethod`, Literal['value', 'median', 'max', 'min', 'mean'] + The imputation method to use for the field value of imputed data objects. One of + ``"value"``, ``"mean"``, ``"median"``, ``"max"`` or ``"min"``. + + **Default value:** ``"value"`` + value : Any + The field value to use when the imputation ``method`` is ``"value"``. + """ + + _schema = {"$ref": "#/definitions/ImputeParams"} + + def __init__( + self, + frame: Optional[Sequence[float | None]] = Undefined, + keyvals: Optional[SchemaBase | Sequence[Any] | Map] = Undefined, + method: Optional[SchemaBase | ImputeMethod_T] = Undefined, + value: Optional[Any] = Undefined, + **kwds, + ): + super().__init__( + frame=frame, keyvals=keyvals, method=method, value=value, **kwds + ) + + +class ImputeSequence(VegaLiteSchema): + """ + ImputeSequence schema wrapper. + + Parameters + ---------- + stop : float + The ending value(exclusive) of the sequence. + start : float + The starting value of the sequence. **Default value:** ``0`` + step : float + The step value between sequence entries. **Default value:** ``1`` or ``-1`` if + ``stop < start`` + """ + + _schema = {"$ref": "#/definitions/ImputeSequence"} + + def __init__( + self, + stop: Optional[float] = Undefined, + start: Optional[float] = Undefined, + step: Optional[float] = Undefined, + **kwds, + ): + super().__init__(stop=stop, start=start, step=step, **kwds) + + +class InlineData(DataSource): + """ + InlineData schema wrapper. + + Parameters + ---------- + values : str, dict, Sequence[str], Sequence[bool], Sequence[dict], Sequence[float], :class:`InlineDataset` + The full data set, included inline. This can be an array of objects or primitive + 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 : dict, :class:`DataFormat`, :class:`CsvDataFormat`, :class:`DsvDataFormat`, :class:`JsonDataFormat`, :class:`TopoDataFormat` + An object that specifies the format for parsing the data. + name : str + Provide a placeholder name and bind data at runtime. + """ + + _schema = {"$ref": "#/definitions/InlineData"} + + def __init__( + self, + values: Optional[ + str + | SchemaBase + | Sequence[Map] + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Map + ] = Undefined, + format: Optional[SchemaBase | Map] = Undefined, + name: Optional[str] = Undefined, + **kwds, + ): + super().__init__(values=values, format=format, name=name, **kwds) + + +class InlineDataset(VegaLiteSchema): + """InlineDataset schema wrapper.""" + + _schema = {"$ref": "#/definitions/InlineDataset"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class Interpolate(VegaLiteSchema): + """Interpolate schema wrapper.""" + + _schema = {"$ref": "#/definitions/Interpolate"} + + def __init__(self, *args): + super().__init__(*args) + + +class IntervalSelectionConfig(VegaLiteSchema): + """ + IntervalSelectionConfig schema wrapper. + + Parameters + ---------- + type : Literal['interval'] + Determines the default event processing and data query for the selection. Vega-Lite + currently supports two selection types: + + * ``"point"`` -- to select multiple discrete data values; the first value is + selected on ``click`` and additional values toggled on shift-click. + * ``"interval"`` -- to select a continuous range of data values on ``drag``. + clear : str, bool, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream` + Clears the selection, emptying it of all values. This property can be a `Event + Stream `__ or ``false`` to disable + clear. + + **Default value:** ``dblclick``. + + **See also:** `clear examples + `__ in the + documentation. + encodings : Sequence[:class:`SingleDefUnitChannel`, Literal['x', 'y', 'xOffset', 'yOffset', 'x2', 'y2', 'longitude', 'latitude', 'longitude2', 'latitude2', 'theta', 'theta2', 'radius', 'radius2', 'color', 'fill', 'stroke', 'opacity', 'fillOpacity', 'strokeOpacity', 'strokeWidth', 'strokeDash', 'size', 'angle', 'shape', 'key', 'text', 'href', 'url', 'description']] + An array of encoding channels. The corresponding data field values must match for a + data tuple to fall within the selection. + + **See also:** The `projection with encodings and fields section + `__ in the + documentation. + fields : Sequence[str, :class:`FieldName`] + An array of field names whose values must match for a data tuple to fall within the + selection. + + **See also:** The `projection with encodings and fields section + `__ in the + documentation. + mark : dict, :class:`BrushConfig` + An interval selection also adds a rectangle mark to depict the extents of the + interval. The ``mark`` property can be used to customize the appearance of the mark. + + **See also:** `mark examples + `__ in the documentation. + on : str, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream` + A `Vega event stream `__ (object or + selector) that triggers the selection. For interval selections, the event stream + must specify a `start and end + `__. + + **See also:** `on examples + `__ in the documentation. + resolve : :class:`SelectionResolution`, Literal['global', 'union', 'intersect'] + With layered and multi-view displays, a strategy that determines how selections' + data queries are resolved when applied in a filter transform, conditional encoding + rule, or scale domain. + + One of: + + * ``"global"`` -- only one brush exists for the entire SPLOM. When the user begins + to drag, any previous brushes are cleared, and a new one is constructed. + * ``"union"`` -- each cell contains its own brush, and points are highlighted if + they lie within *any* of these individual brushes. + * ``"intersect"`` -- each cell contains its own brush, and points are highlighted + only if they fall within *all* of these individual brushes. + + **Default value:** ``global``. + + **See also:** `resolve examples + `__ in the + documentation. + translate : str, bool + When truthy, allows a user to interactively move an interval selection + back-and-forth. Can be ``true``, ``false`` (to disable panning), or a `Vega event + stream definition `__ which must + include a start and end event to trigger continuous panning. Discrete panning (e.g., + pressing the left/right arrow keys) will be supported in future versions. + + **Default value:** ``true``, which corresponds to ``[pointerdown, window:pointerup] + > window:pointermove!``. This default allows users to clicks and drags within an + interval selection to reposition it. + + **See also:** `translate examples + `__ in the + documentation. + zoom : str, bool + When truthy, allows a user to interactively resize an interval selection. Can be + ``true``, ``false`` (to disable zooming), or a `Vega event stream definition + `__. Currently, only ``wheel`` + events are supported, but custom event streams can still be used to specify filters, + debouncing, and throttling. Future versions will expand the set of events that can + trigger this transformation. + + **Default value:** ``true``, which corresponds to ``wheel!``. This default allows + users to use the mouse wheel to resize an interval selection. + + **See also:** `zoom examples + `__ in the documentation. + """ + + _schema = {"$ref": "#/definitions/IntervalSelectionConfig"} + + def __init__( + self, + type: Optional[Literal["interval"]] = Undefined, + clear: Optional[str | bool | SchemaBase | Map] = Undefined, + encodings: Optional[Sequence[SchemaBase | SingleDefUnitChannel_T]] = Undefined, + fields: Optional[Sequence[str | SchemaBase]] = Undefined, + mark: Optional[SchemaBase | Map] = Undefined, + on: Optional[str | SchemaBase | Map] = Undefined, + resolve: Optional[SchemaBase | SelectionResolution_T] = Undefined, + translate: Optional[str | bool] = Undefined, + zoom: Optional[str | bool] = Undefined, + **kwds, + ): + super().__init__( + type=type, + clear=clear, + encodings=encodings, + fields=fields, + mark=mark, + on=on, + resolve=resolve, + translate=translate, + zoom=zoom, + **kwds, + ) + + +class IntervalSelectionConfigWithoutType(VegaLiteSchema): + """ + IntervalSelectionConfigWithoutType schema wrapper. + + Parameters + ---------- + clear : str, bool, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream` + Clears the selection, emptying it of all values. This property can be a `Event + Stream `__ or ``false`` to disable + clear. + + **Default value:** ``dblclick``. + + **See also:** `clear examples + `__ in the + documentation. + encodings : Sequence[:class:`SingleDefUnitChannel`, Literal['x', 'y', 'xOffset', 'yOffset', 'x2', 'y2', 'longitude', 'latitude', 'longitude2', 'latitude2', 'theta', 'theta2', 'radius', 'radius2', 'color', 'fill', 'stroke', 'opacity', 'fillOpacity', 'strokeOpacity', 'strokeWidth', 'strokeDash', 'size', 'angle', 'shape', 'key', 'text', 'href', 'url', 'description']] + An array of encoding channels. The corresponding data field values must match for a + data tuple to fall within the selection. + + **See also:** The `projection with encodings and fields section + `__ in the + documentation. + fields : Sequence[str, :class:`FieldName`] + An array of field names whose values must match for a data tuple to fall within the + selection. + + **See also:** The `projection with encodings and fields section + `__ in the + documentation. + mark : dict, :class:`BrushConfig` + An interval selection also adds a rectangle mark to depict the extents of the + interval. The ``mark`` property can be used to customize the appearance of the mark. + + **See also:** `mark examples + `__ in the documentation. + on : str, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream` + A `Vega event stream `__ (object or + selector) that triggers the selection. For interval selections, the event stream + must specify a `start and end + `__. + + **See also:** `on examples + `__ in the documentation. + resolve : :class:`SelectionResolution`, Literal['global', 'union', 'intersect'] + With layered and multi-view displays, a strategy that determines how selections' + data queries are resolved when applied in a filter transform, conditional encoding + rule, or scale domain. + + One of: + + * ``"global"`` -- only one brush exists for the entire SPLOM. When the user begins + to drag, any previous brushes are cleared, and a new one is constructed. + * ``"union"`` -- each cell contains its own brush, and points are highlighted if + they lie within *any* of these individual brushes. + * ``"intersect"`` -- each cell contains its own brush, and points are highlighted + only if they fall within *all* of these individual brushes. + + **Default value:** ``global``. + + **See also:** `resolve examples + `__ in the + documentation. + translate : str, bool + When truthy, allows a user to interactively move an interval selection + back-and-forth. Can be ``true``, ``false`` (to disable panning), or a `Vega event + stream definition `__ which must + include a start and end event to trigger continuous panning. Discrete panning (e.g., + pressing the left/right arrow keys) will be supported in future versions. + + **Default value:** ``true``, which corresponds to ``[pointerdown, window:pointerup] + > window:pointermove!``. This default allows users to clicks and drags within an + interval selection to reposition it. + + **See also:** `translate examples + `__ in the + documentation. + zoom : str, bool + When truthy, allows a user to interactively resize an interval selection. Can be + ``true``, ``false`` (to disable zooming), or a `Vega event stream definition + `__. Currently, only ``wheel`` + events are supported, but custom event streams can still be used to specify filters, + debouncing, and throttling. Future versions will expand the set of events that can + trigger this transformation. + + **Default value:** ``true``, which corresponds to ``wheel!``. This default allows + users to use the mouse wheel to resize an interval selection. + + **See also:** `zoom examples + `__ in the documentation. + """ + + _schema = {"$ref": "#/definitions/IntervalSelectionConfigWithoutType"} + + def __init__( + self, + clear: Optional[str | bool | SchemaBase | Map] = Undefined, + encodings: Optional[Sequence[SchemaBase | SingleDefUnitChannel_T]] = Undefined, + fields: Optional[Sequence[str | SchemaBase]] = Undefined, + mark: Optional[SchemaBase | Map] = Undefined, + on: Optional[str | SchemaBase | Map] = Undefined, + resolve: Optional[SchemaBase | SelectionResolution_T] = Undefined, + translate: Optional[str | bool] = Undefined, + zoom: Optional[str | bool] = Undefined, + **kwds, + ): + super().__init__( + clear=clear, + encodings=encodings, + fields=fields, + mark=mark, + on=on, + resolve=resolve, + translate=translate, + zoom=zoom, + **kwds, + ) + + +class JoinAggregateFieldDef(VegaLiteSchema): + """ + JoinAggregateFieldDef schema wrapper. + + Parameters + ---------- + op : :class:`AggregateOp`, Literal['argmax', 'argmin', 'average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + The aggregation operation to apply (e.g., ``"sum"``, ``"average"`` or ``"count"``). + See the list of all supported operations `here + `__. + field : str, :class:`FieldName` + The data field for which to compute the aggregate function. This can be omitted for + functions that do not operate over a field such as ``"count"``. + as : str, :class:`FieldName` + The output name for the join aggregate operation. + """ + + _schema = {"$ref": "#/definitions/JoinAggregateFieldDef"} + + def __init__( + self, + op: Optional[SchemaBase | AggregateOp_T] = Undefined, + field: Optional[str | SchemaBase] = Undefined, + **kwds, + ): + super().__init__(op=op, field=field, **kwds) + + +class JsonDataFormat(DataFormat): + """ + JsonDataFormat schema wrapper. + + Parameters + ---------- + parse : dict, :class:`Parse`, None + 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 : str + 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 : Literal['json'] + Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``. + + **Default value:** 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"} + + def __init__( + self, + parse: Optional[SchemaBase | Map | None] = Undefined, + property: Optional[str] = Undefined, + type: Optional[Literal["json"]] = Undefined, + **kwds, + ): + super().__init__(parse=parse, property=property, type=type, **kwds) + + +class LabelOverlap(VegaLiteSchema): + """LabelOverlap schema wrapper.""" + + _schema = {"$ref": "#/definitions/LabelOverlap"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class LatLongDef(VegaLiteSchema): + """LatLongDef schema wrapper.""" + + _schema = {"$ref": "#/definitions/LatLongDef"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class LatLongFieldDef(LatLongDef): + r""" + LatLongFieldDef schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : Literal['quantitative'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/LatLongFieldDef"} + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[Literal["quantitative"]] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +class LayerRepeatMapping(VegaLiteSchema): + """ + LayerRepeatMapping schema wrapper. + + Parameters + ---------- + layer : Sequence[str] + An array of fields to be repeated as layers. + column : Sequence[str] + An array of fields to be repeated horizontally. + row : Sequence[str] + An array of fields to be repeated vertically. + """ + + _schema = {"$ref": "#/definitions/LayerRepeatMapping"} + + def __init__( + self, + layer: Optional[Sequence[str]] = Undefined, + column: Optional[Sequence[str]] = Undefined, + row: Optional[Sequence[str]] = Undefined, + **kwds, + ): + super().__init__(layer=layer, column=column, row=row, **kwds) + + +class LayoutAlign(VegaLiteSchema): + """LayoutAlign schema wrapper.""" + + _schema = {"$ref": "#/definitions/LayoutAlign"} + + def __init__(self, *args): + super().__init__(*args) + + +class Legend(VegaLiteSchema): + """ + Legend schema wrapper. + + Properties of a legend or boolean flag for determining whether to show it. + + Parameters + ---------- + aria : bool, dict, :class:`ExprRef` + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG group, removing the legend from the ARIA accessibility tree. + + **Default value:** ``true`` + clipHeight : dict, float, :class:`ExprRef` + The height in pixels to clip symbol legend entries and limit their size. + columnPadding : dict, float, :class:`ExprRef` + The horizontal padding in pixels between symbol legend entries. + + **Default value:** ``10``. + columns : dict, float, :class:`ExprRef` + The number of columns in which to arrange symbol legend entries. A value of ``0`` or + lower indicates a single row with one column per entry. + cornerRadius : dict, float, :class:`ExprRef` + Corner radius for the full legend. + description : str, dict, :class:`ExprRef` + A text description of this legend for `ARIA accessibility + `__ (SVG output + only). If the ``aria`` property is true, for SVG output the `"aria-label" attribute + `__ + will be set to this description. If the description is unspecified it will be + automatically generated. + direction : :class:`Orientation`, Literal['horizontal', 'vertical'] + The direction of the legend, one of ``"vertical"`` or ``"horizontal"``. + + **Default value:** + + * For top-/bottom-``orient``ed legends, ``"horizontal"`` + * For left-/right-``orient``ed legends, ``"vertical"`` + * For top/bottom-left/right-``orient``ed legends, ``"horizontal"`` for gradient + legends and ``"vertical"`` for symbol legends. + fillColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Background fill color for the full legend. + format : str, dict, :class:`Dict` + When used with the default ``"number"`` and ``"time"`` format type, the text + formatting pattern for labels of guides (axes, legends, headers) and text marks. + + * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's + `number format pattern `__. + * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time + format pattern `__. + + See the `format documentation `__ + for more examples. + + When used with a `custom formatType + `__, this + value will be passed as ``format`` alongside ``datum.value`` to the registered + function. + + **Default value:** Derived from `numberFormat + `__ config for number + format and from `timeFormat + `__ config for time + format. + formatType : str + The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom + format type + `__. + + **Default value:** + + * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``. + * ``"number"`` for quantitative fields as well as ordinal and nominal fields without + ``timeUnit``. + gradientLength : dict, float, :class:`ExprRef` + The length in pixels of the primary axis of a color gradient. This value corresponds + to the height of a vertical gradient or the width of a horizontal gradient. + + **Default value:** ``200``. + gradientOpacity : dict, float, :class:`ExprRef` + Opacity of the color gradient. + gradientStrokeColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + The color of the gradient stroke, can be in hex color code or regular color name. + + **Default value:** ``"lightGray"``. + gradientStrokeWidth : dict, float, :class:`ExprRef` + The width of the gradient stroke, in pixels. + + **Default value:** ``0``. + gradientThickness : dict, float, :class:`ExprRef` + The thickness in pixels of the color gradient. This value corresponds to the width + of a vertical gradient or the height of a horizontal gradient. + + **Default value:** ``16``. + gridAlign : dict, :class:`ExprRef`, :class:`LayoutAlign`, Literal['all', 'each', 'none'] + The alignment to apply to symbol legends rows and columns. The supported string + values are ``"all"``, ``"each"`` (the default), and ``none``. For more information, + see the `grid layout documentation `__. + + **Default value:** ``"each"``. + labelAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right'] + The alignment of the legend label, can be left, center, or right. + labelBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + The position of the baseline of legend label, can be ``"top"``, ``"middle"``, + ``"bottom"``, or ``"alphabetic"``. + + **Default value:** ``"middle"``. + labelColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + The color of the legend label, can be in hex color code or regular color name. + labelExpr : str + `Vega expression `__ for customizing + labels. + + **Note:** The label text and value can be assessed via the ``label`` and ``value`` + properties of the legend's backing ``datum`` object. + labelFont : str, dict, :class:`ExprRef` + The font of the legend label. + labelFontSize : dict, float, :class:`ExprRef` + The font size of legend label. + + **Default value:** ``10``. + labelFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + The font style of legend label. + labelFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + The font weight of legend label. + labelLimit : dict, float, :class:`ExprRef` + Maximum allowed pixel width of legend tick labels. + + **Default value:** ``160``. + labelOffset : dict, float, :class:`ExprRef` + The offset of the legend label. + + **Default value:** ``4``. + labelOpacity : dict, float, :class:`ExprRef` + Opacity of labels. + labelOverlap : bool, dict, :class:`ExprRef`, :class:`LabelOverlap`, Literal['greedy', 'parity'] + The strategy to use for resolving overlap of labels in gradient legends. If + ``false``, no overlap reduction is attempted. If set to ``true`` (default) or + ``"parity"``, a strategy of removing every other label is used. If set to + ``"greedy"``, a linear scan of the labels is performed, removing any label that + overlaps with the last visible label (this often works better for log-scaled axes). + + **Default value:** ``true``. + labelPadding : dict, float, :class:`ExprRef` + Padding in pixels between the legend and legend labels. + labelSeparation : dict, float, :class:`ExprRef` + The minimum separation that must be between label bounding boxes for them to be + considered non-overlapping (default ``0``). This property is ignored if + *labelOverlap* resolution is not enabled. + legendX : dict, float, :class:`ExprRef` + Custom x-position for legend with orient "none". + legendY : dict, float, :class:`ExprRef` + Custom y-position for legend with orient "none". + offset : dict, float, :class:`ExprRef` + The offset in pixels by which to displace the legend from the data rectangle and + axes. + + **Default value:** ``18``. + orient : :class:`LegendOrient`, Literal['none', 'left', 'right', 'top', 'bottom', 'top-left', 'top-right', 'bottom-left', 'bottom-right'] + The orientation of the legend, which determines how the legend is positioned within + the scene. One of ``"left"``, ``"right"``, ``"top"``, ``"bottom"``, ``"top-left"``, + ``"top-right"``, ``"bottom-left"``, ``"bottom-right"``, ``"none"``. + + **Default value:** ``"right"`` + padding : dict, float, :class:`ExprRef` + The padding between the border and content of the legend group. + + **Default value:** ``0``. + rowPadding : dict, float, :class:`ExprRef` + The vertical padding in pixels between symbol legend entries. + + **Default value:** ``2``. + strokeColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Border stroke color for the full legend. + symbolDash : dict, Sequence[float], :class:`ExprRef` + An array of alternating [stroke, space] lengths for dashed symbol strokes. + symbolDashOffset : dict, float, :class:`ExprRef` + The pixel offset at which to start drawing with the symbol stroke dash array. + symbolFillColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + The color of the legend symbol, + symbolLimit : dict, float, :class:`ExprRef` + The maximum number of allowed entries for a symbol legend. Additional entries will + be dropped. + symbolOffset : dict, float, :class:`ExprRef` + Horizontal pixel offset for legend symbols. + + **Default value:** ``0``. + symbolOpacity : dict, float, :class:`ExprRef` + Opacity of the legend symbols. + symbolSize : dict, float, :class:`ExprRef` + The size of the legend symbol, in pixels. + + **Default value:** ``100``. + symbolStrokeColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Stroke color for legend symbols. + symbolStrokeWidth : dict, float, :class:`ExprRef` + The width of the symbol's stroke. + + **Default value:** ``1.5``. + symbolType : str, dict, :class:`ExprRef`, :class:`SymbolShape` + The symbol shape. One of the plotting shapes ``circle`` (default), ``square``, + ``cross``, ``diamond``, ``triangle-up``, ``triangle-down``, ``triangle-right``, or + ``triangle-left``, the line symbol ``stroke``, or one of the centered directional + shapes ``arrow``, ``wedge``, or ``triangle``. Alternatively, a custom `SVG path + string `__ can be + provided. For correct sizing, custom shape paths should be defined within a square + bounding box with coordinates ranging from -1 to 1 along both the x and y + dimensions. + + **Default value:** ``"circle"``. + tickCount : dict, float, :class:`ExprRef`, :class:`TickCount`, :class:`TimeInterval`, :class:`TimeIntervalStep`, Literal['millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'year'] + The desired number of tick values for quantitative legends. + tickMinStep : dict, float, :class:`ExprRef` + The minimum desired step between legend ticks, in terms of scale domain values. For + example, a value of ``1`` indicates that ticks should not be less than 1 unit apart. + If ``tickMinStep`` is specified, the ``tickCount`` value will be adjusted, if + necessary, to enforce the minimum step value. + + **Default value**: ``undefined`` + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + titleAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right'] + Horizontal text alignment for legend titles. + + **Default value:** ``"left"``. + titleAnchor : dict, :class:`ExprRef`, :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end'] + Text anchor position for placing legend titles. + titleBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + Vertical text baseline for legend titles. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The + ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and + ``"bottom"``, but are calculated relative to the *lineHeight* rather than *fontSize* + alone. + + **Default value:** ``"top"``. + titleColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + The color of the legend title, can be in hex color code or regular color name. + titleFont : str, dict, :class:`ExprRef` + The font of the legend title. + titleFontSize : dict, float, :class:`ExprRef` + The font size of the legend title. + titleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + The font style of the legend title. + titleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + The font weight of the legend title. This can be either a string (e.g ``"bold"``, + ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where + ``"normal"`` = ``400`` and ``"bold"`` = ``700``). + titleLimit : dict, float, :class:`ExprRef` + Maximum allowed pixel width of legend titles. + + **Default value:** ``180``. + titleLineHeight : dict, float, :class:`ExprRef` + Line height in pixels for multi-line title text or title text with ``"line-top"`` or + ``"line-bottom"`` baseline. + titleOpacity : dict, float, :class:`ExprRef` + Opacity of the legend title. + titleOrient : dict, :class:`Orient`, :class:`ExprRef`, Literal['left', 'right', 'top', 'bottom'] + Orientation of the legend title. + titlePadding : dict, float, :class:`ExprRef` + The padding, in pixels, between title and legend. + + **Default value:** ``5``. + type : Literal['symbol', 'gradient'] + The type of the legend. Use ``"symbol"`` to create a discrete legend and + ``"gradient"`` for a continuous color gradient. + + **Default value:** ``"gradient"`` for non-binned quantitative fields and temporal + fields; ``"symbol"`` otherwise. + values : dict, Sequence[str], Sequence[bool], Sequence[float], :class:`ExprRef`, Sequence[dict, :class:`DateTime`] + Explicitly set the visible legend values. + zindex : float + A non-negative integer indicating the z-index of the legend. If zindex is 0, legend + should be drawn behind all chart elements. To put them in front, use zindex = 1. + """ + + _schema = {"$ref": "#/definitions/Legend"} + + def __init__( + self, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columns: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + direction: Optional[SchemaBase | Orientation_T] = Undefined, + fillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + labelExpr: Optional[str] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOverlap: Optional[ + bool | Parameter | SchemaBase | Literal["greedy", "parity"] | Map + ] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[SchemaBase | LegendOrient_T] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolFillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined, + tickCount: Optional[ + float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + type: Optional[Literal["symbol", "gradient"]] = Undefined, + values: Optional[ + Parameter + | SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + ] = Undefined, + zindex: Optional[float] = Undefined, + **kwds, + ): + super().__init__( + aria=aria, + clipHeight=clipHeight, + columnPadding=columnPadding, + columns=columns, + cornerRadius=cornerRadius, + description=description, + direction=direction, + fillColor=fillColor, + format=format, + formatType=formatType, + gradientLength=gradientLength, + gradientOpacity=gradientOpacity, + gradientStrokeColor=gradientStrokeColor, + gradientStrokeWidth=gradientStrokeWidth, + gradientThickness=gradientThickness, + gridAlign=gridAlign, + labelAlign=labelAlign, + labelBaseline=labelBaseline, + labelColor=labelColor, + labelExpr=labelExpr, + labelFont=labelFont, + labelFontSize=labelFontSize, + labelFontStyle=labelFontStyle, + labelFontWeight=labelFontWeight, + labelLimit=labelLimit, + labelOffset=labelOffset, + labelOpacity=labelOpacity, + labelOverlap=labelOverlap, + labelPadding=labelPadding, + labelSeparation=labelSeparation, + legendX=legendX, + legendY=legendY, + offset=offset, + orient=orient, + padding=padding, + rowPadding=rowPadding, + strokeColor=strokeColor, + symbolDash=symbolDash, + symbolDashOffset=symbolDashOffset, + symbolFillColor=symbolFillColor, + symbolLimit=symbolLimit, + symbolOffset=symbolOffset, + symbolOpacity=symbolOpacity, + symbolSize=symbolSize, + symbolStrokeColor=symbolStrokeColor, + symbolStrokeWidth=symbolStrokeWidth, + symbolType=symbolType, + tickCount=tickCount, + tickMinStep=tickMinStep, + title=title, + titleAlign=titleAlign, + titleAnchor=titleAnchor, + titleBaseline=titleBaseline, + titleColor=titleColor, + titleFont=titleFont, + titleFontSize=titleFontSize, + titleFontStyle=titleFontStyle, + titleFontWeight=titleFontWeight, + titleLimit=titleLimit, + titleLineHeight=titleLineHeight, + titleOpacity=titleOpacity, + titleOrient=titleOrient, + titlePadding=titlePadding, + type=type, + values=values, + zindex=zindex, + **kwds, + ) + + +class LegendBinding(VegaLiteSchema): + """LegendBinding schema wrapper.""" + + _schema = {"$ref": "#/definitions/LegendBinding"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class LegendConfig(VegaLiteSchema): + """ + LegendConfig schema wrapper. + + Parameters + ---------- + aria : bool, dict, :class:`ExprRef` + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG group, removing the legend from the ARIA accessibility tree. + + **Default value:** ``true`` + clipHeight : dict, float, :class:`ExprRef` + The height in pixels to clip symbol legend entries and limit their size. + columnPadding : dict, float, :class:`ExprRef` + The horizontal padding in pixels between symbol legend entries. + + **Default value:** ``10``. + columns : dict, float, :class:`ExprRef` + The number of columns in which to arrange symbol legend entries. A value of ``0`` or + lower indicates a single row with one column per entry. + cornerRadius : dict, float, :class:`ExprRef` + Corner radius for the full legend. + description : str, dict, :class:`ExprRef` + A text description of this legend for `ARIA accessibility + `__ (SVG output + only). If the ``aria`` property is true, for SVG output the `"aria-label" attribute + `__ + will be set to this description. If the description is unspecified it will be + automatically generated. + direction : :class:`Orientation`, Literal['horizontal', 'vertical'] + The direction of the legend, one of ``"vertical"`` or ``"horizontal"``. + + **Default value:** + + * For top-/bottom-``orient``ed legends, ``"horizontal"`` + * For left-/right-``orient``ed legends, ``"vertical"`` + * For top/bottom-left/right-``orient``ed legends, ``"horizontal"`` for gradient + legends and ``"vertical"`` for symbol legends. + disable : bool + Disable legend by default + fillColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Background fill color for the full legend. + gradientDirection : dict, :class:`ExprRef`, :class:`Orientation`, Literal['horizontal', 'vertical'] + The default direction (``"horizontal"`` or ``"vertical"``) for gradient legends. + + **Default value:** ``"vertical"``. + gradientHorizontalMaxLength : float + Max legend length for a horizontal gradient when ``config.legend.gradientLength`` is + undefined. + + **Default value:** ``200`` + gradientHorizontalMinLength : float + Min legend length for a horizontal gradient when ``config.legend.gradientLength`` is + undefined. + + **Default value:** ``100`` + gradientLabelLimit : dict, float, :class:`ExprRef` + The maximum allowed length in pixels of color ramp gradient labels. + gradientLabelOffset : dict, float, :class:`ExprRef` + Vertical offset in pixels for color ramp gradient labels. + + **Default value:** ``2``. + gradientLength : dict, float, :class:`ExprRef` + The length in pixels of the primary axis of a color gradient. This value corresponds + to the height of a vertical gradient or the width of a horizontal gradient. + + **Default value:** ``200``. + gradientOpacity : dict, float, :class:`ExprRef` + Opacity of the color gradient. + gradientStrokeColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + The color of the gradient stroke, can be in hex color code or regular color name. + + **Default value:** ``"lightGray"``. + gradientStrokeWidth : dict, float, :class:`ExprRef` + The width of the gradient stroke, in pixels. + + **Default value:** ``0``. + gradientThickness : dict, float, :class:`ExprRef` + The thickness in pixels of the color gradient. This value corresponds to the width + of a vertical gradient or the height of a horizontal gradient. + + **Default value:** ``16``. + gradientVerticalMaxLength : float + Max legend length for a vertical gradient when ``config.legend.gradientLength`` is + undefined. + + **Default value:** ``200`` + gradientVerticalMinLength : float + Min legend length for a vertical gradient when ``config.legend.gradientLength`` is + undefined. + + **Default value:** ``100`` + gridAlign : dict, :class:`ExprRef`, :class:`LayoutAlign`, Literal['all', 'each', 'none'] + The alignment to apply to symbol legends rows and columns. The supported string + values are ``"all"``, ``"each"`` (the default), and ``none``. For more information, + see the `grid layout documentation `__. + + **Default value:** ``"each"``. + labelAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right'] + The alignment of the legend label, can be left, center, or right. + labelBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + The position of the baseline of legend label, can be ``"top"``, ``"middle"``, + ``"bottom"``, or ``"alphabetic"``. + + **Default value:** ``"middle"``. + labelColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + The color of the legend label, can be in hex color code or regular color name. + labelFont : str, dict, :class:`ExprRef` + The font of the legend label. + labelFontSize : dict, float, :class:`ExprRef` + The font size of legend label. + + **Default value:** ``10``. + labelFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + The font style of legend label. + labelFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + The font weight of legend label. + labelLimit : dict, float, :class:`ExprRef` + Maximum allowed pixel width of legend tick labels. + + **Default value:** ``160``. + labelOffset : dict, float, :class:`ExprRef` + The offset of the legend label. + + **Default value:** ``4``. + labelOpacity : dict, float, :class:`ExprRef` + Opacity of labels. + labelOverlap : bool, dict, :class:`ExprRef`, :class:`LabelOverlap`, Literal['greedy', 'parity'] + The strategy to use for resolving overlap of labels in gradient legends. If + ``false``, no overlap reduction is attempted. If set to ``true`` or ``"parity"``, a + strategy of removing every other label is used. If set to ``"greedy"``, a linear + scan of the labels is performed, removing any label that overlaps with the last + visible label (this often works better for log-scaled axes). + + **Default value:** ``"greedy"`` for ``log scales otherwise ``true`. + labelPadding : dict, float, :class:`ExprRef` + Padding in pixels between the legend and legend labels. + labelSeparation : dict, float, :class:`ExprRef` + The minimum separation that must be between label bounding boxes for them to be + considered non-overlapping (default ``0``). This property is ignored if + *labelOverlap* resolution is not enabled. + layout : dict, :class:`ExprRef` + + legendX : dict, float, :class:`ExprRef` + Custom x-position for legend with orient "none". + legendY : dict, float, :class:`ExprRef` + Custom y-position for legend with orient "none". + offset : dict, float, :class:`ExprRef` + The offset in pixels by which to displace the legend from the data rectangle and + axes. + + **Default value:** ``18``. + orient : :class:`LegendOrient`, Literal['none', 'left', 'right', 'top', 'bottom', 'top-left', 'top-right', 'bottom-left', 'bottom-right'] + The orientation of the legend, which determines how the legend is positioned within + the scene. One of ``"left"``, ``"right"``, ``"top"``, ``"bottom"``, ``"top-left"``, + ``"top-right"``, ``"bottom-left"``, ``"bottom-right"``, ``"none"``. + + **Default value:** ``"right"`` + padding : dict, float, :class:`ExprRef` + The padding between the border and content of the legend group. + + **Default value:** ``0``. + rowPadding : dict, float, :class:`ExprRef` + The vertical padding in pixels between symbol legend entries. + + **Default value:** ``2``. + strokeColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Border stroke color for the full legend. + strokeDash : dict, Sequence[float], :class:`ExprRef` + Border stroke dash pattern for the full legend. + strokeWidth : dict, float, :class:`ExprRef` + Border stroke width for the full legend. + symbolBaseFillColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default fill color for legend symbols. Only applied if there is no ``"fill"`` scale + color encoding for the legend. + + **Default value:** ``"transparent"``. + symbolBaseStrokeColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default stroke color for legend symbols. Only applied if there is no ``"fill"`` + scale color encoding for the legend. + + **Default value:** ``"gray"``. + symbolDash : dict, Sequence[float], :class:`ExprRef` + An array of alternating [stroke, space] lengths for dashed symbol strokes. + symbolDashOffset : dict, float, :class:`ExprRef` + The pixel offset at which to start drawing with the symbol stroke dash array. + symbolDirection : dict, :class:`ExprRef`, :class:`Orientation`, Literal['horizontal', 'vertical'] + The default direction (``"horizontal"`` or ``"vertical"``) for symbol legends. + + **Default value:** ``"vertical"``. + symbolFillColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + The color of the legend symbol, + symbolLimit : dict, float, :class:`ExprRef` + The maximum number of allowed entries for a symbol legend. Additional entries will + be dropped. + symbolOffset : dict, float, :class:`ExprRef` + Horizontal pixel offset for legend symbols. + + **Default value:** ``0``. + symbolOpacity : dict, float, :class:`ExprRef` + Opacity of the legend symbols. + symbolSize : dict, float, :class:`ExprRef` + The size of the legend symbol, in pixels. + + **Default value:** ``100``. + symbolStrokeColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Stroke color for legend symbols. + symbolStrokeWidth : dict, float, :class:`ExprRef` + The width of the symbol's stroke. + + **Default value:** ``1.5``. + symbolType : str, dict, :class:`ExprRef`, :class:`SymbolShape` + The symbol shape. One of the plotting shapes ``circle`` (default), ``square``, + ``cross``, ``diamond``, ``triangle-up``, ``triangle-down``, ``triangle-right``, or + ``triangle-left``, the line symbol ``stroke``, or one of the centered directional + shapes ``arrow``, ``wedge``, or ``triangle``. Alternatively, a custom `SVG path + string `__ can be + provided. For correct sizing, custom shape paths should be defined within a square + bounding box with coordinates ranging from -1 to 1 along both the x and y + dimensions. + + **Default value:** ``"circle"``. + tickCount : dict, float, :class:`ExprRef`, :class:`TickCount`, :class:`TimeInterval`, :class:`TimeIntervalStep`, Literal['millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'year'] + The desired number of tick values for quantitative legends. + title : None + Set to null to disable title for the axis, legend, or header. + titleAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right'] + Horizontal text alignment for legend titles. + + **Default value:** ``"left"``. + titleAnchor : dict, :class:`ExprRef`, :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end'] + Text anchor position for placing legend titles. + titleBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + Vertical text baseline for legend titles. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The + ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and + ``"bottom"``, but are calculated relative to the *lineHeight* rather than *fontSize* + alone. + + **Default value:** ``"top"``. + titleColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + The color of the legend title, can be in hex color code or regular color name. + titleFont : str, dict, :class:`ExprRef` + The font of the legend title. + titleFontSize : dict, float, :class:`ExprRef` + The font size of the legend title. + titleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + The font style of the legend title. + titleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + The font weight of the legend title. This can be either a string (e.g ``"bold"``, + ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where + ``"normal"`` = ``400`` and ``"bold"`` = ``700``). + titleLimit : dict, float, :class:`ExprRef` + Maximum allowed pixel width of legend titles. + + **Default value:** ``180``. + titleLineHeight : dict, float, :class:`ExprRef` + Line height in pixels for multi-line title text or title text with ``"line-top"`` or + ``"line-bottom"`` baseline. + titleOpacity : dict, float, :class:`ExprRef` + Opacity of the legend title. + titleOrient : dict, :class:`Orient`, :class:`ExprRef`, Literal['left', 'right', 'top', 'bottom'] + Orientation of the legend title. + titlePadding : dict, float, :class:`ExprRef` + The padding, in pixels, between title and legend. + + **Default value:** ``5``. + unselectedOpacity : float + The opacity of unselected legend entries. + + **Default value:** 0.35. + zindex : dict, float, :class:`ExprRef` + The integer z-index indicating the layering of the legend group relative to other + axis, mark, and legend groups. + """ + + _schema = {"$ref": "#/definitions/LegendConfig"} + + def __init__( + self, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + columns: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + direction: Optional[SchemaBase | Orientation_T] = Undefined, + disable: Optional[bool] = Undefined, + fillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + gradientDirection: Optional[ + Parameter | SchemaBase | Map | Orientation_T + ] = Undefined, + gradientHorizontalMaxLength: Optional[float] = Undefined, + gradientHorizontalMinLength: Optional[float] = Undefined, + gradientLabelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientLabelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined, + gradientVerticalMaxLength: Optional[float] = Undefined, + gradientVerticalMinLength: Optional[float] = Undefined, + gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined, + labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + labelBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + labelColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + labelFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelOverlap: Optional[ + bool | Parameter | SchemaBase | Literal["greedy", "parity"] | Map + ] = Undefined, + labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined, + layout: Optional[Parameter | SchemaBase | Map] = Undefined, + legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined, + legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[SchemaBase | LegendOrient_T] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + strokeDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolBaseFillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolBaseStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolDirection: Optional[ + Parameter | SchemaBase | Map | Orientation_T + ] = Undefined, + symbolFillColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolStrokeColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined, + tickCount: Optional[ + float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + title: Optional[None] = Undefined, + titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined, + titleBaseline: Optional[ + Parameter | SchemaBase | Map | TextBaseline_T + ] = Undefined, + titleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + titleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined, + titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + unselectedOpacity: Optional[float] = Undefined, + zindex: Optional[float | Parameter | SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + aria=aria, + clipHeight=clipHeight, + columnPadding=columnPadding, + columns=columns, + cornerRadius=cornerRadius, + description=description, + direction=direction, + disable=disable, + fillColor=fillColor, + gradientDirection=gradientDirection, + gradientHorizontalMaxLength=gradientHorizontalMaxLength, + gradientHorizontalMinLength=gradientHorizontalMinLength, + gradientLabelLimit=gradientLabelLimit, + gradientLabelOffset=gradientLabelOffset, + gradientLength=gradientLength, + gradientOpacity=gradientOpacity, + gradientStrokeColor=gradientStrokeColor, + gradientStrokeWidth=gradientStrokeWidth, + gradientThickness=gradientThickness, + gradientVerticalMaxLength=gradientVerticalMaxLength, + gradientVerticalMinLength=gradientVerticalMinLength, + gridAlign=gridAlign, + labelAlign=labelAlign, + labelBaseline=labelBaseline, + labelColor=labelColor, + labelFont=labelFont, + labelFontSize=labelFontSize, + labelFontStyle=labelFontStyle, + labelFontWeight=labelFontWeight, + labelLimit=labelLimit, + labelOffset=labelOffset, + labelOpacity=labelOpacity, + labelOverlap=labelOverlap, + labelPadding=labelPadding, + labelSeparation=labelSeparation, + layout=layout, + legendX=legendX, + legendY=legendY, + offset=offset, + orient=orient, + padding=padding, + rowPadding=rowPadding, + strokeColor=strokeColor, + strokeDash=strokeDash, + strokeWidth=strokeWidth, + symbolBaseFillColor=symbolBaseFillColor, + symbolBaseStrokeColor=symbolBaseStrokeColor, + symbolDash=symbolDash, + symbolDashOffset=symbolDashOffset, + symbolDirection=symbolDirection, + symbolFillColor=symbolFillColor, + symbolLimit=symbolLimit, + symbolOffset=symbolOffset, + symbolOpacity=symbolOpacity, + symbolSize=symbolSize, + symbolStrokeColor=symbolStrokeColor, + symbolStrokeWidth=symbolStrokeWidth, + symbolType=symbolType, + tickCount=tickCount, + title=title, + titleAlign=titleAlign, + titleAnchor=titleAnchor, + titleBaseline=titleBaseline, + titleColor=titleColor, + titleFont=titleFont, + titleFontSize=titleFontSize, + titleFontStyle=titleFontStyle, + titleFontWeight=titleFontWeight, + titleLimit=titleLimit, + titleLineHeight=titleLineHeight, + titleOpacity=titleOpacity, + titleOrient=titleOrient, + titlePadding=titlePadding, + unselectedOpacity=unselectedOpacity, + zindex=zindex, + **kwds, + ) + + +class LegendOrient(VegaLiteSchema): + """LegendOrient schema wrapper.""" + + _schema = {"$ref": "#/definitions/LegendOrient"} + + def __init__(self, *args): + super().__init__(*args) + + +class LegendResolveMap(VegaLiteSchema): + """ + LegendResolveMap schema wrapper. + + Parameters + ---------- + angle : :class:`ResolveMode`, Literal['independent', 'shared'] + + color : :class:`ResolveMode`, Literal['independent', 'shared'] + + fill : :class:`ResolveMode`, Literal['independent', 'shared'] + + fillOpacity : :class:`ResolveMode`, Literal['independent', 'shared'] + + opacity : :class:`ResolveMode`, Literal['independent', 'shared'] + + shape : :class:`ResolveMode`, Literal['independent', 'shared'] + + size : :class:`ResolveMode`, Literal['independent', 'shared'] + + stroke : :class:`ResolveMode`, Literal['independent', 'shared'] + + strokeDash : :class:`ResolveMode`, Literal['independent', 'shared'] + + strokeOpacity : :class:`ResolveMode`, Literal['independent', 'shared'] + + strokeWidth : :class:`ResolveMode`, Literal['independent', 'shared'] + + """ + + _schema = {"$ref": "#/definitions/LegendResolveMap"} + + def __init__( + self, + angle: Optional[SchemaBase | ResolveMode_T] = Undefined, + color: Optional[SchemaBase | ResolveMode_T] = Undefined, + fill: Optional[SchemaBase | ResolveMode_T] = Undefined, + fillOpacity: Optional[SchemaBase | ResolveMode_T] = Undefined, + opacity: Optional[SchemaBase | ResolveMode_T] = Undefined, + shape: Optional[SchemaBase | ResolveMode_T] = Undefined, + size: Optional[SchemaBase | ResolveMode_T] = Undefined, + stroke: Optional[SchemaBase | ResolveMode_T] = Undefined, + strokeDash: Optional[SchemaBase | ResolveMode_T] = Undefined, + strokeOpacity: Optional[SchemaBase | ResolveMode_T] = Undefined, + strokeWidth: Optional[SchemaBase | ResolveMode_T] = Undefined, + **kwds, + ): + super().__init__( + angle=angle, + color=color, + fill=fill, + fillOpacity=fillOpacity, + opacity=opacity, + shape=shape, + size=size, + stroke=stroke, + strokeDash=strokeDash, + strokeOpacity=strokeOpacity, + strokeWidth=strokeWidth, + **kwds, + ) + + +class LegendStreamBinding(LegendBinding): + """ + LegendStreamBinding schema wrapper. + + Parameters + ---------- + legend : str, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream` + + """ + + _schema = {"$ref": "#/definitions/LegendStreamBinding"} + + def __init__(self, legend: Optional[str | SchemaBase | Map] = Undefined, **kwds): + super().__init__(legend=legend, **kwds) + + +class LineConfig(AnyMarkConfig): + """ + LineConfig schema wrapper. + + Parameters + ---------- + align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right'] + The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). + One of ``"left"``, ``"right"``, ``"center"``. + + **Note:** Expression reference is *not* supported for range marks. + angle : dict, float, :class:`ExprRef` + The rotation angle of the text, in degrees. + aria : bool, dict, :class:`ExprRef` + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG element, removing the mark item from the ARIA accessibility tree. + ariaRole : str, dict, :class:`ExprRef` + Sets the type of user interface element of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "role" attribute. Warning: this + property is experimental and may be changed in the future. + ariaRoleDescription : str, dict, :class:`ExprRef` + A human-readable, author-localized description for the role of the mark item for + `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "aria-roledescription" attribute. + Warning: this property is experimental and may be changed in the future. + aspect : bool, dict, :class:`ExprRef` + Whether to keep aspect ratio of image marks. + baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + For text marks, the vertical text baseline. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an + expression reference that provides one of the valid values. The ``"line-top"`` and + ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are + calculated relative to the ``lineHeight`` rather than ``fontSize`` alone. + + For range marks, the vertical alignment of the marks. One of ``"top"``, + ``"middle"``, ``"bottom"``. + + **Note:** Expression reference is *not* supported for range marks. + blend : dict, :class:`Blend`, :class:`ExprRef`, Literal[None, 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'] + The color blend mode for drawing an item on its current background. Any valid `CSS + mix-blend-mode `__ + value can be used. + + __Default value:__ ``"source-over"`` + color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + cornerRadius : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles or arcs' corners. + + **Default value:** ``0`` + cornerRadiusBottomLeft : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' bottom left corner. + + **Default value:** ``0`` + cornerRadiusBottomRight : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' bottom right corner. + + **Default value:** ``0`` + cornerRadiusTopLeft : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' top right corner. + + **Default value:** ``0`` + cornerRadiusTopRight : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' top left corner. + + **Default value:** ``0`` + cursor : dict, :class:`Cursor`, :class:`ExprRef`, Literal['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', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing'] + The mouse cursor used over the mark. Any valid `CSS cursor type + `__ can be used. + description : str, dict, :class:`ExprRef` + A text description of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the `"aria-label" attribute + `__. + dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl'] + The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` + (right-to-left). This property determines on which side is truncated in response to + the limit parameter. + + **Default value:** ``"ltr"`` + dx : dict, float, :class:`ExprRef` + The horizontal offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + dy : dict, float, :class:`ExprRef` + The vertical offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + ellipsis : str, dict, :class:`ExprRef` + The ellipsis string for text truncated in response to the limit parameter. + + **Default value:** ``"…"`` + endAngle : dict, float, :class:`ExprRef` + The end angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + fill : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default fill color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove fill. + + **Default value:** (None) + fillOpacity : dict, float, :class:`ExprRef` + The fill opacity (value between [0,1]). + + **Default value:** ``1`` + filled : bool + Whether the mark's color should be used as fill color instead of stroke color. + + **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well + as ``geoshape`` marks for `graticule + `__ data sources; + otherwise, ``true``. + + **Note:** This property cannot be used in a `style config + `__. + font : str, dict, :class:`ExprRef` + The typeface to set the text in (e.g., ``"Helvetica Neue"``). + fontSize : dict, float, :class:`ExprRef` + The font size, in pixels. + + **Default value:** ``11`` + fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + The font style (e.g., ``"italic"``). + fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a + number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and + ``"bold"`` = ``700``). + height : dict, float, :class:`ExprRef` + Height of the marks. + href : str, dict, :class:`URI`, :class:`ExprRef` + A URL to load upon mouse click. If defined, the mark acts as a hyperlink. + innerRadius : dict, float, :class:`ExprRef` + The inner radius in pixels of arc marks. ``innerRadius`` is an alias for + ``radius2``. + + **Default value:** ``0`` + interpolate : dict, :class:`ExprRef`, :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after'] + The line interpolation method to use for line and area marks. One of the following: + + * ``"linear"``: piecewise linear segments, as in a polyline. + * ``"linear-closed"``: close the linear segments to form a polygon. + * ``"step"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"step-before"``: alternate between vertical and horizontal segments, as in a + step function. + * ``"step-after"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"basis"``: a B-spline, with control point duplication on the ends. + * ``"basis-open"``: an open B-spline; may not intersect the start or end. + * ``"basis-closed"``: a closed B-spline, as in a loop. + * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends. + * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end, + but will intersect other control points. + * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop. + * ``"bundle"``: equivalent to basis, except the tension parameter is used to + straighten the spline. + * ``"monotone"``: cubic interpolation that preserves monotonicity in y. + invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None + Invalid data mode, which defines how the marks and corresponding scales should + represent invalid values (``null`` and ``NaN`` in continuous scales *without* + defined output for invalid values). + + * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and + *scales*. For path marks (for line, area, trail), this option will create paths + that connect valid points, as if the data rows with invalid values do not exist. + + * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at + invalid values. For non-path marks, this is equivalent to ``"filter"``. All + *scale* domains will *exclude* these filtered data points. + + * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid + values. Hide invalid values for non-path marks. All *scale* domains will + *include* these filtered data points (for both path and non-path marks). + + * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each + scale will use the output for invalid values defined in ``config.scale.invalid`` + or, if unspecified, by default invalid values will produce the same visual values + as zero (if the scale includes zero) or the minimum value (if the scale does not + include zero). + + * ``"break-paths-show-path-domains"`` (default) — This is equivalent to + ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and + ``"filter"`` for non-path marks. + + **Note**: If any channel's scale has an output for invalid values defined in + ``config.scale.invalid``, all values for the scales will be considered "valid" since + they can produce a reasonable output for the scales. Thus, fields for such channels + will not be filtered and will not cause path breaks. + limit : dict, float, :class:`ExprRef` + The maximum length of the text mark in pixels. The text value will be automatically + truncated if the rendered size exceeds the limit. + + **Default value:** ``0`` -- indicating no limit + lineBreak : str, dict, :class:`ExprRef` + A delimiter, such as a newline character, upon which to break text strings into + multiple lines. This property is ignored if the text is array-valued. + lineHeight : dict, float, :class:`ExprRef` + The line height in pixels (the spacing between subsequent lines of text) for + multi-line text marks. + opacity : dict, float, :class:`ExprRef` + The overall opacity (value between [0,1]). + + **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, + ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. + order : bool, None + For line and trail marks, this ``order`` property can be set to ``null`` or + ``false`` to make the lines use the original order in the data sources. + orient : :class:`Orientation`, Literal['horizontal', 'vertical'] + The orientation of a non-stacked bar, tick, area, and line charts. The value is + either horizontal (default) or vertical. + + * For bar, rule and tick, this determines whether the size of the bar and tick + should be applied to x or y dimension. + * For area, this property determines the orient property of the Vega output. + * For line and trail marks, this property determines the sort order of the points in + the line if ``config.sortLineBy`` is not specified. For stacked charts, this is + always determined by the orientation of the stack; therefore explicitly specified + value will be ignored. + outerRadius : dict, float, :class:`ExprRef` + The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``. + + **Default value:** ``0`` + padAngle : dict, float, :class:`ExprRef` + The angular padding applied to sides of the arc, in radians. + point : bool, dict, Literal['transparent'], :class:`OverlayMarkDef` + A flag for overlaying points on top of line or area marks, or an object defining the + properties of the overlayed points. + + * If this property is ``"transparent"``, transparent points will be used (for + enhancing tooltips and selections). + + * If this property is an empty object (``{}``) or ``true``, filled points with + default properties will be used. + + * If this property is ``false``, no points would be automatically added to line or + area marks. + + **Default value:** ``false``. + radius : dict, float, :class:`ExprRef` + For arc mark, the primary (outer) radius in pixels. + + For text marks, polar coordinate radial offset, in pixels, of the text from the + origin determined by the ``x`` and ``y`` properties. + + **Default value:** ``min(plot_width, plot_height)/2`` + radius2 : dict, float, :class:`ExprRef` + The secondary (inner) radius in pixels of arc marks. + + **Default value:** ``0`` + shape : str, dict, :class:`ExprRef`, :class:`SymbolShape` + Shape of the point marks. Supported values include: + + * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, + ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or + ``"triangle-left"``. + * the line symbol ``"stroke"`` + * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` + * a custom `SVG path string + `__ (For correct + sizing, custom shape paths should be defined within a square bounding box with + coordinates ranging from -1 to 1 along both the x and y dimensions.) + + **Default value:** ``"circle"`` + size : dict, float, :class:`ExprRef` + Default size for marks. + + * For ``point``/``circle``/``square``, this represents the pixel area of the marks. + Note that this value sets the area of the symbol; the side lengths will increase + with the square root of this value. + * For ``bar``, this represents the band size of the bar, in pixels. + * For ``text``, this represents the font size, in pixels. + + **Default value:** + + * ``30`` for point, circle, square marks; width/height's ``step`` + * ``2`` for bar marks with discrete dimensions; + * ``5`` for bar marks with continuous dimensions; + * ``11`` for text marks. + smooth : bool, dict, :class:`ExprRef` + A boolean flag (default true) indicating if the image should be smoothed when + resized. If false, individual pixels should be scaled directly rather than + interpolated with smoothing. For SVG rendering, this option may not work in some + browsers due to lack of standardization. + startAngle : dict, float, :class:`ExprRef` + The start angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + stroke : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default stroke color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove stroke. + + **Default value:** (None) + strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square'] + The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or + ``"square"``. + + **Default value:** ``"butt"`` + strokeDash : dict, Sequence[float], :class:`ExprRef` + An array of alternating stroke, space lengths for creating dashed or dotted lines. + strokeDashOffset : dict, float, :class:`ExprRef` + The offset (in pixels) into which to begin drawing with the stroke dash array. + strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel'] + The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. + + **Default value:** ``"miter"`` + strokeMiterLimit : dict, float, :class:`ExprRef` + The miter limit at which to bevel a line join. + strokeOffset : dict, float, :class:`ExprRef` + The offset in pixels at which to draw the group stroke and fill. If unspecified, the + default behavior is to dynamically offset stroked groups such that 1 pixel stroke + widths align with the pixel grid. + strokeOpacity : dict, float, :class:`ExprRef` + The stroke opacity (value between [0,1]). + + **Default value:** ``1`` + strokeWidth : dict, float, :class:`ExprRef` + The stroke width, in pixels. + tension : dict, float, :class:`ExprRef` + Depending on the interpolation type, sets the tension parameter (for line and area + marks). + text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef` + Placeholder text if the ``text`` channel is not specified + theta : dict, float, :class:`ExprRef` + * For arc marks, the arc length in radians if theta2 is not specified, otherwise the + start arc angle. (A value of 0 indicates up or “north”, increasing values proceed + clockwise.) + + * For text marks, polar coordinate angle in radians. + theta2 : dict, float, :class:`ExprRef` + The end angle of arc marks in radians. A value of 0 indicates up or “north”, + increasing values proceed clockwise. + timeUnitBandPosition : float + Default relative band position for a time unit. If set to ``0``, the marks will be + positioned at the beginning of the time unit band step. If set to ``0.5``, the marks + will be positioned in the middle of the time unit band step. + timeUnitBandSize : float + Default relative band size for a time unit. If set to ``1``, the bandwidth of the + marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the + marks will be half of the time unit band step. + tooltip : str, bool, dict, float, :class:`ExprRef`, :class:`TooltipContent`, None + The tooltip text string to show upon mouse hover or an object defining which fields + should the tooltip be derived from. + + * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from + ``encoding`` will be used. + * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the + highlighted data point will be used. + * If set to ``null`` or ``false``, then no tooltip will be used. + + See the `tooltip `__ + documentation for a detailed discussion about tooltip in Vega-Lite. + + **Default value:** ``null`` + url : str, dict, :class:`URI`, :class:`ExprRef` + The URL of the image file for image marks. + width : dict, float, :class:`ExprRef` + Width of the marks. + x : dict, float, :class:`ExprRef`, Literal['width'] + X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without + specified ``x2`` or ``width``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2 : dict, float, :class:`ExprRef`, Literal['width'] + X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + y : dict, float, :class:`ExprRef`, Literal['height'] + Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without + specified ``y2`` or ``height``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2 : dict, float, :class:`ExprRef`, Literal['height'] + Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + """ + + _schema = {"$ref": "#/definitions/LineConfig"} + + def __init__( + self, + align: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + angle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ariaRole: Optional[str | Parameter | SchemaBase | Map] = Undefined, + ariaRoleDescription: Optional[str | Parameter | SchemaBase | Map] = Undefined, + aspect: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + baseline: Optional[Parameter | SchemaBase | Map | TextBaseline_T] = Undefined, + blend: Optional[Parameter | SchemaBase | Map | Blend_T] = Undefined, + color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadiusBottomLeft: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cornerRadiusBottomRight: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cornerRadiusTopLeft: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadiusTopRight: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cursor: Optional[Parameter | SchemaBase | Map | Cursor_T] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + dir: Optional[Parameter | SchemaBase | Map | TextDirection_T] = Undefined, + dx: Optional[float | Parameter | SchemaBase | Map] = Undefined, + dy: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ellipsis: Optional[str | Parameter | SchemaBase | Map] = Undefined, + endAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + fill: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + filled: Optional[bool] = Undefined, + font: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined, + height: Optional[float | Parameter | SchemaBase | Map] = Undefined, + href: Optional[str | Parameter | SchemaBase | Map] = Undefined, + innerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[Parameter | SchemaBase | Map | Interpolate_T] = Undefined, + invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined, + limit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + lineBreak: Optional[str | Parameter | SchemaBase | Map] = Undefined, + lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + order: Optional[bool | None] = Undefined, + orient: Optional[SchemaBase | Orientation_T] = Undefined, + outerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + padAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + point: Optional[bool | SchemaBase | Literal["transparent"] | Map] = Undefined, + radius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radius2: Optional[float | Parameter | SchemaBase | Map] = Undefined, + shape: Optional[str | Parameter | SchemaBase | Map] = Undefined, + size: Optional[float | Parameter | SchemaBase | Map] = Undefined, + smooth: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + startAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + stroke: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + strokeDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined, + strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tension: Optional[float | Parameter | SchemaBase | Map] = Undefined, + text: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined, + theta: Optional[float | Parameter | SchemaBase | Map] = Undefined, + theta2: Optional[float | Parameter | SchemaBase | Map] = Undefined, + timeUnitBandPosition: Optional[float] = Undefined, + timeUnitBandSize: Optional[float] = Undefined, + tooltip: Optional[ + str | bool | float | Parameter | SchemaBase | Map | None + ] = Undefined, + url: Optional[str | Parameter | SchemaBase | Map] = Undefined, + width: Optional[float | Parameter | SchemaBase | Map] = Undefined, + x: Optional[ + float | Parameter | SchemaBase | Literal["width"] | Map + ] = Undefined, + x2: Optional[ + float | Parameter | SchemaBase | Literal["width"] | Map + ] = Undefined, + y: Optional[ + float | Parameter | SchemaBase | Literal["height"] | Map + ] = Undefined, + y2: Optional[ + float | Parameter | SchemaBase | Literal["height"] | Map + ] = Undefined, + **kwds, + ): + super().__init__( + align=align, + angle=angle, + aria=aria, + ariaRole=ariaRole, + ariaRoleDescription=ariaRoleDescription, + aspect=aspect, + baseline=baseline, + blend=blend, + color=color, + cornerRadius=cornerRadius, + cornerRadiusBottomLeft=cornerRadiusBottomLeft, + cornerRadiusBottomRight=cornerRadiusBottomRight, + cornerRadiusTopLeft=cornerRadiusTopLeft, + cornerRadiusTopRight=cornerRadiusTopRight, + cursor=cursor, + description=description, + dir=dir, + dx=dx, + dy=dy, + ellipsis=ellipsis, + endAngle=endAngle, + fill=fill, + fillOpacity=fillOpacity, + filled=filled, + font=font, + fontSize=fontSize, + fontStyle=fontStyle, + fontWeight=fontWeight, + height=height, + href=href, + innerRadius=innerRadius, + interpolate=interpolate, + invalid=invalid, + limit=limit, + lineBreak=lineBreak, + lineHeight=lineHeight, + opacity=opacity, + order=order, + orient=orient, + outerRadius=outerRadius, + padAngle=padAngle, + point=point, + radius=radius, + radius2=radius2, + shape=shape, + size=size, + smooth=smooth, + startAngle=startAngle, + stroke=stroke, + strokeCap=strokeCap, + strokeDash=strokeDash, + strokeDashOffset=strokeDashOffset, + strokeJoin=strokeJoin, + strokeMiterLimit=strokeMiterLimit, + strokeOffset=strokeOffset, + strokeOpacity=strokeOpacity, + strokeWidth=strokeWidth, + tension=tension, + text=text, + theta=theta, + theta2=theta2, + timeUnitBandPosition=timeUnitBandPosition, + timeUnitBandSize=timeUnitBandSize, + tooltip=tooltip, + url=url, + width=width, + x=x, + x2=x2, + y=y, + y2=y2, + **kwds, + ) + + +class LineString(Geometry): + """ + LineString schema wrapper. + + LineString geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.4 + + Parameters + ---------- + coordinates : Sequence[Sequence[float], :class:`Position`] + + type : Literal['LineString'] + Specifies the type of GeoJSON object. + bbox : :class:`BBox`, Sequence[float] + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + """ + + _schema = {"$ref": "#/definitions/LineString"} + + def __init__( + self, + coordinates: Optional[Sequence[SchemaBase | Sequence[float]]] = Undefined, + type: Optional[Literal["LineString"]] = Undefined, + bbox: Optional[SchemaBase | Sequence[float]] = Undefined, + **kwds, + ): + super().__init__(coordinates=coordinates, type=type, bbox=bbox, **kwds) + + +class LinearGradient(Gradient): + """ + LinearGradient schema wrapper. + + Parameters + ---------- + gradient : Literal['linear'] + The type of gradient. Use ``"linear"`` for a linear gradient. + stops : Sequence[dict, :class:`GradientStop`] + An array of gradient stops defining the gradient color sequence. + id : str + + x1 : float + The starting x-coordinate, in normalized [0, 1] coordinates, of the linear gradient. + + **Default value:** ``0`` + x2 : float + The ending x-coordinate, in normalized [0, 1] coordinates, of the linear gradient. + + **Default value:** ``1`` + y1 : float + The starting y-coordinate, in normalized [0, 1] coordinates, of the linear gradient. + + **Default value:** ``0`` + y2 : float + The ending y-coordinate, in normalized [0, 1] coordinates, of the linear gradient. + + **Default value:** ``0`` + """ + + _schema = {"$ref": "#/definitions/LinearGradient"} + + def __init__( + self, + gradient: Optional[Literal["linear"]] = Undefined, + stops: Optional[Sequence[SchemaBase | Map]] = Undefined, + id: Optional[str] = Undefined, + x1: Optional[float] = Undefined, + x2: Optional[float] = Undefined, + y1: Optional[float] = Undefined, + y2: Optional[float] = Undefined, + **kwds, + ): + super().__init__( + gradient=gradient, stops=stops, id=id, x1=x1, x2=x2, y1=y1, y2=y2, **kwds + ) + + +class Locale(VegaLiteSchema): + """ + Locale schema wrapper. + + Parameters + ---------- + number : dict, :class:`NumberLocale` + Locale definition for formatting numbers. + time : dict, :class:`TimeLocale` + Locale definition for formatting dates and times. + """ + + _schema = {"$ref": "#/definitions/Locale"} + + def __init__( + self, + number: Optional[SchemaBase | Map] = Undefined, + time: Optional[SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__(number=number, time=time, **kwds) + + +class LookupData(VegaLiteSchema): + """ + LookupData schema wrapper. + + Parameters + ---------- + data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator` + Secondary data source to lookup in. + key : str, :class:`FieldName` + Key in data to lookup. + fields : Sequence[str, :class:`FieldName`] + Fields in foreign data or selection to lookup. If not specified, the entire object + is queried. + """ + + _schema = {"$ref": "#/definitions/LookupData"} + + def __init__( + self, + data: Optional[SchemaBase | Map] = Undefined, + key: Optional[str | SchemaBase] = Undefined, + fields: Optional[Sequence[str | SchemaBase]] = Undefined, + **kwds, + ): + super().__init__(data=data, key=key, fields=fields, **kwds) + + +class LookupSelection(VegaLiteSchema): + """ + LookupSelection schema wrapper. + + Parameters + ---------- + key : str, :class:`FieldName` + Key in data to lookup. + param : str, :class:`ParameterName` + Selection parameter name to look up. + fields : Sequence[str, :class:`FieldName`] + Fields in foreign data or selection to lookup. If not specified, the entire object + is queried. + """ + + _schema = {"$ref": "#/definitions/LookupSelection"} + + def __init__( + self, + key: Optional[str | SchemaBase] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + fields: Optional[Sequence[str | SchemaBase]] = Undefined, + **kwds, + ): + super().__init__(key=key, param=param, fields=fields, **kwds) + + +class Mark(AnyMark): + """ + Mark schema wrapper. + + All types of primitive marks. + """ + + _schema = {"$ref": "#/definitions/Mark"} + + def __init__(self, *args): + super().__init__(*args) + + +class MarkConfig(AnyMarkConfig): + """ + MarkConfig schema wrapper. + + Parameters + ---------- + align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right'] + The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). + One of ``"left"``, ``"right"``, ``"center"``. + + **Note:** Expression reference is *not* supported for range marks. + angle : dict, float, :class:`ExprRef` + The rotation angle of the text, in degrees. + aria : bool, dict, :class:`ExprRef` + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG element, removing the mark item from the ARIA accessibility tree. + ariaRole : str, dict, :class:`ExprRef` + Sets the type of user interface element of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "role" attribute. Warning: this + property is experimental and may be changed in the future. + ariaRoleDescription : str, dict, :class:`ExprRef` + A human-readable, author-localized description for the role of the mark item for + `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "aria-roledescription" attribute. + Warning: this property is experimental and may be changed in the future. + aspect : bool, dict, :class:`ExprRef` + Whether to keep aspect ratio of image marks. + baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + For text marks, the vertical text baseline. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an + expression reference that provides one of the valid values. The ``"line-top"`` and + ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are + calculated relative to the ``lineHeight`` rather than ``fontSize`` alone. + + For range marks, the vertical alignment of the marks. One of ``"top"``, + ``"middle"``, ``"bottom"``. + + **Note:** Expression reference is *not* supported for range marks. + blend : dict, :class:`Blend`, :class:`ExprRef`, Literal[None, 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'] + The color blend mode for drawing an item on its current background. Any valid `CSS + mix-blend-mode `__ + value can be used. + + __Default value:__ ``"source-over"`` + color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + cornerRadius : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles or arcs' corners. + + **Default value:** ``0`` + cornerRadiusBottomLeft : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' bottom left corner. + + **Default value:** ``0`` + cornerRadiusBottomRight : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' bottom right corner. + + **Default value:** ``0`` + cornerRadiusTopLeft : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' top right corner. + + **Default value:** ``0`` + cornerRadiusTopRight : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' top left corner. + + **Default value:** ``0`` + cursor : dict, :class:`Cursor`, :class:`ExprRef`, Literal['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', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing'] + The mouse cursor used over the mark. Any valid `CSS cursor type + `__ can be used. + description : str, dict, :class:`ExprRef` + A text description of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the `"aria-label" attribute + `__. + dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl'] + The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` + (right-to-left). This property determines on which side is truncated in response to + the limit parameter. + + **Default value:** ``"ltr"`` + dx : dict, float, :class:`ExprRef` + The horizontal offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + dy : dict, float, :class:`ExprRef` + The vertical offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + ellipsis : str, dict, :class:`ExprRef` + The ellipsis string for text truncated in response to the limit parameter. + + **Default value:** ``"…"`` + endAngle : dict, float, :class:`ExprRef` + The end angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + fill : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default fill color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove fill. + + **Default value:** (None) + fillOpacity : dict, float, :class:`ExprRef` + The fill opacity (value between [0,1]). + + **Default value:** ``1`` + filled : bool + Whether the mark's color should be used as fill color instead of stroke color. + + **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well + as ``geoshape`` marks for `graticule + `__ data sources; + otherwise, ``true``. + + **Note:** This property cannot be used in a `style config + `__. + font : str, dict, :class:`ExprRef` + The typeface to set the text in (e.g., ``"Helvetica Neue"``). + fontSize : dict, float, :class:`ExprRef` + The font size, in pixels. + + **Default value:** ``11`` + fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + The font style (e.g., ``"italic"``). + fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a + number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and + ``"bold"`` = ``700``). + height : dict, float, :class:`ExprRef` + Height of the marks. + href : str, dict, :class:`URI`, :class:`ExprRef` + A URL to load upon mouse click. If defined, the mark acts as a hyperlink. + innerRadius : dict, float, :class:`ExprRef` + The inner radius in pixels of arc marks. ``innerRadius`` is an alias for + ``radius2``. + + **Default value:** ``0`` + interpolate : dict, :class:`ExprRef`, :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after'] + The line interpolation method to use for line and area marks. One of the following: + + * ``"linear"``: piecewise linear segments, as in a polyline. + * ``"linear-closed"``: close the linear segments to form a polygon. + * ``"step"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"step-before"``: alternate between vertical and horizontal segments, as in a + step function. + * ``"step-after"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"basis"``: a B-spline, with control point duplication on the ends. + * ``"basis-open"``: an open B-spline; may not intersect the start or end. + * ``"basis-closed"``: a closed B-spline, as in a loop. + * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends. + * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end, + but will intersect other control points. + * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop. + * ``"bundle"``: equivalent to basis, except the tension parameter is used to + straighten the spline. + * ``"monotone"``: cubic interpolation that preserves monotonicity in y. + invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None + Invalid data mode, which defines how the marks and corresponding scales should + represent invalid values (``null`` and ``NaN`` in continuous scales *without* + defined output for invalid values). + + * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and + *scales*. For path marks (for line, area, trail), this option will create paths + that connect valid points, as if the data rows with invalid values do not exist. + + * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at + invalid values. For non-path marks, this is equivalent to ``"filter"``. All + *scale* domains will *exclude* these filtered data points. + + * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid + values. Hide invalid values for non-path marks. All *scale* domains will + *include* these filtered data points (for both path and non-path marks). + + * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each + scale will use the output for invalid values defined in ``config.scale.invalid`` + or, if unspecified, by default invalid values will produce the same visual values + as zero (if the scale includes zero) or the minimum value (if the scale does not + include zero). + + * ``"break-paths-show-path-domains"`` (default) — This is equivalent to + ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and + ``"filter"`` for non-path marks. + + **Note**: If any channel's scale has an output for invalid values defined in + ``config.scale.invalid``, all values for the scales will be considered "valid" since + they can produce a reasonable output for the scales. Thus, fields for such channels + will not be filtered and will not cause path breaks. + limit : dict, float, :class:`ExprRef` + The maximum length of the text mark in pixels. The text value will be automatically + truncated if the rendered size exceeds the limit. + + **Default value:** ``0`` -- indicating no limit + lineBreak : str, dict, :class:`ExprRef` + A delimiter, such as a newline character, upon which to break text strings into + multiple lines. This property is ignored if the text is array-valued. + lineHeight : dict, float, :class:`ExprRef` + The line height in pixels (the spacing between subsequent lines of text) for + multi-line text marks. + opacity : dict, float, :class:`ExprRef` + The overall opacity (value between [0,1]). + + **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, + ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. + order : bool, None + For line and trail marks, this ``order`` property can be set to ``null`` or + ``false`` to make the lines use the original order in the data sources. + orient : :class:`Orientation`, Literal['horizontal', 'vertical'] + The orientation of a non-stacked bar, tick, area, and line charts. The value is + either horizontal (default) or vertical. + + * For bar, rule and tick, this determines whether the size of the bar and tick + should be applied to x or y dimension. + * For area, this property determines the orient property of the Vega output. + * For line and trail marks, this property determines the sort order of the points in + the line if ``config.sortLineBy`` is not specified. For stacked charts, this is + always determined by the orientation of the stack; therefore explicitly specified + value will be ignored. + outerRadius : dict, float, :class:`ExprRef` + The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``. + + **Default value:** ``0`` + padAngle : dict, float, :class:`ExprRef` + The angular padding applied to sides of the arc, in radians. + radius : dict, float, :class:`ExprRef` + For arc mark, the primary (outer) radius in pixels. + + For text marks, polar coordinate radial offset, in pixels, of the text from the + origin determined by the ``x`` and ``y`` properties. + + **Default value:** ``min(plot_width, plot_height)/2`` + radius2 : dict, float, :class:`ExprRef` + The secondary (inner) radius in pixels of arc marks. + + **Default value:** ``0`` + shape : str, dict, :class:`ExprRef`, :class:`SymbolShape` + Shape of the point marks. Supported values include: + + * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, + ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or + ``"triangle-left"``. + * the line symbol ``"stroke"`` + * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` + * a custom `SVG path string + `__ (For correct + sizing, custom shape paths should be defined within a square bounding box with + coordinates ranging from -1 to 1 along both the x and y dimensions.) + + **Default value:** ``"circle"`` + size : dict, float, :class:`ExprRef` + Default size for marks. + + * For ``point``/``circle``/``square``, this represents the pixel area of the marks. + Note that this value sets the area of the symbol; the side lengths will increase + with the square root of this value. + * For ``bar``, this represents the band size of the bar, in pixels. + * For ``text``, this represents the font size, in pixels. + + **Default value:** + + * ``30`` for point, circle, square marks; width/height's ``step`` + * ``2`` for bar marks with discrete dimensions; + * ``5`` for bar marks with continuous dimensions; + * ``11`` for text marks. + smooth : bool, dict, :class:`ExprRef` + A boolean flag (default true) indicating if the image should be smoothed when + resized. If false, individual pixels should be scaled directly rather than + interpolated with smoothing. For SVG rendering, this option may not work in some + browsers due to lack of standardization. + startAngle : dict, float, :class:`ExprRef` + The start angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + stroke : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default stroke color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove stroke. + + **Default value:** (None) + strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square'] + The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or + ``"square"``. + + **Default value:** ``"butt"`` + strokeDash : dict, Sequence[float], :class:`ExprRef` + An array of alternating stroke, space lengths for creating dashed or dotted lines. + strokeDashOffset : dict, float, :class:`ExprRef` + The offset (in pixels) into which to begin drawing with the stroke dash array. + strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel'] + The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. + + **Default value:** ``"miter"`` + strokeMiterLimit : dict, float, :class:`ExprRef` + The miter limit at which to bevel a line join. + strokeOffset : dict, float, :class:`ExprRef` + The offset in pixels at which to draw the group stroke and fill. If unspecified, the + default behavior is to dynamically offset stroked groups such that 1 pixel stroke + widths align with the pixel grid. + strokeOpacity : dict, float, :class:`ExprRef` + The stroke opacity (value between [0,1]). + + **Default value:** ``1`` + strokeWidth : dict, float, :class:`ExprRef` + The stroke width, in pixels. + tension : dict, float, :class:`ExprRef` + Depending on the interpolation type, sets the tension parameter (for line and area + marks). + text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef` + Placeholder text if the ``text`` channel is not specified + theta : dict, float, :class:`ExprRef` + * For arc marks, the arc length in radians if theta2 is not specified, otherwise the + start arc angle. (A value of 0 indicates up or “north”, increasing values proceed + clockwise.) + + * For text marks, polar coordinate angle in radians. + theta2 : dict, float, :class:`ExprRef` + The end angle of arc marks in radians. A value of 0 indicates up or “north”, + increasing values proceed clockwise. + timeUnitBandPosition : float + Default relative band position for a time unit. If set to ``0``, the marks will be + positioned at the beginning of the time unit band step. If set to ``0.5``, the marks + will be positioned in the middle of the time unit band step. + timeUnitBandSize : float + Default relative band size for a time unit. If set to ``1``, the bandwidth of the + marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the + marks will be half of the time unit band step. + tooltip : str, bool, dict, float, :class:`ExprRef`, :class:`TooltipContent`, None + The tooltip text string to show upon mouse hover or an object defining which fields + should the tooltip be derived from. + + * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from + ``encoding`` will be used. + * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the + highlighted data point will be used. + * If set to ``null`` or ``false``, then no tooltip will be used. + + See the `tooltip `__ + documentation for a detailed discussion about tooltip in Vega-Lite. + + **Default value:** ``null`` + url : str, dict, :class:`URI`, :class:`ExprRef` + The URL of the image file for image marks. + width : dict, float, :class:`ExprRef` + Width of the marks. + x : dict, float, :class:`ExprRef`, Literal['width'] + X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without + specified ``x2`` or ``width``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2 : dict, float, :class:`ExprRef`, Literal['width'] + X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + y : dict, float, :class:`ExprRef`, Literal['height'] + Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without + specified ``y2`` or ``height``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2 : dict, float, :class:`ExprRef`, Literal['height'] + Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + """ + + _schema = {"$ref": "#/definitions/MarkConfig"} + + def __init__( + self, + align: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + angle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ariaRole: Optional[str | Parameter | SchemaBase | Map] = Undefined, + ariaRoleDescription: Optional[str | Parameter | SchemaBase | Map] = Undefined, + aspect: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + baseline: Optional[Parameter | SchemaBase | Map | TextBaseline_T] = Undefined, + blend: Optional[Parameter | SchemaBase | Map | Blend_T] = Undefined, + color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadiusBottomLeft: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cornerRadiusBottomRight: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cornerRadiusTopLeft: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadiusTopRight: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cursor: Optional[Parameter | SchemaBase | Map | Cursor_T] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + dir: Optional[Parameter | SchemaBase | Map | TextDirection_T] = Undefined, + dx: Optional[float | Parameter | SchemaBase | Map] = Undefined, + dy: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ellipsis: Optional[str | Parameter | SchemaBase | Map] = Undefined, + endAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + fill: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + filled: Optional[bool] = Undefined, + font: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined, + height: Optional[float | Parameter | SchemaBase | Map] = Undefined, + href: Optional[str | Parameter | SchemaBase | Map] = Undefined, + innerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[Parameter | SchemaBase | Map | Interpolate_T] = Undefined, + invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined, + limit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + lineBreak: Optional[str | Parameter | SchemaBase | Map] = Undefined, + lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + order: Optional[bool | None] = Undefined, + orient: Optional[SchemaBase | Orientation_T] = Undefined, + outerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + padAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radius2: Optional[float | Parameter | SchemaBase | Map] = Undefined, + shape: Optional[str | Parameter | SchemaBase | Map] = Undefined, + size: Optional[float | Parameter | SchemaBase | Map] = Undefined, + smooth: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + startAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + stroke: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + strokeDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined, + strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tension: Optional[float | Parameter | SchemaBase | Map] = Undefined, + text: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined, + theta: Optional[float | Parameter | SchemaBase | Map] = Undefined, + theta2: Optional[float | Parameter | SchemaBase | Map] = Undefined, + timeUnitBandPosition: Optional[float] = Undefined, + timeUnitBandSize: Optional[float] = Undefined, + tooltip: Optional[ + str | bool | float | Parameter | SchemaBase | Map | None + ] = Undefined, + url: Optional[str | Parameter | SchemaBase | Map] = Undefined, + width: Optional[float | Parameter | SchemaBase | Map] = Undefined, + x: Optional[ + float | Parameter | SchemaBase | Literal["width"] | Map + ] = Undefined, + x2: Optional[ + float | Parameter | SchemaBase | Literal["width"] | Map + ] = Undefined, + y: Optional[ + float | Parameter | SchemaBase | Literal["height"] | Map + ] = Undefined, + y2: Optional[ + float | Parameter | SchemaBase | Literal["height"] | Map + ] = Undefined, + **kwds, + ): + super().__init__( + align=align, + angle=angle, + aria=aria, + ariaRole=ariaRole, + ariaRoleDescription=ariaRoleDescription, + aspect=aspect, + baseline=baseline, + blend=blend, + color=color, + cornerRadius=cornerRadius, + cornerRadiusBottomLeft=cornerRadiusBottomLeft, + cornerRadiusBottomRight=cornerRadiusBottomRight, + cornerRadiusTopLeft=cornerRadiusTopLeft, + cornerRadiusTopRight=cornerRadiusTopRight, + cursor=cursor, + description=description, + dir=dir, + dx=dx, + dy=dy, + ellipsis=ellipsis, + endAngle=endAngle, + fill=fill, + fillOpacity=fillOpacity, + filled=filled, + font=font, + fontSize=fontSize, + fontStyle=fontStyle, + fontWeight=fontWeight, + height=height, + href=href, + innerRadius=innerRadius, + interpolate=interpolate, + invalid=invalid, + limit=limit, + lineBreak=lineBreak, + lineHeight=lineHeight, + opacity=opacity, + order=order, + orient=orient, + outerRadius=outerRadius, + padAngle=padAngle, + radius=radius, + radius2=radius2, + shape=shape, + size=size, + smooth=smooth, + startAngle=startAngle, + stroke=stroke, + strokeCap=strokeCap, + strokeDash=strokeDash, + strokeDashOffset=strokeDashOffset, + strokeJoin=strokeJoin, + strokeMiterLimit=strokeMiterLimit, + strokeOffset=strokeOffset, + strokeOpacity=strokeOpacity, + strokeWidth=strokeWidth, + tension=tension, + text=text, + theta=theta, + theta2=theta2, + timeUnitBandPosition=timeUnitBandPosition, + timeUnitBandSize=timeUnitBandSize, + tooltip=tooltip, + url=url, + width=width, + x=x, + x2=x2, + y=y, + y2=y2, + **kwds, + ) + + +class MarkDef(AnyMark): + """ + MarkDef schema wrapper. + + Parameters + ---------- + type : :class:`Mark`, Literal['arc', 'area', 'bar', 'image', 'line', 'point', 'rect', 'rule', 'text', 'tick', 'trail', 'circle', 'square', 'geoshape'] + The mark type. This could a primitive mark type (one of ``"bar"``, ``"circle"``, + ``"square"``, ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"geoshape"``, + ``"rule"``, and ``"text"``) or a composite mark type (``"boxplot"``, + ``"errorband"``, ``"errorbar"``). + align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right'] + The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). + One of ``"left"``, ``"right"``, ``"center"``. + + **Note:** Expression reference is *not* supported for range marks. + angle : dict, float, :class:`ExprRef` + The rotation angle of the text, in degrees. + aria : bool, dict, :class:`ExprRef` + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG element, removing the mark item from the ARIA accessibility tree. + ariaRole : str, dict, :class:`ExprRef` + Sets the type of user interface element of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "role" attribute. Warning: this + property is experimental and may be changed in the future. + ariaRoleDescription : str, dict, :class:`ExprRef` + A human-readable, author-localized description for the role of the mark item for + `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "aria-roledescription" attribute. + Warning: this property is experimental and may be changed in the future. + aspect : bool, dict, :class:`ExprRef` + Whether to keep aspect ratio of image marks. + bandSize : float + The width of the ticks. + + **Default value:** 3/4 of step (width step for horizontal ticks and height step for + vertical ticks). + baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + For text marks, the vertical text baseline. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an + expression reference that provides one of the valid values. The ``"line-top"`` and + ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are + calculated relative to the ``lineHeight`` rather than ``fontSize`` alone. + + For range marks, the vertical alignment of the marks. One of ``"top"``, + ``"middle"``, ``"bottom"``. + + **Note:** Expression reference is *not* supported for range marks. + binSpacing : float + Offset between bars for binned field. The ideal value for this is either 0 + (preferred by statisticians) or 1 (Vega-Lite default, D3 example style). + + **Default value:** ``1`` + blend : dict, :class:`Blend`, :class:`ExprRef`, Literal[None, 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'] + The color blend mode for drawing an item on its current background. Any valid `CSS + mix-blend-mode `__ + value can be used. + + __Default value:__ ``"source-over"`` + clip : bool, dict, :class:`ExprRef` + Whether a mark be clipped to the enclosing group's width and height. + color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + continuousBandSize : float + The default size of the bars on continuous scales. + + **Default value:** ``5`` + cornerRadius : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles or arcs' corners. + + **Default value:** ``0`` + cornerRadiusBottomLeft : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' bottom left corner. + + **Default value:** ``0`` + cornerRadiusBottomRight : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' bottom right corner. + + **Default value:** ``0`` + cornerRadiusEnd : dict, float, :class:`ExprRef` + * For vertical bars, top-left and top-right corner radius. + + * For horizontal bars, top-right and bottom-right corner radius. + cornerRadiusTopLeft : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' top right corner. + + **Default value:** ``0`` + cornerRadiusTopRight : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' top left corner. + + **Default value:** ``0`` + cursor : dict, :class:`Cursor`, :class:`ExprRef`, Literal['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', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing'] + The mouse cursor used over the mark. Any valid `CSS cursor type + `__ can be used. + description : str, dict, :class:`ExprRef` + A text description of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the `"aria-label" attribute + `__. + dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl'] + The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` + (right-to-left). This property determines on which side is truncated in response to + the limit parameter. + + **Default value:** ``"ltr"`` + discreteBandSize : dict, float, :class:`RelativeBandSize` + The default size of the bars with discrete dimensions. If unspecified, the default + size is ``step-2``, which provides 2 pixel offset between bars. + dx : dict, float, :class:`ExprRef` + The horizontal offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + dy : dict, float, :class:`ExprRef` + The vertical offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + ellipsis : str, dict, :class:`ExprRef` + The ellipsis string for text truncated in response to the limit parameter. + + **Default value:** ``"…"`` + fill : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default fill color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove fill. + + **Default value:** (None) + fillOpacity : dict, float, :class:`ExprRef` + The fill opacity (value between [0,1]). + + **Default value:** ``1`` + filled : bool + Whether the mark's color should be used as fill color instead of stroke color. + + **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well + as ``geoshape`` marks for `graticule + `__ data sources; + otherwise, ``true``. + + **Note:** This property cannot be used in a `style config + `__. + font : str, dict, :class:`ExprRef` + The typeface to set the text in (e.g., ``"Helvetica Neue"``). + fontSize : dict, float, :class:`ExprRef` + The font size, in pixels. + + **Default value:** ``11`` + fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + The font style (e.g., ``"italic"``). + fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a + number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and + ``"bold"`` = ``700``). + height : dict, float, :class:`ExprRef`, :class:`RelativeBandSize` + Height of the marks. One of: + + * A number representing a fixed pixel height. + + * A relative band size definition. For example, ``{band: 0.5}`` represents half of + the band + href : str, dict, :class:`URI`, :class:`ExprRef` + A URL to load upon mouse click. If defined, the mark acts as a hyperlink. + innerRadius : dict, float, :class:`ExprRef` + The inner radius in pixels of arc marks. ``innerRadius`` is an alias for + ``radius2``. + + **Default value:** ``0`` + interpolate : dict, :class:`ExprRef`, :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after'] + The line interpolation method to use for line and area marks. One of the following: + + * ``"linear"``: piecewise linear segments, as in a polyline. + * ``"linear-closed"``: close the linear segments to form a polygon. + * ``"step"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"step-before"``: alternate between vertical and horizontal segments, as in a + step function. + * ``"step-after"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"basis"``: a B-spline, with control point duplication on the ends. + * ``"basis-open"``: an open B-spline; may not intersect the start or end. + * ``"basis-closed"``: a closed B-spline, as in a loop. + * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends. + * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end, + but will intersect other control points. + * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop. + * ``"bundle"``: equivalent to basis, except the tension parameter is used to + straighten the spline. + * ``"monotone"``: cubic interpolation that preserves monotonicity in y. + invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None + Invalid data mode, which defines how the marks and corresponding scales should + represent invalid values (``null`` and ``NaN`` in continuous scales *without* + defined output for invalid values). + + * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and + *scales*. For path marks (for line, area, trail), this option will create paths + that connect valid points, as if the data rows with invalid values do not exist. + + * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at + invalid values. For non-path marks, this is equivalent to ``"filter"``. All + *scale* domains will *exclude* these filtered data points. + + * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid + values. Hide invalid values for non-path marks. All *scale* domains will + *include* these filtered data points (for both path and non-path marks). + + * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each + scale will use the output for invalid values defined in ``config.scale.invalid`` + or, if unspecified, by default invalid values will produce the same visual values + as zero (if the scale includes zero) or the minimum value (if the scale does not + include zero). + + * ``"break-paths-show-path-domains"`` (default) — This is equivalent to + ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and + ``"filter"`` for non-path marks. + + **Note**: If any channel's scale has an output for invalid values defined in + ``config.scale.invalid``, all values for the scales will be considered "valid" since + they can produce a reasonable output for the scales. Thus, fields for such channels + will not be filtered and will not cause path breaks. + limit : dict, float, :class:`ExprRef` + The maximum length of the text mark in pixels. The text value will be automatically + truncated if the rendered size exceeds the limit. + + **Default value:** ``0`` -- indicating no limit + line : bool, dict, :class:`OverlayMarkDef` + A flag for overlaying line on top of area marks, or an object defining the + properties of the overlayed lines. + + * If this value is an empty object (``{}``) or ``true``, lines with default + properties will be used. + + * If this value is ``false``, no lines would be automatically added to area marks. + + **Default value:** ``false``. + lineBreak : str, dict, :class:`ExprRef` + A delimiter, such as a newline character, upon which to break text strings into + multiple lines. This property is ignored if the text is array-valued. + lineHeight : dict, float, :class:`ExprRef` + The line height in pixels (the spacing between subsequent lines of text) for + multi-line text marks. + minBandSize : dict, float, :class:`ExprRef` + The minimum band size for bar and rectangle marks. **Default value:** ``0.25`` + opacity : dict, float, :class:`ExprRef` + The overall opacity (value between [0,1]). + + **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, + ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. + order : bool, None + For line and trail marks, this ``order`` property can be set to ``null`` or + ``false`` to make the lines use the original order in the data sources. + orient : :class:`Orientation`, Literal['horizontal', 'vertical'] + The orientation of a non-stacked bar, tick, area, and line charts. The value is + either horizontal (default) or vertical. + + * For bar, rule and tick, this determines whether the size of the bar and tick + should be applied to x or y dimension. + * For area, this property determines the orient property of the Vega output. + * For line and trail marks, this property determines the sort order of the points in + the line if ``config.sortLineBy`` is not specified. For stacked charts, this is + always determined by the orientation of the stack; therefore explicitly specified + value will be ignored. + outerRadius : dict, float, :class:`ExprRef` + The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``. + + **Default value:** ``0`` + padAngle : dict, float, :class:`ExprRef` + The angular padding applied to sides of the arc, in radians. + point : bool, dict, Literal['transparent'], :class:`OverlayMarkDef` + A flag for overlaying points on top of line or area marks, or an object defining the + properties of the overlayed points. + + * If this property is ``"transparent"``, transparent points will be used (for + enhancing tooltips and selections). + + * If this property is an empty object (``{}``) or ``true``, filled points with + default properties will be used. + + * If this property is ``false``, no points would be automatically added to line or + area marks. + + **Default value:** ``false``. + radius : dict, float, :class:`ExprRef` + For arc mark, the primary (outer) radius in pixels. + + For text marks, polar coordinate radial offset, in pixels, of the text from the + origin determined by the ``x`` and ``y`` properties. + + **Default value:** ``min(plot_width, plot_height)/2`` + radius2 : dict, float, :class:`ExprRef` + The secondary (inner) radius in pixels of arc marks. + + **Default value:** ``0`` + radius2Offset : dict, float, :class:`ExprRef` + Offset for radius2. + radiusOffset : dict, float, :class:`ExprRef` + Offset for radius. + shape : str, dict, :class:`ExprRef`, :class:`SymbolShape` + Shape of the point marks. Supported values include: + + * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, + ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or + ``"triangle-left"``. + * the line symbol ``"stroke"`` + * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` + * a custom `SVG path string + `__ (For correct + sizing, custom shape paths should be defined within a square bounding box with + coordinates ranging from -1 to 1 along both the x and y dimensions.) + + **Default value:** ``"circle"`` + size : dict, float, :class:`ExprRef` + Default size for marks. + + * For ``point``/``circle``/``square``, this represents the pixel area of the marks. + Note that this value sets the area of the symbol; the side lengths will increase + with the square root of this value. + * For ``bar``, this represents the band size of the bar, in pixels. + * For ``text``, this represents the font size, in pixels. + + **Default value:** + + * ``30`` for point, circle, square marks; width/height's ``step`` + * ``2`` for bar marks with discrete dimensions; + * ``5`` for bar marks with continuous dimensions; + * ``11`` for text marks. + smooth : bool, dict, :class:`ExprRef` + A boolean flag (default true) indicating if the image should be smoothed when + resized. If false, individual pixels should be scaled directly rather than + interpolated with smoothing. For SVG rendering, this option may not work in some + browsers due to lack of standardization. + stroke : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default stroke color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove stroke. + + **Default value:** (None) + strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square'] + The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or + ``"square"``. + + **Default value:** ``"butt"`` + strokeDash : dict, Sequence[float], :class:`ExprRef` + An array of alternating stroke, space lengths for creating dashed or dotted lines. + strokeDashOffset : dict, float, :class:`ExprRef` + The offset (in pixels) into which to begin drawing with the stroke dash array. + strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel'] + The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. + + **Default value:** ``"miter"`` + strokeMiterLimit : dict, float, :class:`ExprRef` + The miter limit at which to bevel a line join. + strokeOffset : dict, float, :class:`ExprRef` + The offset in pixels at which to draw the group stroke and fill. If unspecified, the + default behavior is to dynamically offset stroked groups such that 1 pixel stroke + widths align with the pixel grid. + strokeOpacity : dict, float, :class:`ExprRef` + The stroke opacity (value between [0,1]). + + **Default value:** ``1`` + strokeWidth : dict, float, :class:`ExprRef` + The stroke width, in pixels. + style : str, Sequence[str] + 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 ``config.style.foo`` (the specified style ``"foo"`` has + higher precedence). + tension : dict, float, :class:`ExprRef` + Depending on the interpolation type, sets the tension parameter (for line and area + marks). + text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef` + Placeholder text if the ``text`` channel is not specified + theta : dict, float, :class:`ExprRef` + * For arc marks, the arc length in radians if theta2 is not specified, otherwise the + start arc angle. (A value of 0 indicates up or “north”, increasing values proceed + clockwise.) + + * For text marks, polar coordinate angle in radians. + theta2 : dict, float, :class:`ExprRef` + The end angle of arc marks in radians. A value of 0 indicates up or “north”, + increasing values proceed clockwise. + theta2Offset : dict, float, :class:`ExprRef` + Offset for theta2. + thetaOffset : dict, float, :class:`ExprRef` + Offset for theta. + thickness : float + Thickness of the tick mark. + + **Default value:** ``1`` + timeUnitBandPosition : float + Default relative band position for a time unit. If set to ``0``, the marks will be + positioned at the beginning of the time unit band step. If set to ``0.5``, the marks + will be positioned in the middle of the time unit band step. + timeUnitBandSize : float + Default relative band size for a time unit. If set to ``1``, the bandwidth of the + marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the + marks will be half of the time unit band step. + tooltip : str, bool, dict, float, :class:`ExprRef`, :class:`TooltipContent`, None + The tooltip text string to show upon mouse hover or an object defining which fields + should the tooltip be derived from. + + * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from + ``encoding`` will be used. + * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the + highlighted data point will be used. + * If set to ``null`` or ``false``, then no tooltip will be used. + + See the `tooltip `__ + documentation for a detailed discussion about tooltip in Vega-Lite. + + **Default value:** ``null`` + url : str, dict, :class:`URI`, :class:`ExprRef` + The URL of the image file for image marks. + width : dict, float, :class:`ExprRef`, :class:`RelativeBandSize` + Width of the marks. One of: + + * A number representing a fixed pixel width. + + * A relative band size definition. For example, ``{band: 0.5}`` represents half of + the band. + x : dict, float, :class:`ExprRef`, Literal['width'] + X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without + specified ``x2`` or ``width``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2 : dict, float, :class:`ExprRef`, Literal['width'] + X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2Offset : dict, float, :class:`ExprRef` + Offset for x2-position. + xOffset : dict, float, :class:`ExprRef` + Offset for x-position. + y : dict, float, :class:`ExprRef`, Literal['height'] + Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without + specified ``y2`` or ``height``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2 : dict, float, :class:`ExprRef`, Literal['height'] + Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2Offset : dict, float, :class:`ExprRef` + Offset for y2-position. + yOffset : dict, float, :class:`ExprRef` + Offset for y-position. + """ + + _schema = {"$ref": "#/definitions/MarkDef"} + + def __init__( + self, + type: Optional[SchemaBase | Mark_T] = Undefined, + align: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + angle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ariaRole: Optional[str | Parameter | SchemaBase | Map] = Undefined, + ariaRoleDescription: Optional[str | Parameter | SchemaBase | Map] = Undefined, + aspect: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + bandSize: Optional[float] = Undefined, + baseline: Optional[Parameter | SchemaBase | Map | TextBaseline_T] = Undefined, + binSpacing: Optional[float] = Undefined, + blend: Optional[Parameter | SchemaBase | Map | Blend_T] = Undefined, + clip: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined, + continuousBandSize: Optional[float] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadiusBottomLeft: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cornerRadiusBottomRight: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cornerRadiusEnd: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadiusTopLeft: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadiusTopRight: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cursor: Optional[Parameter | SchemaBase | Map | Cursor_T] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + dir: Optional[Parameter | SchemaBase | Map | TextDirection_T] = Undefined, + discreteBandSize: Optional[float | SchemaBase | Map] = Undefined, + dx: Optional[float | Parameter | SchemaBase | Map] = Undefined, + dy: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ellipsis: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fill: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + filled: Optional[bool] = Undefined, + font: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined, + height: Optional[float | Parameter | SchemaBase | Map] = Undefined, + href: Optional[str | Parameter | SchemaBase | Map] = Undefined, + innerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[Parameter | SchemaBase | Map | Interpolate_T] = Undefined, + invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined, + limit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + line: Optional[bool | SchemaBase | Map] = Undefined, + lineBreak: Optional[str | Parameter | SchemaBase | Map] = Undefined, + lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + minBandSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + order: Optional[bool | None] = Undefined, + orient: Optional[SchemaBase | Orientation_T] = Undefined, + outerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + padAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + point: Optional[bool | SchemaBase | Literal["transparent"] | Map] = Undefined, + radius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radius2: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radius2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radiusOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + shape: Optional[str | Parameter | SchemaBase | Map] = Undefined, + size: Optional[float | Parameter | SchemaBase | Map] = Undefined, + smooth: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + stroke: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + strokeDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined, + strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + style: Optional[str | Sequence[str]] = Undefined, + tension: Optional[float | Parameter | SchemaBase | Map] = Undefined, + text: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined, + theta: Optional[float | Parameter | SchemaBase | Map] = Undefined, + theta2: Optional[float | Parameter | SchemaBase | Map] = Undefined, + theta2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + thetaOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + thickness: Optional[float] = Undefined, + timeUnitBandPosition: Optional[float] = Undefined, + timeUnitBandSize: Optional[float] = Undefined, + tooltip: Optional[ + str | bool | float | Parameter | SchemaBase | Map | None + ] = Undefined, + url: Optional[str | Parameter | SchemaBase | Map] = Undefined, + width: Optional[float | Parameter | SchemaBase | Map] = Undefined, + x: Optional[ + float | Parameter | SchemaBase | Literal["width"] | Map + ] = Undefined, + x2: Optional[ + float | Parameter | SchemaBase | Literal["width"] | Map + ] = Undefined, + x2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + xOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + y: Optional[ + float | Parameter | SchemaBase | Literal["height"] | Map + ] = Undefined, + y2: Optional[ + float | Parameter | SchemaBase | Literal["height"] | Map + ] = Undefined, + y2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + yOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + type=type, + align=align, + angle=angle, + aria=aria, + ariaRole=ariaRole, + ariaRoleDescription=ariaRoleDescription, + aspect=aspect, + bandSize=bandSize, + baseline=baseline, + binSpacing=binSpacing, + blend=blend, + clip=clip, + color=color, + continuousBandSize=continuousBandSize, + cornerRadius=cornerRadius, + cornerRadiusBottomLeft=cornerRadiusBottomLeft, + cornerRadiusBottomRight=cornerRadiusBottomRight, + cornerRadiusEnd=cornerRadiusEnd, + cornerRadiusTopLeft=cornerRadiusTopLeft, + cornerRadiusTopRight=cornerRadiusTopRight, + cursor=cursor, + description=description, + dir=dir, + discreteBandSize=discreteBandSize, + dx=dx, + dy=dy, + ellipsis=ellipsis, + fill=fill, + fillOpacity=fillOpacity, + filled=filled, + font=font, + fontSize=fontSize, + fontStyle=fontStyle, + fontWeight=fontWeight, + height=height, + href=href, + innerRadius=innerRadius, + interpolate=interpolate, + invalid=invalid, + limit=limit, + line=line, + lineBreak=lineBreak, + lineHeight=lineHeight, + minBandSize=minBandSize, + opacity=opacity, + order=order, + orient=orient, + outerRadius=outerRadius, + padAngle=padAngle, + point=point, + radius=radius, + radius2=radius2, + radius2Offset=radius2Offset, + radiusOffset=radiusOffset, + shape=shape, + size=size, + smooth=smooth, + stroke=stroke, + strokeCap=strokeCap, + strokeDash=strokeDash, + strokeDashOffset=strokeDashOffset, + strokeJoin=strokeJoin, + strokeMiterLimit=strokeMiterLimit, + strokeOffset=strokeOffset, + strokeOpacity=strokeOpacity, + strokeWidth=strokeWidth, + style=style, + tension=tension, + text=text, + theta=theta, + theta2=theta2, + theta2Offset=theta2Offset, + thetaOffset=thetaOffset, + thickness=thickness, + timeUnitBandPosition=timeUnitBandPosition, + timeUnitBandSize=timeUnitBandSize, + tooltip=tooltip, + url=url, + width=width, + x=x, + x2=x2, + x2Offset=x2Offset, + xOffset=xOffset, + y=y, + y2=y2, + y2Offset=y2Offset, + yOffset=yOffset, + **kwds, + ) + + +class MarkInvalidDataMode(VegaLiteSchema): + """MarkInvalidDataMode schema wrapper.""" + + _schema = {"$ref": "#/definitions/MarkInvalidDataMode"} + + def __init__(self, *args): + super().__init__(*args) + + +class MarkPropDefGradientstringnull(VegaLiteSchema): + """MarkPropDefGradientstringnull schema wrapper.""" + + _schema = {"$ref": "#/definitions/MarkPropDef<(Gradient|string|null)>"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class FieldOrDatumDefWithConditionDatumDefGradientstringnull( + ColorDef, MarkPropDefGradientstringnull +): + """ + FieldOrDatumDefWithConditionDatumDefGradientstringnull schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = { + "$ref": "#/definitions/FieldOrDatumDefWithCondition" + } + + def __init__( + self, + bandPosition: Optional[float] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + bandPosition=bandPosition, + condition=condition, + datum=datum, + title=title, + type=type, + **kwds, + ) + + +class FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull( + ColorDef, MarkPropDefGradientstringnull +): + r""" + FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + legend : dict, :class:`Legend`, None + An object defining properties of the legend. If ``null``, the legend for the + encoding channel will be removed. + + **Default value:** If undefined, default `legend properties + `__ are applied. + + **See also:** `legend `__ + documentation. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = { + "$ref": "#/definitions/FieldOrDatumDefWithCondition" + } + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + legend=legend, + scale=scale, + sort=sort, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +class MarkPropDefnumber(VegaLiteSchema): + """MarkPropDefnumber schema wrapper.""" + + _schema = {"$ref": "#/definitions/MarkPropDef"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class MarkPropDefnumberArray(VegaLiteSchema): + """MarkPropDefnumberArray schema wrapper.""" + + _schema = {"$ref": "#/definitions/MarkPropDef"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class MarkPropDefstringnullTypeForShape(VegaLiteSchema): + """MarkPropDefstringnullTypeForShape schema wrapper.""" + + _schema = {"$ref": "#/definitions/MarkPropDef<(string|null),TypeForShape>"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class MarkType(VegaLiteSchema): + """MarkType schema wrapper.""" + + _schema = {"$ref": "#/definitions/MarkType"} + + def __init__(self, *args): + super().__init__(*args) + + +class Month(VegaLiteSchema): + """Month schema wrapper.""" + + _schema = {"$ref": "#/definitions/Month"} + + def __init__(self, *args): + super().__init__(*args) + + +class MultiLineString(Geometry): + """ + MultiLineString schema wrapper. + + MultiLineString geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.5 + + Parameters + ---------- + coordinates : Sequence[Sequence[Sequence[float], :class:`Position`]] + + type : Literal['MultiLineString'] + Specifies the type of GeoJSON object. + bbox : :class:`BBox`, Sequence[float] + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + """ + + _schema = {"$ref": "#/definitions/MultiLineString"} + + def __init__( + self, + coordinates: Optional[ + Sequence[Sequence[SchemaBase | Sequence[float]]] + ] = Undefined, + type: Optional[Literal["MultiLineString"]] = Undefined, + bbox: Optional[SchemaBase | Sequence[float]] = Undefined, + **kwds, + ): + super().__init__(coordinates=coordinates, type=type, bbox=bbox, **kwds) + + +class MultiPoint(Geometry): + """ + MultiPoint schema wrapper. + + MultiPoint geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.3 + + Parameters + ---------- + coordinates : Sequence[Sequence[float], :class:`Position`] + + type : Literal['MultiPoint'] + Specifies the type of GeoJSON object. + bbox : :class:`BBox`, Sequence[float] + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + """ + + _schema = {"$ref": "#/definitions/MultiPoint"} + + def __init__( + self, + coordinates: Optional[Sequence[SchemaBase | Sequence[float]]] = Undefined, + type: Optional[Literal["MultiPoint"]] = Undefined, + bbox: Optional[SchemaBase | Sequence[float]] = Undefined, + **kwds, + ): + super().__init__(coordinates=coordinates, type=type, bbox=bbox, **kwds) + + +class MultiPolygon(Geometry): + """ + MultiPolygon schema wrapper. + + MultiPolygon geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.7 + + Parameters + ---------- + coordinates : Sequence[Sequence[Sequence[Sequence[float], :class:`Position`]]] + + type : Literal['MultiPolygon'] + Specifies the type of GeoJSON object. + bbox : :class:`BBox`, Sequence[float] + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + """ + + _schema = {"$ref": "#/definitions/MultiPolygon"} + + def __init__( + self, + coordinates: Optional[ + Sequence[Sequence[Sequence[SchemaBase | Sequence[float]]]] + ] = Undefined, + type: Optional[Literal["MultiPolygon"]] = Undefined, + bbox: Optional[SchemaBase | Sequence[float]] = Undefined, + **kwds, + ): + super().__init__(coordinates=coordinates, type=type, bbox=bbox, **kwds) + + +class NamedData(DataSource): + """ + NamedData schema wrapper. + + Parameters + ---------- + name : str + Provide a placeholder name and bind data at runtime. + + New data may change the layout but Vega does not always resize the chart. To update + the layout when the data updates, set `autosize + `__ or explicitly use + `view.resize `__. + format : dict, :class:`DataFormat`, :class:`CsvDataFormat`, :class:`DsvDataFormat`, :class:`JsonDataFormat`, :class:`TopoDataFormat` + An object that specifies the format for parsing the data. + """ + + _schema = {"$ref": "#/definitions/NamedData"} + + def __init__( + self, + name: Optional[str] = Undefined, + format: Optional[SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__(name=name, format=format, **kwds) + + +class NonArgAggregateOp(Aggregate): + """NonArgAggregateOp schema wrapper.""" + + _schema = {"$ref": "#/definitions/NonArgAggregateOp"} + + def __init__(self, *args): + super().__init__(*args) + + +class NonNormalizedSpec(VegaLiteSchema): + """ + NonNormalizedSpec schema wrapper. + + Any specification in Vega-Lite. + """ + + _schema = {"$ref": "#/definitions/NonNormalizedSpec"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class NumberLocale(VegaLiteSchema): + """ + NumberLocale schema wrapper. + + Locale definition for formatting numbers. + + Parameters + ---------- + currency : Sequence[str], :class:`Vector2string` + The currency prefix and suffix (e.g., ["$", ""]). + decimal : str + The decimal point (e.g., "."). + grouping : Sequence[float] + The array of group sizes (e.g., [3]), cycled as needed. + thousands : str + The group separator (e.g., ","). + minus : str + The minus sign (defaults to hyphen-minus, "-"). + nan : str + The not-a-number value (defaults to "NaN"). + numerals : Sequence[str], :class:`Vector10string` + An array of ten strings to replace the numerals 0-9. + percent : str + The percent sign (defaults to "%"). + """ + + _schema = {"$ref": "#/definitions/NumberLocale"} + + def __init__( + self, + currency: Optional[SchemaBase | Sequence[str]] = Undefined, + decimal: Optional[str] = Undefined, + grouping: Optional[Sequence[float]] = Undefined, + thousands: Optional[str] = Undefined, + minus: Optional[str] = Undefined, + nan: Optional[str] = Undefined, + numerals: Optional[SchemaBase | Sequence[str]] = Undefined, + percent: Optional[str] = Undefined, + **kwds, + ): + super().__init__( + currency=currency, + decimal=decimal, + grouping=grouping, + thousands=thousands, + minus=minus, + nan=nan, + numerals=numerals, + percent=percent, + **kwds, + ) + + +class NumericArrayMarkPropDef(VegaLiteSchema): + """NumericArrayMarkPropDef schema wrapper.""" + + _schema = {"$ref": "#/definitions/NumericArrayMarkPropDef"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class FieldOrDatumDefWithConditionDatumDefnumberArray( + MarkPropDefnumberArray, NumericArrayMarkPropDef +): + """ + FieldOrDatumDefWithConditionDatumDefnumberArray schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + condition : dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/FieldOrDatumDefWithCondition"} + + def __init__( + self, + bandPosition: Optional[float] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + bandPosition=bandPosition, + condition=condition, + datum=datum, + title=title, + type=type, + **kwds, + ) + + +class FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray( + MarkPropDefnumberArray, NumericArrayMarkPropDef +): + r""" + FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + legend : dict, :class:`Legend`, None + An object defining properties of the legend. If ``null``, the legend for the + encoding channel will be removed. + + **Default value:** If undefined, default `legend properties + `__ are applied. + + **See also:** `legend `__ + documentation. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = { + "$ref": "#/definitions/FieldOrDatumDefWithCondition" + } + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + legend=legend, + scale=scale, + sort=sort, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +class NumericMarkPropDef(VegaLiteSchema): + """NumericMarkPropDef schema wrapper.""" + + _schema = {"$ref": "#/definitions/NumericMarkPropDef"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class FieldOrDatumDefWithConditionDatumDefnumber(MarkPropDefnumber, NumericMarkPropDef): + """ + FieldOrDatumDefWithConditionDatumDefnumber schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/FieldOrDatumDefWithCondition"} + + def __init__( + self, + bandPosition: Optional[float] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + bandPosition=bandPosition, + condition=condition, + datum=datum, + title=title, + type=type, + **kwds, + ) + + +class FieldOrDatumDefWithConditionMarkPropFieldDefnumber( + MarkPropDefnumber, NumericMarkPropDef +): + r""" + FieldOrDatumDefWithConditionMarkPropFieldDefnumber schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + legend : dict, :class:`Legend`, None + An object defining properties of the legend. If ``null``, the legend for the + encoding channel will be removed. + + **Default value:** If undefined, default `legend properties + `__ are applied. + + **See also:** `legend `__ + documentation. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = { + "$ref": "#/definitions/FieldOrDatumDefWithCondition" + } + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + legend=legend, + scale=scale, + sort=sort, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +class OffsetDef(VegaLiteSchema): + """OffsetDef schema wrapper.""" + + _schema = {"$ref": "#/definitions/OffsetDef"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class OrderFieldDef(VegaLiteSchema): + r""" + OrderFieldDef schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + sort : :class:`SortOrder`, Literal['ascending', 'descending'] + The sort order. One of ``"ascending"`` (default) or ``"descending"``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/OrderFieldDef"} + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + sort: Optional[SchemaBase | SortOrder_T] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + sort=sort, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +class OrderOnlyDef(VegaLiteSchema): + """ + OrderOnlyDef schema wrapper. + + Parameters + ---------- + sort : :class:`SortOrder`, Literal['ascending', 'descending'] + The sort order. One of ``"ascending"`` (default) or ``"descending"``. + """ + + _schema = {"$ref": "#/definitions/OrderOnlyDef"} + + def __init__(self, sort: Optional[SchemaBase | SortOrder_T] = Undefined, **kwds): + super().__init__(sort=sort, **kwds) + + +class OrderValueDef(VegaLiteSchema): + """ + OrderValueDef schema wrapper. + + Parameters + ---------- + value : dict, float, :class:`ExprRef` + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + condition : dict, :class:`ConditionalValueDefnumber`, :class:`ConditionalParameterValueDefnumber`, :class:`ConditionalPredicateValueDefnumber`, Sequence[dict, :class:`ConditionalValueDefnumber`, :class:`ConditionalParameterValueDefnumber`, :class:`ConditionalPredicateValueDefnumber`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + """ + + _schema = {"$ref": "#/definitions/OrderValueDef"} + + def __init__( + self, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + **kwds, + ): + super().__init__(value=value, condition=condition, **kwds) + + +class Orient(VegaLiteSchema): + """Orient schema wrapper.""" + + _schema = {"$ref": "#/definitions/Orient"} + + def __init__(self, *args): + super().__init__(*args) + + +class Orientation(VegaLiteSchema): + """Orientation schema wrapper.""" + + _schema = {"$ref": "#/definitions/Orientation"} + + def __init__(self, *args): + super().__init__(*args) + + +class OverlayMarkDef(VegaLiteSchema): + """ + OverlayMarkDef schema wrapper. + + Parameters + ---------- + align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right'] + The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). + One of ``"left"``, ``"right"``, ``"center"``. + + **Note:** Expression reference is *not* supported for range marks. + angle : dict, float, :class:`ExprRef` + The rotation angle of the text, in degrees. + aria : bool, dict, :class:`ExprRef` + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG element, removing the mark item from the ARIA accessibility tree. + ariaRole : str, dict, :class:`ExprRef` + Sets the type of user interface element of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "role" attribute. Warning: this + property is experimental and may be changed in the future. + ariaRoleDescription : str, dict, :class:`ExprRef` + A human-readable, author-localized description for the role of the mark item for + `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "aria-roledescription" attribute. + Warning: this property is experimental and may be changed in the future. + aspect : bool, dict, :class:`ExprRef` + Whether to keep aspect ratio of image marks. + baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + For text marks, the vertical text baseline. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an + expression reference that provides one of the valid values. The ``"line-top"`` and + ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are + calculated relative to the ``lineHeight`` rather than ``fontSize`` alone. + + For range marks, the vertical alignment of the marks. One of ``"top"``, + ``"middle"``, ``"bottom"``. + + **Note:** Expression reference is *not* supported for range marks. + blend : dict, :class:`Blend`, :class:`ExprRef`, Literal[None, 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'] + The color blend mode for drawing an item on its current background. Any valid `CSS + mix-blend-mode `__ + value can be used. + + __Default value:__ ``"source-over"`` + clip : bool, dict, :class:`ExprRef` + Whether a mark be clipped to the enclosing group's width and height. + color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + cornerRadius : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles or arcs' corners. + + **Default value:** ``0`` + cornerRadiusBottomLeft : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' bottom left corner. + + **Default value:** ``0`` + cornerRadiusBottomRight : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' bottom right corner. + + **Default value:** ``0`` + cornerRadiusTopLeft : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' top right corner. + + **Default value:** ``0`` + cornerRadiusTopRight : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' top left corner. + + **Default value:** ``0`` + cursor : dict, :class:`Cursor`, :class:`ExprRef`, Literal['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', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing'] + The mouse cursor used over the mark. Any valid `CSS cursor type + `__ can be used. + description : str, dict, :class:`ExprRef` + A text description of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the `"aria-label" attribute + `__. + dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl'] + The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` + (right-to-left). This property determines on which side is truncated in response to + the limit parameter. + + **Default value:** ``"ltr"`` + dx : dict, float, :class:`ExprRef` + The horizontal offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + dy : dict, float, :class:`ExprRef` + The vertical offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + ellipsis : str, dict, :class:`ExprRef` + The ellipsis string for text truncated in response to the limit parameter. + + **Default value:** ``"…"`` + endAngle : dict, float, :class:`ExprRef` + The end angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + fill : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default fill color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove fill. + + **Default value:** (None) + fillOpacity : dict, float, :class:`ExprRef` + The fill opacity (value between [0,1]). + + **Default value:** ``1`` + filled : bool + Whether the mark's color should be used as fill color instead of stroke color. + + **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well + as ``geoshape`` marks for `graticule + `__ data sources; + otherwise, ``true``. + + **Note:** This property cannot be used in a `style config + `__. + font : str, dict, :class:`ExprRef` + The typeface to set the text in (e.g., ``"Helvetica Neue"``). + fontSize : dict, float, :class:`ExprRef` + The font size, in pixels. + + **Default value:** ``11`` + fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + The font style (e.g., ``"italic"``). + fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a + number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and + ``"bold"`` = ``700``). + height : dict, float, :class:`ExprRef` + Height of the marks. + href : str, dict, :class:`URI`, :class:`ExprRef` + A URL to load upon mouse click. If defined, the mark acts as a hyperlink. + innerRadius : dict, float, :class:`ExprRef` + The inner radius in pixels of arc marks. ``innerRadius`` is an alias for + ``radius2``. + + **Default value:** ``0`` + interpolate : dict, :class:`ExprRef`, :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after'] + The line interpolation method to use for line and area marks. One of the following: + + * ``"linear"``: piecewise linear segments, as in a polyline. + * ``"linear-closed"``: close the linear segments to form a polygon. + * ``"step"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"step-before"``: alternate between vertical and horizontal segments, as in a + step function. + * ``"step-after"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"basis"``: a B-spline, with control point duplication on the ends. + * ``"basis-open"``: an open B-spline; may not intersect the start or end. + * ``"basis-closed"``: a closed B-spline, as in a loop. + * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends. + * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end, + but will intersect other control points. + * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop. + * ``"bundle"``: equivalent to basis, except the tension parameter is used to + straighten the spline. + * ``"monotone"``: cubic interpolation that preserves monotonicity in y. + invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None + Invalid data mode, which defines how the marks and corresponding scales should + represent invalid values (``null`` and ``NaN`` in continuous scales *without* + defined output for invalid values). + + * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and + *scales*. For path marks (for line, area, trail), this option will create paths + that connect valid points, as if the data rows with invalid values do not exist. + + * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at + invalid values. For non-path marks, this is equivalent to ``"filter"``. All + *scale* domains will *exclude* these filtered data points. + + * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid + values. Hide invalid values for non-path marks. All *scale* domains will + *include* these filtered data points (for both path and non-path marks). + + * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each + scale will use the output for invalid values defined in ``config.scale.invalid`` + or, if unspecified, by default invalid values will produce the same visual values + as zero (if the scale includes zero) or the minimum value (if the scale does not + include zero). + + * ``"break-paths-show-path-domains"`` (default) — This is equivalent to + ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and + ``"filter"`` for non-path marks. + + **Note**: If any channel's scale has an output for invalid values defined in + ``config.scale.invalid``, all values for the scales will be considered "valid" since + they can produce a reasonable output for the scales. Thus, fields for such channels + will not be filtered and will not cause path breaks. + limit : dict, float, :class:`ExprRef` + The maximum length of the text mark in pixels. The text value will be automatically + truncated if the rendered size exceeds the limit. + + **Default value:** ``0`` -- indicating no limit + lineBreak : str, dict, :class:`ExprRef` + A delimiter, such as a newline character, upon which to break text strings into + multiple lines. This property is ignored if the text is array-valued. + lineHeight : dict, float, :class:`ExprRef` + The line height in pixels (the spacing between subsequent lines of text) for + multi-line text marks. + opacity : dict, float, :class:`ExprRef` + The overall opacity (value between [0,1]). + + **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, + ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. + order : bool, None + For line and trail marks, this ``order`` property can be set to ``null`` or + ``false`` to make the lines use the original order in the data sources. + orient : :class:`Orientation`, Literal['horizontal', 'vertical'] + The orientation of a non-stacked bar, tick, area, and line charts. The value is + either horizontal (default) or vertical. + + * For bar, rule and tick, this determines whether the size of the bar and tick + should be applied to x or y dimension. + * For area, this property determines the orient property of the Vega output. + * For line and trail marks, this property determines the sort order of the points in + the line if ``config.sortLineBy`` is not specified. For stacked charts, this is + always determined by the orientation of the stack; therefore explicitly specified + value will be ignored. + outerRadius : dict, float, :class:`ExprRef` + The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``. + + **Default value:** ``0`` + padAngle : dict, float, :class:`ExprRef` + The angular padding applied to sides of the arc, in radians. + radius : dict, float, :class:`ExprRef` + For arc mark, the primary (outer) radius in pixels. + + For text marks, polar coordinate radial offset, in pixels, of the text from the + origin determined by the ``x`` and ``y`` properties. + + **Default value:** ``min(plot_width, plot_height)/2`` + radius2 : dict, float, :class:`ExprRef` + The secondary (inner) radius in pixels of arc marks. + + **Default value:** ``0`` + radius2Offset : dict, float, :class:`ExprRef` + Offset for radius2. + radiusOffset : dict, float, :class:`ExprRef` + Offset for radius. + shape : str, dict, :class:`ExprRef`, :class:`SymbolShape` + Shape of the point marks. Supported values include: + + * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, + ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or + ``"triangle-left"``. + * the line symbol ``"stroke"`` + * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` + * a custom `SVG path string + `__ (For correct + sizing, custom shape paths should be defined within a square bounding box with + coordinates ranging from -1 to 1 along both the x and y dimensions.) + + **Default value:** ``"circle"`` + size : dict, float, :class:`ExprRef` + Default size for marks. + + * For ``point``/``circle``/``square``, this represents the pixel area of the marks. + Note that this value sets the area of the symbol; the side lengths will increase + with the square root of this value. + * For ``bar``, this represents the band size of the bar, in pixels. + * For ``text``, this represents the font size, in pixels. + + **Default value:** + + * ``30`` for point, circle, square marks; width/height's ``step`` + * ``2`` for bar marks with discrete dimensions; + * ``5`` for bar marks with continuous dimensions; + * ``11`` for text marks. + smooth : bool, dict, :class:`ExprRef` + A boolean flag (default true) indicating if the image should be smoothed when + resized. If false, individual pixels should be scaled directly rather than + interpolated with smoothing. For SVG rendering, this option may not work in some + browsers due to lack of standardization. + startAngle : dict, float, :class:`ExprRef` + The start angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + stroke : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default stroke color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove stroke. + + **Default value:** (None) + strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square'] + The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or + ``"square"``. + + **Default value:** ``"butt"`` + strokeDash : dict, Sequence[float], :class:`ExprRef` + An array of alternating stroke, space lengths for creating dashed or dotted lines. + strokeDashOffset : dict, float, :class:`ExprRef` + The offset (in pixels) into which to begin drawing with the stroke dash array. + strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel'] + The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. + + **Default value:** ``"miter"`` + strokeMiterLimit : dict, float, :class:`ExprRef` + The miter limit at which to bevel a line join. + strokeOffset : dict, float, :class:`ExprRef` + The offset in pixels at which to draw the group stroke and fill. If unspecified, the + default behavior is to dynamically offset stroked groups such that 1 pixel stroke + widths align with the pixel grid. + strokeOpacity : dict, float, :class:`ExprRef` + The stroke opacity (value between [0,1]). + + **Default value:** ``1`` + strokeWidth : dict, float, :class:`ExprRef` + The stroke width, in pixels. + style : str, Sequence[str] + 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 ``config.style.foo`` (the specified style ``"foo"`` has + higher precedence). + tension : dict, float, :class:`ExprRef` + Depending on the interpolation type, sets the tension parameter (for line and area + marks). + text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef` + Placeholder text if the ``text`` channel is not specified + theta : dict, float, :class:`ExprRef` + * For arc marks, the arc length in radians if theta2 is not specified, otherwise the + start arc angle. (A value of 0 indicates up or “north”, increasing values proceed + clockwise.) + + * For text marks, polar coordinate angle in radians. + theta2 : dict, float, :class:`ExprRef` + The end angle of arc marks in radians. A value of 0 indicates up or “north”, + increasing values proceed clockwise. + theta2Offset : dict, float, :class:`ExprRef` + Offset for theta2. + thetaOffset : dict, float, :class:`ExprRef` + Offset for theta. + timeUnitBandPosition : float + Default relative band position for a time unit. If set to ``0``, the marks will be + positioned at the beginning of the time unit band step. If set to ``0.5``, the marks + will be positioned in the middle of the time unit band step. + timeUnitBandSize : float + Default relative band size for a time unit. If set to ``1``, the bandwidth of the + marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the + marks will be half of the time unit band step. + tooltip : str, bool, dict, float, :class:`ExprRef`, :class:`TooltipContent`, None + The tooltip text string to show upon mouse hover or an object defining which fields + should the tooltip be derived from. + + * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from + ``encoding`` will be used. + * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the + highlighted data point will be used. + * If set to ``null`` or ``false``, then no tooltip will be used. + + See the `tooltip `__ + documentation for a detailed discussion about tooltip in Vega-Lite. + + **Default value:** ``null`` + url : str, dict, :class:`URI`, :class:`ExprRef` + The URL of the image file for image marks. + width : dict, float, :class:`ExprRef` + Width of the marks. + x : dict, float, :class:`ExprRef`, Literal['width'] + X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without + specified ``x2`` or ``width``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2 : dict, float, :class:`ExprRef`, Literal['width'] + X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2Offset : dict, float, :class:`ExprRef` + Offset for x2-position. + xOffset : dict, float, :class:`ExprRef` + Offset for x-position. + y : dict, float, :class:`ExprRef`, Literal['height'] + Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without + specified ``y2`` or ``height``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2 : dict, float, :class:`ExprRef`, Literal['height'] + Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2Offset : dict, float, :class:`ExprRef` + Offset for y2-position. + yOffset : dict, float, :class:`ExprRef` + Offset for y-position. + """ + + _schema = {"$ref": "#/definitions/OverlayMarkDef"} + + def __init__( + self, + align: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + angle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ariaRole: Optional[str | Parameter | SchemaBase | Map] = Undefined, + ariaRoleDescription: Optional[str | Parameter | SchemaBase | Map] = Undefined, + aspect: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + baseline: Optional[Parameter | SchemaBase | Map | TextBaseline_T] = Undefined, + blend: Optional[Parameter | SchemaBase | Map | Blend_T] = Undefined, + clip: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadiusBottomLeft: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cornerRadiusBottomRight: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cornerRadiusTopLeft: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadiusTopRight: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cursor: Optional[Parameter | SchemaBase | Map | Cursor_T] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + dir: Optional[Parameter | SchemaBase | Map | TextDirection_T] = Undefined, + dx: Optional[float | Parameter | SchemaBase | Map] = Undefined, + dy: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ellipsis: Optional[str | Parameter | SchemaBase | Map] = Undefined, + endAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + fill: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + filled: Optional[bool] = Undefined, + font: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined, + height: Optional[float | Parameter | SchemaBase | Map] = Undefined, + href: Optional[str | Parameter | SchemaBase | Map] = Undefined, + innerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[Parameter | SchemaBase | Map | Interpolate_T] = Undefined, + invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined, + limit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + lineBreak: Optional[str | Parameter | SchemaBase | Map] = Undefined, + lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + order: Optional[bool | None] = Undefined, + orient: Optional[SchemaBase | Orientation_T] = Undefined, + outerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + padAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radius2: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radius2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radiusOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + shape: Optional[str | Parameter | SchemaBase | Map] = Undefined, + size: Optional[float | Parameter | SchemaBase | Map] = Undefined, + smooth: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + startAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + stroke: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + strokeDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined, + strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + style: Optional[str | Sequence[str]] = Undefined, + tension: Optional[float | Parameter | SchemaBase | Map] = Undefined, + text: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined, + theta: Optional[float | Parameter | SchemaBase | Map] = Undefined, + theta2: Optional[float | Parameter | SchemaBase | Map] = Undefined, + theta2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + thetaOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + timeUnitBandPosition: Optional[float] = Undefined, + timeUnitBandSize: Optional[float] = Undefined, + tooltip: Optional[ + str | bool | float | Parameter | SchemaBase | Map | None + ] = Undefined, + url: Optional[str | Parameter | SchemaBase | Map] = Undefined, + width: Optional[float | Parameter | SchemaBase | Map] = Undefined, + x: Optional[ + float | Parameter | SchemaBase | Literal["width"] | Map + ] = Undefined, + x2: Optional[ + float | Parameter | SchemaBase | Literal["width"] | Map + ] = Undefined, + x2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + xOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + y: Optional[ + float | Parameter | SchemaBase | Literal["height"] | Map + ] = Undefined, + y2: Optional[ + float | Parameter | SchemaBase | Literal["height"] | Map + ] = Undefined, + y2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + yOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + align=align, + angle=angle, + aria=aria, + ariaRole=ariaRole, + ariaRoleDescription=ariaRoleDescription, + aspect=aspect, + baseline=baseline, + blend=blend, + clip=clip, + color=color, + cornerRadius=cornerRadius, + cornerRadiusBottomLeft=cornerRadiusBottomLeft, + cornerRadiusBottomRight=cornerRadiusBottomRight, + cornerRadiusTopLeft=cornerRadiusTopLeft, + cornerRadiusTopRight=cornerRadiusTopRight, + cursor=cursor, + description=description, + dir=dir, + dx=dx, + dy=dy, + ellipsis=ellipsis, + endAngle=endAngle, + fill=fill, + fillOpacity=fillOpacity, + filled=filled, + font=font, + fontSize=fontSize, + fontStyle=fontStyle, + fontWeight=fontWeight, + height=height, + href=href, + innerRadius=innerRadius, + interpolate=interpolate, + invalid=invalid, + limit=limit, + lineBreak=lineBreak, + lineHeight=lineHeight, + opacity=opacity, + order=order, + orient=orient, + outerRadius=outerRadius, + padAngle=padAngle, + radius=radius, + radius2=radius2, + radius2Offset=radius2Offset, + radiusOffset=radiusOffset, + shape=shape, + size=size, + smooth=smooth, + startAngle=startAngle, + stroke=stroke, + strokeCap=strokeCap, + strokeDash=strokeDash, + strokeDashOffset=strokeDashOffset, + strokeJoin=strokeJoin, + strokeMiterLimit=strokeMiterLimit, + strokeOffset=strokeOffset, + strokeOpacity=strokeOpacity, + strokeWidth=strokeWidth, + style=style, + tension=tension, + text=text, + theta=theta, + theta2=theta2, + theta2Offset=theta2Offset, + thetaOffset=thetaOffset, + timeUnitBandPosition=timeUnitBandPosition, + timeUnitBandSize=timeUnitBandSize, + tooltip=tooltip, + url=url, + width=width, + x=x, + x2=x2, + x2Offset=x2Offset, + xOffset=xOffset, + y=y, + y2=y2, + y2Offset=y2Offset, + yOffset=yOffset, + **kwds, + ) + + +class Padding(VegaLiteSchema): + """Padding schema wrapper.""" + + _schema = {"$ref": "#/definitions/Padding"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ParameterExtent(BinExtent): + """ParameterExtent schema wrapper.""" + + _schema = {"$ref": "#/definitions/ParameterExtent"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ParameterName(VegaLiteSchema): + """ParameterName schema wrapper.""" + + _schema = {"$ref": "#/definitions/ParameterName"} + + def __init__(self, *args): + super().__init__(*args) + + +class Parse(VegaLiteSchema): + """Parse schema wrapper.""" + + _schema = {"$ref": "#/definitions/Parse"} + + def __init__(self, **kwds): + super().__init__(**kwds) + + +class ParseValue(VegaLiteSchema): + """ParseValue schema wrapper.""" + + _schema = {"$ref": "#/definitions/ParseValue"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class Point(Geometry): + """ + Point schema wrapper. + + Point geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.2 + + Parameters + ---------- + coordinates : Sequence[float], :class:`Position` + A Position is an array of coordinates. + https://tools.ietf.org/html/rfc7946#section-3.1.1 Array should contain between two + and three elements. The previous GeoJSON specification allowed more elements (e.g., + which could be used to represent M values), but the current specification only + allows X, Y, and (optionally) Z to be defined. + type : Literal['Point'] + Specifies the type of GeoJSON object. + bbox : :class:`BBox`, Sequence[float] + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + """ + + _schema = {"$ref": "#/definitions/Point"} + + def __init__( + self, + coordinates: Optional[SchemaBase | Sequence[float]] = Undefined, + type: Optional[Literal["Point"]] = Undefined, + bbox: Optional[SchemaBase | Sequence[float]] = Undefined, + **kwds, + ): + super().__init__(coordinates=coordinates, type=type, bbox=bbox, **kwds) + + +class PointSelectionConfig(VegaLiteSchema): + """ + PointSelectionConfig schema wrapper. + + Parameters + ---------- + type : Literal['point'] + Determines the default event processing and data query for the selection. Vega-Lite + currently supports two selection types: + + * ``"point"`` -- to select multiple discrete data values; the first value is + selected on ``click`` and additional values toggled on shift-click. + * ``"interval"`` -- to select a continuous range of data values on ``drag``. + clear : str, bool, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream` + Clears the selection, emptying it of all values. This property can be a `Event + Stream `__ or ``false`` to disable + clear. + + **Default value:** ``dblclick``. + + **See also:** `clear examples + `__ in the + documentation. + encodings : Sequence[:class:`SingleDefUnitChannel`, Literal['x', 'y', 'xOffset', 'yOffset', 'x2', 'y2', 'longitude', 'latitude', 'longitude2', 'latitude2', 'theta', 'theta2', 'radius', 'radius2', 'color', 'fill', 'stroke', 'opacity', 'fillOpacity', 'strokeOpacity', 'strokeWidth', 'strokeDash', 'size', 'angle', 'shape', 'key', 'text', 'href', 'url', 'description']] + An array of encoding channels. The corresponding data field values must match for a + data tuple to fall within the selection. + + **See also:** The `projection with encodings and fields section + `__ in the + documentation. + fields : Sequence[str, :class:`FieldName`] + An array of field names whose values must match for a data tuple to fall within the + selection. + + **See also:** The `projection with encodings and fields section + `__ in the + documentation. + nearest : bool + When true, an invisible voronoi diagram is computed to accelerate discrete + selection. The data value *nearest* the mouse cursor is added to the selection. + + **Default value:** ``false``, which means that data values must be interacted with + directly (e.g., clicked on) to be added to the selection. + + **See also:** `nearest examples + `__ documentation. + on : str, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream` + A `Vega event stream `__ (object or + selector) that triggers the selection. For interval selections, the event stream + must specify a `start and end + `__. + + **See also:** `on examples + `__ in the documentation. + resolve : :class:`SelectionResolution`, Literal['global', 'union', 'intersect'] + With layered and multi-view displays, a strategy that determines how selections' + data queries are resolved when applied in a filter transform, conditional encoding + rule, or scale domain. + + One of: + + * ``"global"`` -- only one brush exists for the entire SPLOM. When the user begins + to drag, any previous brushes are cleared, and a new one is constructed. + * ``"union"`` -- each cell contains its own brush, and points are highlighted if + they lie within *any* of these individual brushes. + * ``"intersect"`` -- each cell contains its own brush, and points are highlighted + only if they fall within *all* of these individual brushes. + + **Default value:** ``global``. + + **See also:** `resolve examples + `__ in the + documentation. + toggle : str, bool + Controls whether data values should be toggled (inserted or removed from a point + selection) or only ever inserted into point selections. + + One of: + + * ``true`` -- the default behavior, which corresponds to ``"event.shiftKey"``. As a + result, data values are toggled when the user interacts with the shift-key + pressed. + * ``false`` -- disables toggling behaviour; the selection will only ever contain a + single data value corresponding to the most recent interaction. + * A `Vega expression `__ which is + re-evaluated as the user interacts. If the expression evaluates to ``true``, the + data value is toggled into or out of the point selection. If the expression + evaluates to ``false``, the point selection is first cleared, and the data value + is then inserted. For example, setting the value to the Vega expression ``"true"`` + will toggle data values without the user pressing the shift-key. + + **Default value:** ``true`` + + **See also:** `toggle examples + `__ in the + documentation. + """ + + _schema = {"$ref": "#/definitions/PointSelectionConfig"} + + def __init__( + self, + type: Optional[Literal["point"]] = Undefined, + clear: Optional[str | bool | SchemaBase | Map] = Undefined, + encodings: Optional[Sequence[SchemaBase | SingleDefUnitChannel_T]] = Undefined, + fields: Optional[Sequence[str | SchemaBase]] = Undefined, + nearest: Optional[bool] = Undefined, + on: Optional[str | SchemaBase | Map] = Undefined, + resolve: Optional[SchemaBase | SelectionResolution_T] = Undefined, + toggle: Optional[str | bool] = Undefined, + **kwds, + ): + super().__init__( + type=type, + clear=clear, + encodings=encodings, + fields=fields, + nearest=nearest, + on=on, + resolve=resolve, + toggle=toggle, + **kwds, + ) + + +class PointSelectionConfigWithoutType(VegaLiteSchema): + """ + PointSelectionConfigWithoutType schema wrapper. + + Parameters + ---------- + clear : str, bool, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream` + Clears the selection, emptying it of all values. This property can be a `Event + Stream `__ or ``false`` to disable + clear. + + **Default value:** ``dblclick``. + + **See also:** `clear examples + `__ in the + documentation. + encodings : Sequence[:class:`SingleDefUnitChannel`, Literal['x', 'y', 'xOffset', 'yOffset', 'x2', 'y2', 'longitude', 'latitude', 'longitude2', 'latitude2', 'theta', 'theta2', 'radius', 'radius2', 'color', 'fill', 'stroke', 'opacity', 'fillOpacity', 'strokeOpacity', 'strokeWidth', 'strokeDash', 'size', 'angle', 'shape', 'key', 'text', 'href', 'url', 'description']] + An array of encoding channels. The corresponding data field values must match for a + data tuple to fall within the selection. + + **See also:** The `projection with encodings and fields section + `__ in the + documentation. + fields : Sequence[str, :class:`FieldName`] + An array of field names whose values must match for a data tuple to fall within the + selection. + + **See also:** The `projection with encodings and fields section + `__ in the + documentation. + nearest : bool + When true, an invisible voronoi diagram is computed to accelerate discrete + selection. The data value *nearest* the mouse cursor is added to the selection. + + **Default value:** ``false``, which means that data values must be interacted with + directly (e.g., clicked on) to be added to the selection. + + **See also:** `nearest examples + `__ documentation. + on : str, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream` + A `Vega event stream `__ (object or + selector) that triggers the selection. For interval selections, the event stream + must specify a `start and end + `__. + + **See also:** `on examples + `__ in the documentation. + resolve : :class:`SelectionResolution`, Literal['global', 'union', 'intersect'] + With layered and multi-view displays, a strategy that determines how selections' + data queries are resolved when applied in a filter transform, conditional encoding + rule, or scale domain. + + One of: + + * ``"global"`` -- only one brush exists for the entire SPLOM. When the user begins + to drag, any previous brushes are cleared, and a new one is constructed. + * ``"union"`` -- each cell contains its own brush, and points are highlighted if + they lie within *any* of these individual brushes. + * ``"intersect"`` -- each cell contains its own brush, and points are highlighted + only if they fall within *all* of these individual brushes. + + **Default value:** ``global``. + + **See also:** `resolve examples + `__ in the + documentation. + toggle : str, bool + Controls whether data values should be toggled (inserted or removed from a point + selection) or only ever inserted into point selections. + + One of: + + * ``true`` -- the default behavior, which corresponds to ``"event.shiftKey"``. As a + result, data values are toggled when the user interacts with the shift-key + pressed. + * ``false`` -- disables toggling behaviour; the selection will only ever contain a + single data value corresponding to the most recent interaction. + * A `Vega expression `__ which is + re-evaluated as the user interacts. If the expression evaluates to ``true``, the + data value is toggled into or out of the point selection. If the expression + evaluates to ``false``, the point selection is first cleared, and the data value + is then inserted. For example, setting the value to the Vega expression ``"true"`` + will toggle data values without the user pressing the shift-key. + + **Default value:** ``true`` + + **See also:** `toggle examples + `__ in the + documentation. + """ + + _schema = {"$ref": "#/definitions/PointSelectionConfigWithoutType"} + + def __init__( + self, + clear: Optional[str | bool | SchemaBase | Map] = Undefined, + encodings: Optional[Sequence[SchemaBase | SingleDefUnitChannel_T]] = Undefined, + fields: Optional[Sequence[str | SchemaBase]] = Undefined, + nearest: Optional[bool] = Undefined, + on: Optional[str | SchemaBase | Map] = Undefined, + resolve: Optional[SchemaBase | SelectionResolution_T] = Undefined, + toggle: Optional[str | bool] = Undefined, + **kwds, + ): + super().__init__( + clear=clear, + encodings=encodings, + fields=fields, + nearest=nearest, + on=on, + resolve=resolve, + toggle=toggle, + **kwds, + ) + + +class PolarDef(VegaLiteSchema): + """PolarDef schema wrapper.""" + + _schema = {"$ref": "#/definitions/PolarDef"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class Polygon(Geometry): + """ + Polygon schema wrapper. + + Polygon geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.6 + + Parameters + ---------- + coordinates : Sequence[Sequence[Sequence[float], :class:`Position`]] + + type : Literal['Polygon'] + Specifies the type of GeoJSON object. + bbox : :class:`BBox`, Sequence[float] + Bounding box of the coordinate range of the object's Geometries, Features, or + Feature Collections. https://tools.ietf.org/html/rfc7946#section-5 + """ + + _schema = {"$ref": "#/definitions/Polygon"} + + def __init__( + self, + coordinates: Optional[ + Sequence[Sequence[SchemaBase | Sequence[float]]] + ] = Undefined, + type: Optional[Literal["Polygon"]] = Undefined, + bbox: Optional[SchemaBase | Sequence[float]] = Undefined, + **kwds, + ): + super().__init__(coordinates=coordinates, type=type, bbox=bbox, **kwds) + + +class Position(VegaLiteSchema): + """ + Position schema wrapper. + + A Position is an array of coordinates. https://tools.ietf.org/html/rfc7946#section-3.1.1 + Array should contain between two and three elements. The previous GeoJSON specification + allowed more elements (e.g., which could be used to represent M values), but the current + specification only allows X, Y, and (optionally) Z to be defined. + """ + + _schema = {"$ref": "#/definitions/Position"} + + def __init__(self, *args): + super().__init__(*args) + + +class Position2Def(VegaLiteSchema): + """Position2Def schema wrapper.""" + + _schema = {"$ref": "#/definitions/Position2Def"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class DatumDef(LatLongDef, Position2Def): + """ + DatumDef schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/DatumDef"} + + def __init__( + self, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + bandPosition=bandPosition, datum=datum, title=title, type=type, **kwds + ) + + +class PositionDatumDefBase(PolarDef): + """ + PositionDatumDefBase schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None + Type of stacking offset if the field should be stacked. ``stack`` is only applicable + for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For + example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar + chart. + + ``stack`` can be one of the following values: + + * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale + (for creating typical stacked `bar + `__ and `area + `__ chart). + * ``"normalize"`` - stacking with normalized domain (for creating `normalized + stacked bar and area charts + `__ and pie charts + `with percentage tooltip + `__). + * ``"center"`` - stacking with center baseline (for `streamgraph + `__). + * ``null`` or ``false`` - No-stacking. This will produce layered `bar + `__ and area + chart. + + **Default value:** ``zero`` for plots with all of the following conditions are true: + (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or + y) has a linear scale; (3) At least one of non-position channels mapped to an + unaggregated field that is different from x and y. Otherwise, ``null`` by default. + + **See also:** `stack `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/PositionDatumDefBase"} + + def __init__( + self, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + bandPosition=bandPosition, + datum=datum, + scale=scale, + stack=stack, + title=title, + type=type, + **kwds, + ) + + +class PositionDef(VegaLiteSchema): + """PositionDef schema wrapper.""" + + _schema = {"$ref": "#/definitions/PositionDef"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class PositionDatumDef(PositionDef): + """ + PositionDatumDef schema wrapper. + + Parameters + ---------- + axis : dict, :class:`Axis`, None + An object defining properties of axis's gridlines, ticks and labels. If ``null``, + the axis for the encoding channel will be removed. + + **Default value:** If undefined, default `axis properties + `__ are applied. + + **See also:** `axis `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + impute : dict, :class:`ImputeParams`, None + An object defining the properties of the Impute Operation to be applied. The field + value of the other positional channel is taken as ``key`` of the ``Impute`` + Operation. The field of the ``color`` channel if specified is used as ``groupby`` of + the ``Impute`` Operation. + + **See also:** `impute `__ + documentation. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None + Type of stacking offset if the field should be stacked. ``stack`` is only applicable + for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For + example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar + chart. + + ``stack`` can be one of the following values: + + * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale + (for creating typical stacked `bar + `__ and `area + `__ chart). + * ``"normalize"`` - stacking with normalized domain (for creating `normalized + stacked bar and area charts + `__ and pie charts + `with percentage tooltip + `__). + * ``"center"`` - stacking with center baseline (for `streamgraph + `__). + * ``null`` or ``false`` - No-stacking. This will produce layered `bar + `__ and area + chart. + + **Default value:** ``zero`` for plots with all of the following conditions are true: + (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or + y) has a linear scale; (3) At least one of non-position channels mapped to an + unaggregated field that is different from x and y. Otherwise, ``null`` by default. + + **See also:** `stack `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/PositionDatumDef"} + + def __init__( + self, + axis: Optional[SchemaBase | Map | None] = Undefined, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + impute: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + axis=axis, + bandPosition=bandPosition, + datum=datum, + impute=impute, + scale=scale, + stack=stack, + title=title, + type=type, + **kwds, + ) + + +class PositionFieldDef(PositionDef): + r""" + PositionFieldDef schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + axis : dict, :class:`Axis`, None + An object defining properties of axis's gridlines, ticks and labels. If ``null``, + the axis for the encoding channel will be removed. + + **Default value:** If undefined, default `axis properties + `__ are applied. + + **See also:** `axis `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + impute : dict, :class:`ImputeParams`, None + An object defining the properties of the Impute Operation to be applied. The field + value of the other positional channel is taken as ``key`` of the ``Impute`` + Operation. The field of the ``color`` channel if specified is used as ``groupby`` of + the ``Impute`` Operation. + + **See also:** `impute `__ + documentation. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None + Type of stacking offset if the field should be stacked. ``stack`` is only applicable + for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For + example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar + chart. + + ``stack`` can be one of the following values: + + * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale + (for creating typical stacked `bar + `__ and `area + `__ chart). + * ``"normalize"`` - stacking with normalized domain (for creating `normalized + stacked bar and area charts + `__ and pie charts + `with percentage tooltip + `__). + * ``"center"`` - stacking with center baseline (for `streamgraph + `__). + * ``null`` or ``false`` - No-stacking. This will produce layered `bar + `__ and area + chart. + + **Default value:** ``zero`` for plots with all of the following conditions are true: + (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or + y) has a linear scale; (3) At least one of non-position channels mapped to an + unaggregated field that is different from x and y. Otherwise, ``null`` by default. + + **See also:** `stack `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/PositionFieldDef"} + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + axis: Optional[SchemaBase | Map | None] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + impute: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + axis=axis, + bandPosition=bandPosition, + bin=bin, + field=field, + impute=impute, + scale=scale, + sort=sort, + stack=stack, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +class PositionFieldDefBase(PolarDef): + r""" + PositionFieldDefBase schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None + Type of stacking offset if the field should be stacked. ``stack`` is only applicable + for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For + example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar + chart. + + ``stack`` can be one of the following values: + + * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale + (for creating typical stacked `bar + `__ and `area + `__ chart). + * ``"normalize"`` - stacking with normalized domain (for creating `normalized + stacked bar and area charts + `__ and pie charts + `with percentage tooltip + `__). + * ``"center"`` - stacking with center baseline (for `streamgraph + `__). + * ``null`` or ``false`` - No-stacking. This will produce layered `bar + `__ and area + chart. + + **Default value:** ``zero`` for plots with all of the following conditions are true: + (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or + y) has a linear scale; (3) At least one of non-position channels mapped to an + unaggregated field that is different from x and y. Otherwise, ``null`` by default. + + **See also:** `stack `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/PositionFieldDefBase"} + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + scale=scale, + sort=sort, + stack=stack, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +class PositionValueDef(PolarDef, Position2Def, PositionDef): + """ + PositionValueDef schema wrapper. + + Definition object for a constant value (primitive value or gradient definition) of an + encoding channel. + + Parameters + ---------- + value : dict, float, :class:`ExprRef`, Literal['height', 'width'] + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _schema = {"$ref": "#/definitions/PositionValueDef"} + + def __init__( + self, + value: Optional[ + float | Parameter | SchemaBase | Literal["height", "width"] | Map + ] = Undefined, + **kwds, + ): + super().__init__(value=value, **kwds) + + +class PredicateComposition(VegaLiteSchema): + """PredicateComposition schema wrapper.""" + + _schema = {"$ref": "#/definitions/PredicateComposition"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + def __invert__(self) -> PredicateComposition: + return PredicateComposition({"not": self.to_dict()}) + + def __and__(self, other: SchemaBase) -> PredicateComposition: + return PredicateComposition({"and": [self.to_dict(), other.to_dict()]}) + + def __or__(self, other: SchemaBase) -> PredicateComposition: + return PredicateComposition({"or": [self.to_dict(), other.to_dict()]}) + + +class LogicalAndPredicate(PredicateComposition): + """ + LogicalAndPredicate schema wrapper. + + Parameters + ---------- + and : Sequence[str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`] + + """ + + _schema = {"$ref": "#/definitions/LogicalAnd"} + + def __init__(self, **kwds): + super().__init__(**kwds) + + +class LogicalNotPredicate(PredicateComposition): + """ + LogicalNotPredicate schema wrapper. + + Parameters + ---------- + not : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition` + + """ + + _schema = {"$ref": "#/definitions/LogicalNot"} + + def __init__(self, **kwds): + super().__init__(**kwds) + + +class LogicalOrPredicate(PredicateComposition): + """ + LogicalOrPredicate schema wrapper. + + Parameters + ---------- + or : Sequence[str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`] + + """ + + _schema = {"$ref": "#/definitions/LogicalOr"} + + def __init__(self, **kwds): + super().__init__(**kwds) + + +class Predicate(PredicateComposition): + """Predicate schema wrapper.""" + + _schema = {"$ref": "#/definitions/Predicate"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class FieldEqualPredicate(Predicate): + """ + FieldEqualPredicate schema wrapper. + + Parameters + ---------- + equal : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime` + The value that the field should be equal to. + field : str, :class:`FieldName` + Field to be tested. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit for the field to be tested. + """ + + _schema = {"$ref": "#/definitions/FieldEqualPredicate"} + + def __init__( + self, + equal: Optional[ + str | bool | float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + field: Optional[str | SchemaBase] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + **kwds, + ): + super().__init__(equal=equal, field=field, timeUnit=timeUnit, **kwds) + + +class FieldGTEPredicate(Predicate): + """ + FieldGTEPredicate schema wrapper. + + Parameters + ---------- + field : str, :class:`FieldName` + Field to be tested. + gte : str, dict, float, :class:`ExprRef`, :class:`DateTime` + The value that the field should be greater than or equals to. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit for the field to be tested. + """ + + _schema = {"$ref": "#/definitions/FieldGTEPredicate"} + + def __init__( + self, + field: Optional[str | SchemaBase] = Undefined, + gte: Optional[ + str | float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + **kwds, + ): + super().__init__(field=field, gte=gte, timeUnit=timeUnit, **kwds) + + +class FieldGTPredicate(Predicate): + """ + FieldGTPredicate schema wrapper. + + Parameters + ---------- + field : str, :class:`FieldName` + Field to be tested. + gt : str, dict, float, :class:`ExprRef`, :class:`DateTime` + The value that the field should be greater than. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit for the field to be tested. + """ + + _schema = {"$ref": "#/definitions/FieldGTPredicate"} + + def __init__( + self, + field: Optional[str | SchemaBase] = Undefined, + gt: Optional[str | float | Temporal | Parameter | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + **kwds, + ): + super().__init__(field=field, gt=gt, timeUnit=timeUnit, **kwds) + + +class FieldLTEPredicate(Predicate): + """ + FieldLTEPredicate schema wrapper. + + Parameters + ---------- + field : str, :class:`FieldName` + Field to be tested. + lte : str, dict, float, :class:`ExprRef`, :class:`DateTime` + The value that the field should be less than or equals to. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit for the field to be tested. + """ + + _schema = {"$ref": "#/definitions/FieldLTEPredicate"} + + def __init__( + self, + field: Optional[str | SchemaBase] = Undefined, + lte: Optional[ + str | float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + **kwds, + ): + super().__init__(field=field, lte=lte, timeUnit=timeUnit, **kwds) + + +class FieldLTPredicate(Predicate): + """ + FieldLTPredicate schema wrapper. + + Parameters + ---------- + field : str, :class:`FieldName` + Field to be tested. + lt : str, dict, float, :class:`ExprRef`, :class:`DateTime` + The value that the field should be less than. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit for the field to be tested. + """ + + _schema = {"$ref": "#/definitions/FieldLTPredicate"} + + def __init__( + self, + field: Optional[str | SchemaBase] = Undefined, + lt: Optional[str | float | Temporal | Parameter | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + **kwds, + ): + super().__init__(field=field, lt=lt, timeUnit=timeUnit, **kwds) + + +class FieldOneOfPredicate(Predicate): + """ + FieldOneOfPredicate schema wrapper. + + Parameters + ---------- + field : str, :class:`FieldName` + Field to be tested. + oneOf : Sequence[str], Sequence[bool], Sequence[float], Sequence[dict, :class:`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 : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit for the field to be tested. + """ + + _schema = {"$ref": "#/definitions/FieldOneOfPredicate"} + + def __init__( + self, + field: Optional[str | SchemaBase] = Undefined, + oneOf: Optional[ + Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + **kwds, + ): + super().__init__(field=field, oneOf=oneOf, timeUnit=timeUnit, **kwds) + + +class FieldRangePredicate(Predicate): + """ + FieldRangePredicate schema wrapper. + + Parameters + ---------- + field : str, :class:`FieldName` + Field to be tested. + range : dict, :class:`ExprRef`, Sequence[dict, float, :class:`ExprRef`, :class:`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 : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit for the field to be tested. + """ + + _schema = {"$ref": "#/definitions/FieldRangePredicate"} + + def __init__( + self, + field: Optional[str | SchemaBase] = Undefined, + range: Optional[ + Parameter + | SchemaBase + | Sequence[float | Temporal | Parameter | SchemaBase | Map | None] + | Map + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + **kwds, + ): + super().__init__(field=field, range=range, timeUnit=timeUnit, **kwds) + + +class FieldValidPredicate(Predicate): + """ + FieldValidPredicate schema wrapper. + + Parameters + ---------- + field : str, :class:`FieldName` + Field to be tested. + valid : bool + If set to true the field's value has to be valid, meaning both not ``null`` and not + `NaN + `__. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit for the field to be tested. + """ + + _schema = {"$ref": "#/definitions/FieldValidPredicate"} + + def __init__( + self, + field: Optional[str | SchemaBase] = Undefined, + valid: Optional[bool] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + **kwds, + ): + super().__init__(field=field, valid=valid, timeUnit=timeUnit, **kwds) + + +class ParameterPredicate(Predicate): + """ + ParameterPredicate schema wrapper. + + Parameters + ---------- + param : str, :class:`ParameterName` + Filter using a parameter name. + empty : bool + For selection parameters, the predicate of empty selections returns true by default. + Override this behavior, by setting this property ``empty: false``. + """ + + _schema = {"$ref": "#/definitions/ParameterPredicate"} + + def __init__( + self, + param: Optional[str | SchemaBase] = Undefined, + empty: Optional[bool] = Undefined, + **kwds, + ): + super().__init__(param=param, empty=empty, **kwds) + + +class Projection(VegaLiteSchema): + """ + Projection schema wrapper. + + Parameters + ---------- + center : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number` + The projection's center, a two-element array of longitude and latitude in degrees. + + **Default value:** ``[0, 0]`` + clipAngle : dict, float, :class:`ExprRef` + The projection's clipping circle radius to the specified angle in degrees. If + ``null``, switches to `antimeridian `__ cutting + rather than small-circle clipping. + clipExtent : dict, :class:`ExprRef`, :class:`Vector2Vector2number`, Sequence[Sequence[float], :class:`Vector2number`] + The projection's viewport clip extent to the specified bounds in pixels. The extent + bounds are specified as an array ``[[x0, y0], [x1, y1]]``, where ``x0`` is the + left-side of the viewport, ``y0`` is the top, ``x1`` is the right and ``y1`` is the + bottom. If ``null``, no viewport clipping is performed. + coefficient : dict, float, :class:`ExprRef` + The coefficient parameter for the ``hammer`` projection. + + **Default value:** ``2`` + distance : dict, float, :class:`ExprRef` + For the ``satellite`` projection, the distance from the center of the sphere to the + point of view, as a proportion of the sphere's radius. The recommended maximum clip + angle for a given ``distance`` is acos(1 / distance) converted to degrees. If tilt + is also applied, then more conservative clipping may be necessary. + + **Default value:** ``2.0`` + extent : dict, :class:`ExprRef`, :class:`Vector2Vector2number`, Sequence[Sequence[float], :class:`Vector2number`] + + fit : dict, :class:`Fit`, :class:`ExprRef`, :class:`GeoJsonFeature`, :class:`GeoJsonFeatureCollection`, Sequence[dict, :class:`GeoJsonFeature`], Sequence[dict, :class:`Fit`, :class:`GeoJsonFeature`, :class:`GeoJsonFeatureCollection`, Sequence[dict, :class:`GeoJsonFeature`]] + + fraction : dict, float, :class:`ExprRef` + The fraction parameter for the ``bottomley`` projection. + + **Default value:** ``0.5``, corresponding to a sin(ψ) where ψ = π/6. + lobes : dict, float, :class:`ExprRef` + The number of lobes in projections that support multi-lobe views: ``berghaus``, + ``gingery``, or ``healpix``. The default value varies based on the projection type. + parallel : dict, float, :class:`ExprRef` + The parallel parameter for projections that support it: ``armadillo``, ``bonne``, + ``craig``, ``cylindricalEqualArea``, ``cylindricalStereographic``, + ``hammerRetroazimuthal``, ``loximuthal``, or ``rectangularPolyconic``. The default + value varies based on the projection type. + parallels : dict, Sequence[float], :class:`ExprRef` + For conic projections, the `two standard parallels + `__ that define the map layout. + The default depends on the specific conic projection used. + pointRadius : dict, float, :class:`ExprRef` + The default radius (in pixels) to use when drawing GeoJSON ``Point`` and + ``MultiPoint`` geometries. This parameter sets a constant default value. To modify + the point radius in response to data, see the corresponding parameter of the GeoPath + and GeoShape transforms. + + **Default value:** ``4.5`` + precision : dict, float, :class:`ExprRef` + The threshold for the projection's `adaptive resampling + `__ to the specified value in pixels. This + value corresponds to the `Douglas-Peucker distance + `__. + If precision is not specified, returns the projection's current resampling precision + which defaults to ``√0.5 ≅ 0.70710…``. + radius : dict, float, :class:`ExprRef` + The radius parameter for the ``airy`` or ``gingery`` projection. The default value + varies based on the projection type. + ratio : dict, float, :class:`ExprRef` + The ratio parameter for the ``hill``, ``hufnagel``, or ``wagner`` projections. The + default value varies based on the projection type. + reflectX : bool, dict, :class:`ExprRef` + Sets whether or not the x-dimension is reflected (negated) in the output. + reflectY : bool, dict, :class:`ExprRef` + Sets whether or not the y-dimension is reflected (negated) in the output. + rotate : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number`, :class:`Vector3number` + The projection's three-axis rotation to the specified angles, which must be a two- + or three-element array of numbers [``lambda``, ``phi``, ``gamma``] specifying the + rotation angles in degrees about each spherical axis. (These correspond to yaw, + pitch and roll.) + + **Default value:** ``[0, 0, 0]`` + scale : dict, float, :class:`ExprRef` + The projection's scale (zoom) factor, overriding automatic fitting. The default + scale is projection-specific. The scale factor corresponds linearly to the distance + between projected points; however, scale factor values are not equivalent across + projections. + size : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number` + Used in conjunction with fit, provides the width and height in pixels of the area to + which the projection should be automatically fit. + spacing : dict, float, :class:`ExprRef` + The spacing parameter for the ``lagrange`` projection. + + **Default value:** ``0.5`` + tilt : dict, float, :class:`ExprRef` + The tilt angle (in degrees) for the ``satellite`` projection. + + **Default value:** ``0``. + translate : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number` + The projection's translation offset as a two-element array ``[tx, ty]``. + type : dict, :class:`ExprRef`, :class:`ProjectionType`, Literal['albers', 'albersUsa', 'azimuthalEqualArea', 'azimuthalEquidistant', 'conicConformal', 'conicEqualArea', 'conicEquidistant', 'equalEarth', 'equirectangular', 'gnomonic', 'identity', 'mercator', 'naturalEarth1', 'orthographic', 'stereographic', 'transverseMercator'] + The cartographic projection to use. This value is case-insensitive, for example + ``"albers"`` and ``"Albers"`` indicate the same projection type. You can find all + valid projection types `in the documentation + `__. + + **Default value:** ``equalEarth`` + """ + + _schema = {"$ref": "#/definitions/Projection"} + + def __init__( + self, + center: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + clipAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + clipExtent: Optional[ + Parameter | SchemaBase | Sequence[SchemaBase | Sequence[float]] | Map + ] = Undefined, + coefficient: Optional[float | Parameter | SchemaBase | Map] = Undefined, + distance: Optional[float | Parameter | SchemaBase | Map] = Undefined, + extent: Optional[ + Parameter | SchemaBase | Sequence[SchemaBase | Sequence[float]] | Map + ] = Undefined, + fit: Optional[ + Parameter + | SchemaBase + | Sequence[SchemaBase | Map] + | Sequence[SchemaBase | Sequence[SchemaBase | Map] | Map] + | Map + ] = Undefined, + fraction: Optional[float | Parameter | SchemaBase | Map] = Undefined, + lobes: Optional[float | Parameter | SchemaBase | Map] = Undefined, + parallel: Optional[float | Parameter | SchemaBase | Map] = Undefined, + parallels: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + pointRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + precision: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ratio: Optional[float | Parameter | SchemaBase | Map] = Undefined, + reflectX: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + reflectY: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + rotate: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + scale: Optional[float | Parameter | SchemaBase | Map] = Undefined, + size: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + spacing: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tilt: Optional[float | Parameter | SchemaBase | Map] = Undefined, + translate: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + type: Optional[Parameter | SchemaBase | Map | ProjectionType_T] = Undefined, + **kwds, + ): + super().__init__( + center=center, + clipAngle=clipAngle, + clipExtent=clipExtent, + coefficient=coefficient, + distance=distance, + extent=extent, + fit=fit, + fraction=fraction, + lobes=lobes, + parallel=parallel, + parallels=parallels, + pointRadius=pointRadius, + precision=precision, + radius=radius, + ratio=ratio, + reflectX=reflectX, + reflectY=reflectY, + rotate=rotate, + scale=scale, + size=size, + spacing=spacing, + tilt=tilt, + translate=translate, + type=type, + **kwds, + ) + + +class ProjectionConfig(VegaLiteSchema): + """ + ProjectionConfig schema wrapper. + + Parameters + ---------- + center : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number` + The projection's center, a two-element array of longitude and latitude in degrees. + + **Default value:** ``[0, 0]`` + clipAngle : dict, float, :class:`ExprRef` + The projection's clipping circle radius to the specified angle in degrees. If + ``null``, switches to `antimeridian `__ cutting + rather than small-circle clipping. + clipExtent : dict, :class:`ExprRef`, :class:`Vector2Vector2number`, Sequence[Sequence[float], :class:`Vector2number`] + The projection's viewport clip extent to the specified bounds in pixels. The extent + bounds are specified as an array ``[[x0, y0], [x1, y1]]``, where ``x0`` is the + left-side of the viewport, ``y0`` is the top, ``x1`` is the right and ``y1`` is the + bottom. If ``null``, no viewport clipping is performed. + coefficient : dict, float, :class:`ExprRef` + The coefficient parameter for the ``hammer`` projection. + + **Default value:** ``2`` + distance : dict, float, :class:`ExprRef` + For the ``satellite`` projection, the distance from the center of the sphere to the + point of view, as a proportion of the sphere's radius. The recommended maximum clip + angle for a given ``distance`` is acos(1 / distance) converted to degrees. If tilt + is also applied, then more conservative clipping may be necessary. + + **Default value:** ``2.0`` + extent : dict, :class:`ExprRef`, :class:`Vector2Vector2number`, Sequence[Sequence[float], :class:`Vector2number`] + + fit : dict, :class:`Fit`, :class:`ExprRef`, :class:`GeoJsonFeature`, :class:`GeoJsonFeatureCollection`, Sequence[dict, :class:`GeoJsonFeature`], Sequence[dict, :class:`Fit`, :class:`GeoJsonFeature`, :class:`GeoJsonFeatureCollection`, Sequence[dict, :class:`GeoJsonFeature`]] + + fraction : dict, float, :class:`ExprRef` + The fraction parameter for the ``bottomley`` projection. + + **Default value:** ``0.5``, corresponding to a sin(ψ) where ψ = π/6. + lobes : dict, float, :class:`ExprRef` + The number of lobes in projections that support multi-lobe views: ``berghaus``, + ``gingery``, or ``healpix``. The default value varies based on the projection type. + parallel : dict, float, :class:`ExprRef` + The parallel parameter for projections that support it: ``armadillo``, ``bonne``, + ``craig``, ``cylindricalEqualArea``, ``cylindricalStereographic``, + ``hammerRetroazimuthal``, ``loximuthal``, or ``rectangularPolyconic``. The default + value varies based on the projection type. + parallels : dict, Sequence[float], :class:`ExprRef` + For conic projections, the `two standard parallels + `__ that define the map layout. + The default depends on the specific conic projection used. + pointRadius : dict, float, :class:`ExprRef` + The default radius (in pixels) to use when drawing GeoJSON ``Point`` and + ``MultiPoint`` geometries. This parameter sets a constant default value. To modify + the point radius in response to data, see the corresponding parameter of the GeoPath + and GeoShape transforms. + + **Default value:** ``4.5`` + precision : dict, float, :class:`ExprRef` + The threshold for the projection's `adaptive resampling + `__ to the specified value in pixels. This + value corresponds to the `Douglas-Peucker distance + `__. + If precision is not specified, returns the projection's current resampling precision + which defaults to ``√0.5 ≅ 0.70710…``. + radius : dict, float, :class:`ExprRef` + The radius parameter for the ``airy`` or ``gingery`` projection. The default value + varies based on the projection type. + ratio : dict, float, :class:`ExprRef` + The ratio parameter for the ``hill``, ``hufnagel``, or ``wagner`` projections. The + default value varies based on the projection type. + reflectX : bool, dict, :class:`ExprRef` + Sets whether or not the x-dimension is reflected (negated) in the output. + reflectY : bool, dict, :class:`ExprRef` + Sets whether or not the y-dimension is reflected (negated) in the output. + rotate : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number`, :class:`Vector3number` + The projection's three-axis rotation to the specified angles, which must be a two- + or three-element array of numbers [``lambda``, ``phi``, ``gamma``] specifying the + rotation angles in degrees about each spherical axis. (These correspond to yaw, + pitch and roll.) + + **Default value:** ``[0, 0, 0]`` + scale : dict, float, :class:`ExprRef` + The projection's scale (zoom) factor, overriding automatic fitting. The default + scale is projection-specific. The scale factor corresponds linearly to the distance + between projected points; however, scale factor values are not equivalent across + projections. + size : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number` + Used in conjunction with fit, provides the width and height in pixels of the area to + which the projection should be automatically fit. + spacing : dict, float, :class:`ExprRef` + The spacing parameter for the ``lagrange`` projection. + + **Default value:** ``0.5`` + tilt : dict, float, :class:`ExprRef` + The tilt angle (in degrees) for the ``satellite`` projection. + + **Default value:** ``0``. + translate : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number` + The projection's translation offset as a two-element array ``[tx, ty]``. + type : dict, :class:`ExprRef`, :class:`ProjectionType`, Literal['albers', 'albersUsa', 'azimuthalEqualArea', 'azimuthalEquidistant', 'conicConformal', 'conicEqualArea', 'conicEquidistant', 'equalEarth', 'equirectangular', 'gnomonic', 'identity', 'mercator', 'naturalEarth1', 'orthographic', 'stereographic', 'transverseMercator'] + The cartographic projection to use. This value is case-insensitive, for example + ``"albers"`` and ``"Albers"`` indicate the same projection type. You can find all + valid projection types `in the documentation + `__. + + **Default value:** ``equalEarth`` + """ + + _schema = {"$ref": "#/definitions/ProjectionConfig"} + + def __init__( + self, + center: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + clipAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + clipExtent: Optional[ + Parameter | SchemaBase | Sequence[SchemaBase | Sequence[float]] | Map + ] = Undefined, + coefficient: Optional[float | Parameter | SchemaBase | Map] = Undefined, + distance: Optional[float | Parameter | SchemaBase | Map] = Undefined, + extent: Optional[ + Parameter | SchemaBase | Sequence[SchemaBase | Sequence[float]] | Map + ] = Undefined, + fit: Optional[ + Parameter + | SchemaBase + | Sequence[SchemaBase | Map] + | Sequence[SchemaBase | Sequence[SchemaBase | Map] | Map] + | Map + ] = Undefined, + fraction: Optional[float | Parameter | SchemaBase | Map] = Undefined, + lobes: Optional[float | Parameter | SchemaBase | Map] = Undefined, + parallel: Optional[float | Parameter | SchemaBase | Map] = Undefined, + parallels: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + pointRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + precision: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ratio: Optional[float | Parameter | SchemaBase | Map] = Undefined, + reflectX: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + reflectY: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + rotate: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + scale: Optional[float | Parameter | SchemaBase | Map] = Undefined, + size: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + spacing: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tilt: Optional[float | Parameter | SchemaBase | Map] = Undefined, + translate: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + type: Optional[Parameter | SchemaBase | Map | ProjectionType_T] = Undefined, + **kwds, + ): + super().__init__( + center=center, + clipAngle=clipAngle, + clipExtent=clipExtent, + coefficient=coefficient, + distance=distance, + extent=extent, + fit=fit, + fraction=fraction, + lobes=lobes, + parallel=parallel, + parallels=parallels, + pointRadius=pointRadius, + precision=precision, + radius=radius, + ratio=ratio, + reflectX=reflectX, + reflectY=reflectY, + rotate=rotate, + scale=scale, + size=size, + spacing=spacing, + tilt=tilt, + translate=translate, + type=type, + **kwds, + ) + + +class ProjectionType(VegaLiteSchema): + """ProjectionType schema wrapper.""" + + _schema = {"$ref": "#/definitions/ProjectionType"} + + def __init__(self, *args): + super().__init__(*args) + + +class RadialGradient(Gradient): + """ + RadialGradient schema wrapper. + + Parameters + ---------- + gradient : Literal['radial'] + The type of gradient. Use ``"radial"`` for a radial gradient. + stops : Sequence[dict, :class:`GradientStop`] + An array of gradient stops defining the gradient color sequence. + id : str + + r1 : float + The radius length, in normalized [0, 1] coordinates, of the inner circle for the + gradient. + + **Default value:** ``0`` + r2 : float + The radius length, in normalized [0, 1] coordinates, of the outer circle for the + gradient. + + **Default value:** ``0.5`` + x1 : float + The x-coordinate, in normalized [0, 1] coordinates, for the center of the inner + circle for the gradient. + + **Default value:** ``0.5`` + x2 : float + The x-coordinate, in normalized [0, 1] coordinates, for the center of the outer + circle for the gradient. + + **Default value:** ``0.5`` + y1 : float + The y-coordinate, in normalized [0, 1] coordinates, for the center of the inner + circle for the gradient. + + **Default value:** ``0.5`` + y2 : float + The y-coordinate, in normalized [0, 1] coordinates, for the center of the outer + circle for the gradient. + + **Default value:** ``0.5`` + """ + + _schema = {"$ref": "#/definitions/RadialGradient"} + + def __init__( + self, + gradient: Optional[Literal["radial"]] = Undefined, + stops: Optional[Sequence[SchemaBase | Map]] = Undefined, + id: Optional[str] = Undefined, + r1: Optional[float] = Undefined, + r2: Optional[float] = Undefined, + x1: Optional[float] = Undefined, + x2: Optional[float] = Undefined, + y1: Optional[float] = Undefined, + y2: Optional[float] = Undefined, + **kwds, + ): + super().__init__( + gradient=gradient, + stops=stops, + id=id, + r1=r1, + r2=r2, + x1=x1, + x2=x2, + y1=y1, + y2=y2, + **kwds, + ) + + +class RangeConfig(VegaLiteSchema): + """ + RangeConfig schema wrapper. + + Parameters + ---------- + category : dict, :class:`RangeRaw`, :class:`RangeEnum`, :class:`RangeScheme`, Sequence[str, bool, float, Sequence[float], :class:`RangeRawArray`, None], Literal['width', 'height', 'symbol', 'category', 'ordinal', 'ramp', 'diverging', 'heatmap'], Sequence[str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']] + Default `color scheme `__ for categorical + data. + diverging : dict, :class:`RangeRaw`, :class:`RangeEnum`, :class:`RangeScheme`, Sequence[str, bool, float, Sequence[float], :class:`RangeRawArray`, None], Literal['width', 'height', 'symbol', 'category', 'ordinal', 'ramp', 'diverging', 'heatmap'], Sequence[str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']] + Default `color scheme `__ for diverging + quantitative ramps. + heatmap : dict, :class:`RangeRaw`, :class:`RangeEnum`, :class:`RangeScheme`, Sequence[str, bool, float, Sequence[float], :class:`RangeRawArray`, None], Literal['width', 'height', 'symbol', 'category', 'ordinal', 'ramp', 'diverging', 'heatmap'], Sequence[str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']] + Default `color scheme `__ for + quantitative heatmaps. + ordinal : dict, :class:`RangeRaw`, :class:`RangeEnum`, :class:`RangeScheme`, Sequence[str, bool, float, Sequence[float], :class:`RangeRawArray`, None], Literal['width', 'height', 'symbol', 'category', 'ordinal', 'ramp', 'diverging', 'heatmap'], Sequence[str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']] + Default `color scheme `__ for + rank-ordered data. + ramp : dict, :class:`RangeRaw`, :class:`RangeEnum`, :class:`RangeScheme`, Sequence[str, bool, float, Sequence[float], :class:`RangeRawArray`, None], Literal['width', 'height', 'symbol', 'category', 'ordinal', 'ramp', 'diverging', 'heatmap'], Sequence[str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']] + Default `color scheme `__ for sequential + quantitative ramps. + symbol : Sequence[str, :class:`SymbolShape`] + Array of `symbol `__ names or paths + for the default shape palette. + """ + + _schema = {"$ref": "#/definitions/RangeConfig"} + + def __init__( + self, + category: Optional[ + SchemaBase + | Sequence[str | SchemaBase | ColorName_T] + | Sequence[str | bool | float | SchemaBase | Sequence[float] | None] + | Map + | RangeEnum_T + ] = Undefined, + diverging: Optional[ + SchemaBase + | Sequence[str | SchemaBase | ColorName_T] + | Sequence[str | bool | float | SchemaBase | Sequence[float] | None] + | Map + | RangeEnum_T + ] = Undefined, + heatmap: Optional[ + SchemaBase + | Sequence[str | SchemaBase | ColorName_T] + | Sequence[str | bool | float | SchemaBase | Sequence[float] | None] + | Map + | RangeEnum_T + ] = Undefined, + ordinal: Optional[ + SchemaBase + | Sequence[str | SchemaBase | ColorName_T] + | Sequence[str | bool | float | SchemaBase | Sequence[float] | None] + | Map + | RangeEnum_T + ] = Undefined, + ramp: Optional[ + SchemaBase + | Sequence[str | SchemaBase | ColorName_T] + | Sequence[str | bool | float | SchemaBase | Sequence[float] | None] + | Map + | RangeEnum_T + ] = Undefined, + symbol: Optional[Sequence[str | SchemaBase]] = Undefined, + **kwds, + ): + super().__init__( + category=category, + diverging=diverging, + heatmap=heatmap, + ordinal=ordinal, + ramp=ramp, + symbol=symbol, + **kwds, + ) + + +class RangeRawArray(VegaLiteSchema): + """RangeRawArray schema wrapper.""" + + _schema = {"$ref": "#/definitions/RangeRawArray"} + + def __init__(self, *args): + super().__init__(*args) + + +class RangeScheme(VegaLiteSchema): + """RangeScheme schema wrapper.""" + + _schema = {"$ref": "#/definitions/RangeScheme"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class RangeEnum(RangeScheme): + """RangeEnum schema wrapper.""" + + _schema = {"$ref": "#/definitions/RangeEnum"} + + def __init__(self, *args): + super().__init__(*args) + + +class RangeRaw(RangeScheme): + """RangeRaw schema wrapper.""" + + _schema = {"$ref": "#/definitions/RangeRaw"} + + def __init__(self, *args): + super().__init__(*args) + + +class RectConfig(AnyMarkConfig): + """ + RectConfig schema wrapper. + + Parameters + ---------- + align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right'] + The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). + One of ``"left"``, ``"right"``, ``"center"``. + + **Note:** Expression reference is *not* supported for range marks. + angle : dict, float, :class:`ExprRef` + The rotation angle of the text, in degrees. + aria : bool, dict, :class:`ExprRef` + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG element, removing the mark item from the ARIA accessibility tree. + ariaRole : str, dict, :class:`ExprRef` + Sets the type of user interface element of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "role" attribute. Warning: this + property is experimental and may be changed in the future. + ariaRoleDescription : str, dict, :class:`ExprRef` + A human-readable, author-localized description for the role of the mark item for + `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "aria-roledescription" attribute. + Warning: this property is experimental and may be changed in the future. + aspect : bool, dict, :class:`ExprRef` + Whether to keep aspect ratio of image marks. + baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + For text marks, the vertical text baseline. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an + expression reference that provides one of the valid values. The ``"line-top"`` and + ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are + calculated relative to the ``lineHeight`` rather than ``fontSize`` alone. + + For range marks, the vertical alignment of the marks. One of ``"top"``, + ``"middle"``, ``"bottom"``. + + **Note:** Expression reference is *not* supported for range marks. + binSpacing : float + Offset between bars for binned field. The ideal value for this is either 0 + (preferred by statisticians) or 1 (Vega-Lite default, D3 example style). + + **Default value:** ``1`` + blend : dict, :class:`Blend`, :class:`ExprRef`, Literal[None, 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'] + The color blend mode for drawing an item on its current background. Any valid `CSS + mix-blend-mode `__ + value can be used. + + __Default value:__ ``"source-over"`` + color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + continuousBandSize : float + The default size of the bars on continuous scales. + + **Default value:** ``5`` + cornerRadius : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles or arcs' corners. + + **Default value:** ``0`` + cornerRadiusBottomLeft : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' bottom left corner. + + **Default value:** ``0`` + cornerRadiusBottomRight : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' bottom right corner. + + **Default value:** ``0`` + cornerRadiusTopLeft : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' top right corner. + + **Default value:** ``0`` + cornerRadiusTopRight : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' top left corner. + + **Default value:** ``0`` + cursor : dict, :class:`Cursor`, :class:`ExprRef`, Literal['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', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing'] + The mouse cursor used over the mark. Any valid `CSS cursor type + `__ can be used. + description : str, dict, :class:`ExprRef` + A text description of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the `"aria-label" attribute + `__. + dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl'] + The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` + (right-to-left). This property determines on which side is truncated in response to + the limit parameter. + + **Default value:** ``"ltr"`` + discreteBandSize : dict, float, :class:`RelativeBandSize` + The default size of the bars with discrete dimensions. If unspecified, the default + size is ``step-2``, which provides 2 pixel offset between bars. + dx : dict, float, :class:`ExprRef` + The horizontal offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + dy : dict, float, :class:`ExprRef` + The vertical offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + ellipsis : str, dict, :class:`ExprRef` + The ellipsis string for text truncated in response to the limit parameter. + + **Default value:** ``"…"`` + endAngle : dict, float, :class:`ExprRef` + The end angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + fill : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default fill color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove fill. + + **Default value:** (None) + fillOpacity : dict, float, :class:`ExprRef` + The fill opacity (value between [0,1]). + + **Default value:** ``1`` + filled : bool + Whether the mark's color should be used as fill color instead of stroke color. + + **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well + as ``geoshape`` marks for `graticule + `__ data sources; + otherwise, ``true``. + + **Note:** This property cannot be used in a `style config + `__. + font : str, dict, :class:`ExprRef` + The typeface to set the text in (e.g., ``"Helvetica Neue"``). + fontSize : dict, float, :class:`ExprRef` + The font size, in pixels. + + **Default value:** ``11`` + fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + The font style (e.g., ``"italic"``). + fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a + number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and + ``"bold"`` = ``700``). + height : dict, float, :class:`ExprRef` + Height of the marks. + href : str, dict, :class:`URI`, :class:`ExprRef` + A URL to load upon mouse click. If defined, the mark acts as a hyperlink. + innerRadius : dict, float, :class:`ExprRef` + The inner radius in pixels of arc marks. ``innerRadius`` is an alias for + ``radius2``. + + **Default value:** ``0`` + interpolate : dict, :class:`ExprRef`, :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after'] + The line interpolation method to use for line and area marks. One of the following: + + * ``"linear"``: piecewise linear segments, as in a polyline. + * ``"linear-closed"``: close the linear segments to form a polygon. + * ``"step"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"step-before"``: alternate between vertical and horizontal segments, as in a + step function. + * ``"step-after"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"basis"``: a B-spline, with control point duplication on the ends. + * ``"basis-open"``: an open B-spline; may not intersect the start or end. + * ``"basis-closed"``: a closed B-spline, as in a loop. + * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends. + * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end, + but will intersect other control points. + * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop. + * ``"bundle"``: equivalent to basis, except the tension parameter is used to + straighten the spline. + * ``"monotone"``: cubic interpolation that preserves monotonicity in y. + invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None + Invalid data mode, which defines how the marks and corresponding scales should + represent invalid values (``null`` and ``NaN`` in continuous scales *without* + defined output for invalid values). + + * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and + *scales*. For path marks (for line, area, trail), this option will create paths + that connect valid points, as if the data rows with invalid values do not exist. + + * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at + invalid values. For non-path marks, this is equivalent to ``"filter"``. All + *scale* domains will *exclude* these filtered data points. + + * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid + values. Hide invalid values for non-path marks. All *scale* domains will + *include* these filtered data points (for both path and non-path marks). + + * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each + scale will use the output for invalid values defined in ``config.scale.invalid`` + or, if unspecified, by default invalid values will produce the same visual values + as zero (if the scale includes zero) or the minimum value (if the scale does not + include zero). + + * ``"break-paths-show-path-domains"`` (default) — This is equivalent to + ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and + ``"filter"`` for non-path marks. + + **Note**: If any channel's scale has an output for invalid values defined in + ``config.scale.invalid``, all values for the scales will be considered "valid" since + they can produce a reasonable output for the scales. Thus, fields for such channels + will not be filtered and will not cause path breaks. + limit : dict, float, :class:`ExprRef` + The maximum length of the text mark in pixels. The text value will be automatically + truncated if the rendered size exceeds the limit. + + **Default value:** ``0`` -- indicating no limit + lineBreak : str, dict, :class:`ExprRef` + A delimiter, such as a newline character, upon which to break text strings into + multiple lines. This property is ignored if the text is array-valued. + lineHeight : dict, float, :class:`ExprRef` + The line height in pixels (the spacing between subsequent lines of text) for + multi-line text marks. + minBandSize : dict, float, :class:`ExprRef` + The minimum band size for bar and rectangle marks. **Default value:** ``0.25`` + opacity : dict, float, :class:`ExprRef` + The overall opacity (value between [0,1]). + + **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, + ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. + order : bool, None + For line and trail marks, this ``order`` property can be set to ``null`` or + ``false`` to make the lines use the original order in the data sources. + orient : :class:`Orientation`, Literal['horizontal', 'vertical'] + The orientation of a non-stacked bar, tick, area, and line charts. The value is + either horizontal (default) or vertical. + + * For bar, rule and tick, this determines whether the size of the bar and tick + should be applied to x or y dimension. + * For area, this property determines the orient property of the Vega output. + * For line and trail marks, this property determines the sort order of the points in + the line if ``config.sortLineBy`` is not specified. For stacked charts, this is + always determined by the orientation of the stack; therefore explicitly specified + value will be ignored. + outerRadius : dict, float, :class:`ExprRef` + The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``. + + **Default value:** ``0`` + padAngle : dict, float, :class:`ExprRef` + The angular padding applied to sides of the arc, in radians. + radius : dict, float, :class:`ExprRef` + For arc mark, the primary (outer) radius in pixels. + + For text marks, polar coordinate radial offset, in pixels, of the text from the + origin determined by the ``x`` and ``y`` properties. + + **Default value:** ``min(plot_width, plot_height)/2`` + radius2 : dict, float, :class:`ExprRef` + The secondary (inner) radius in pixels of arc marks. + + **Default value:** ``0`` + shape : str, dict, :class:`ExprRef`, :class:`SymbolShape` + Shape of the point marks. Supported values include: + + * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, + ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or + ``"triangle-left"``. + * the line symbol ``"stroke"`` + * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` + * a custom `SVG path string + `__ (For correct + sizing, custom shape paths should be defined within a square bounding box with + coordinates ranging from -1 to 1 along both the x and y dimensions.) + + **Default value:** ``"circle"`` + size : dict, float, :class:`ExprRef` + Default size for marks. + + * For ``point``/``circle``/``square``, this represents the pixel area of the marks. + Note that this value sets the area of the symbol; the side lengths will increase + with the square root of this value. + * For ``bar``, this represents the band size of the bar, in pixels. + * For ``text``, this represents the font size, in pixels. + + **Default value:** + + * ``30`` for point, circle, square marks; width/height's ``step`` + * ``2`` for bar marks with discrete dimensions; + * ``5`` for bar marks with continuous dimensions; + * ``11`` for text marks. + smooth : bool, dict, :class:`ExprRef` + A boolean flag (default true) indicating if the image should be smoothed when + resized. If false, individual pixels should be scaled directly rather than + interpolated with smoothing. For SVG rendering, this option may not work in some + browsers due to lack of standardization. + startAngle : dict, float, :class:`ExprRef` + The start angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + stroke : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default stroke color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove stroke. + + **Default value:** (None) + strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square'] + The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or + ``"square"``. + + **Default value:** ``"butt"`` + strokeDash : dict, Sequence[float], :class:`ExprRef` + An array of alternating stroke, space lengths for creating dashed or dotted lines. + strokeDashOffset : dict, float, :class:`ExprRef` + The offset (in pixels) into which to begin drawing with the stroke dash array. + strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel'] + The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. + + **Default value:** ``"miter"`` + strokeMiterLimit : dict, float, :class:`ExprRef` + The miter limit at which to bevel a line join. + strokeOffset : dict, float, :class:`ExprRef` + The offset in pixels at which to draw the group stroke and fill. If unspecified, the + default behavior is to dynamically offset stroked groups such that 1 pixel stroke + widths align with the pixel grid. + strokeOpacity : dict, float, :class:`ExprRef` + The stroke opacity (value between [0,1]). + + **Default value:** ``1`` + strokeWidth : dict, float, :class:`ExprRef` + The stroke width, in pixels. + tension : dict, float, :class:`ExprRef` + Depending on the interpolation type, sets the tension parameter (for line and area + marks). + text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef` + Placeholder text if the ``text`` channel is not specified + theta : dict, float, :class:`ExprRef` + * For arc marks, the arc length in radians if theta2 is not specified, otherwise the + start arc angle. (A value of 0 indicates up or “north”, increasing values proceed + clockwise.) + + * For text marks, polar coordinate angle in radians. + theta2 : dict, float, :class:`ExprRef` + The end angle of arc marks in radians. A value of 0 indicates up or “north”, + increasing values proceed clockwise. + timeUnitBandPosition : float + Default relative band position for a time unit. If set to ``0``, the marks will be + positioned at the beginning of the time unit band step. If set to ``0.5``, the marks + will be positioned in the middle of the time unit band step. + timeUnitBandSize : float + Default relative band size for a time unit. If set to ``1``, the bandwidth of the + marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the + marks will be half of the time unit band step. + tooltip : str, bool, dict, float, :class:`ExprRef`, :class:`TooltipContent`, None + The tooltip text string to show upon mouse hover or an object defining which fields + should the tooltip be derived from. + + * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from + ``encoding`` will be used. + * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the + highlighted data point will be used. + * If set to ``null`` or ``false``, then no tooltip will be used. + + See the `tooltip `__ + documentation for a detailed discussion about tooltip in Vega-Lite. + + **Default value:** ``null`` + url : str, dict, :class:`URI`, :class:`ExprRef` + The URL of the image file for image marks. + width : dict, float, :class:`ExprRef` + Width of the marks. + x : dict, float, :class:`ExprRef`, Literal['width'] + X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without + specified ``x2`` or ``width``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2 : dict, float, :class:`ExprRef`, Literal['width'] + X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + y : dict, float, :class:`ExprRef`, Literal['height'] + Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without + specified ``y2`` or ``height``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2 : dict, float, :class:`ExprRef`, Literal['height'] + Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + """ + + _schema = {"$ref": "#/definitions/RectConfig"} + + def __init__( + self, + align: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + angle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ariaRole: Optional[str | Parameter | SchemaBase | Map] = Undefined, + ariaRoleDescription: Optional[str | Parameter | SchemaBase | Map] = Undefined, + aspect: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + baseline: Optional[Parameter | SchemaBase | Map | TextBaseline_T] = Undefined, + binSpacing: Optional[float] = Undefined, + blend: Optional[Parameter | SchemaBase | Map | Blend_T] = Undefined, + color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined, + continuousBandSize: Optional[float] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadiusBottomLeft: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cornerRadiusBottomRight: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cornerRadiusTopLeft: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadiusTopRight: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cursor: Optional[Parameter | SchemaBase | Map | Cursor_T] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + dir: Optional[Parameter | SchemaBase | Map | TextDirection_T] = Undefined, + discreteBandSize: Optional[float | SchemaBase | Map] = Undefined, + dx: Optional[float | Parameter | SchemaBase | Map] = Undefined, + dy: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ellipsis: Optional[str | Parameter | SchemaBase | Map] = Undefined, + endAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + fill: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + filled: Optional[bool] = Undefined, + font: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined, + height: Optional[float | Parameter | SchemaBase | Map] = Undefined, + href: Optional[str | Parameter | SchemaBase | Map] = Undefined, + innerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[Parameter | SchemaBase | Map | Interpolate_T] = Undefined, + invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined, + limit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + lineBreak: Optional[str | Parameter | SchemaBase | Map] = Undefined, + lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + minBandSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + order: Optional[bool | None] = Undefined, + orient: Optional[SchemaBase | Orientation_T] = Undefined, + outerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + padAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radius2: Optional[float | Parameter | SchemaBase | Map] = Undefined, + shape: Optional[str | Parameter | SchemaBase | Map] = Undefined, + size: Optional[float | Parameter | SchemaBase | Map] = Undefined, + smooth: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + startAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + stroke: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + strokeDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined, + strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tension: Optional[float | Parameter | SchemaBase | Map] = Undefined, + text: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined, + theta: Optional[float | Parameter | SchemaBase | Map] = Undefined, + theta2: Optional[float | Parameter | SchemaBase | Map] = Undefined, + timeUnitBandPosition: Optional[float] = Undefined, + timeUnitBandSize: Optional[float] = Undefined, + tooltip: Optional[ + str | bool | float | Parameter | SchemaBase | Map | None + ] = Undefined, + url: Optional[str | Parameter | SchemaBase | Map] = Undefined, + width: Optional[float | Parameter | SchemaBase | Map] = Undefined, + x: Optional[ + float | Parameter | SchemaBase | Literal["width"] | Map + ] = Undefined, + x2: Optional[ + float | Parameter | SchemaBase | Literal["width"] | Map + ] = Undefined, + y: Optional[ + float | Parameter | SchemaBase | Literal["height"] | Map + ] = Undefined, + y2: Optional[ + float | Parameter | SchemaBase | Literal["height"] | Map + ] = Undefined, + **kwds, + ): + super().__init__( + align=align, + angle=angle, + aria=aria, + ariaRole=ariaRole, + ariaRoleDescription=ariaRoleDescription, + aspect=aspect, + baseline=baseline, + binSpacing=binSpacing, + blend=blend, + color=color, + continuousBandSize=continuousBandSize, + cornerRadius=cornerRadius, + cornerRadiusBottomLeft=cornerRadiusBottomLeft, + cornerRadiusBottomRight=cornerRadiusBottomRight, + cornerRadiusTopLeft=cornerRadiusTopLeft, + cornerRadiusTopRight=cornerRadiusTopRight, + cursor=cursor, + description=description, + dir=dir, + discreteBandSize=discreteBandSize, + dx=dx, + dy=dy, + ellipsis=ellipsis, + endAngle=endAngle, + fill=fill, + fillOpacity=fillOpacity, + filled=filled, + font=font, + fontSize=fontSize, + fontStyle=fontStyle, + fontWeight=fontWeight, + height=height, + href=href, + innerRadius=innerRadius, + interpolate=interpolate, + invalid=invalid, + limit=limit, + lineBreak=lineBreak, + lineHeight=lineHeight, + minBandSize=minBandSize, + opacity=opacity, + order=order, + orient=orient, + outerRadius=outerRadius, + padAngle=padAngle, + radius=radius, + radius2=radius2, + shape=shape, + size=size, + smooth=smooth, + startAngle=startAngle, + stroke=stroke, + strokeCap=strokeCap, + strokeDash=strokeDash, + strokeDashOffset=strokeDashOffset, + strokeJoin=strokeJoin, + strokeMiterLimit=strokeMiterLimit, + strokeOffset=strokeOffset, + strokeOpacity=strokeOpacity, + strokeWidth=strokeWidth, + tension=tension, + text=text, + theta=theta, + theta2=theta2, + timeUnitBandPosition=timeUnitBandPosition, + timeUnitBandSize=timeUnitBandSize, + tooltip=tooltip, + url=url, + width=width, + x=x, + x2=x2, + y=y, + y2=y2, + **kwds, + ) + + +class RelativeBandSize(VegaLiteSchema): + """ + RelativeBandSize schema wrapper. + + Parameters + ---------- + band : float + The relative band size. For example ``0.5`` means half of the band scale's band + width. + """ + + _schema = {"$ref": "#/definitions/RelativeBandSize"} + + def __init__(self, band: Optional[float] = Undefined, **kwds): + super().__init__(band=band, **kwds) + + +class RepeatMapping(VegaLiteSchema): + """ + RepeatMapping schema wrapper. + + Parameters + ---------- + column : Sequence[str] + An array of fields to be repeated horizontally. + row : Sequence[str] + An array of fields to be repeated vertically. + """ + + _schema = {"$ref": "#/definitions/RepeatMapping"} + + def __init__( + self, + column: Optional[Sequence[str]] = Undefined, + row: Optional[Sequence[str]] = Undefined, + **kwds, + ): + super().__init__(column=column, row=row, **kwds) + + +class RepeatRef(Field): + """ + RepeatRef schema wrapper. + + Reference to a repeated value. + + Parameters + ---------- + repeat : Literal['row', 'column', 'repeat', 'layer'] + + """ + + _schema = {"$ref": "#/definitions/RepeatRef"} + + def __init__( + self, + repeat: Optional[Literal["row", "column", "repeat", "layer"]] = Undefined, + **kwds, + ): + super().__init__(repeat=repeat, **kwds) + + +class Resolve(VegaLiteSchema): + """ + Resolve schema wrapper. + + Defines how scales, axes, and legends from different specs should be combined. Resolve is a + mapping from ``scale``, ``axis``, and ``legend`` to a mapping from channels to resolutions. + Scales and guides can be resolved to be ``"independent"`` or ``"shared"``. + + Parameters + ---------- + axis : dict, :class:`AxisResolveMap` + + legend : dict, :class:`LegendResolveMap` + + scale : dict, :class:`ScaleResolveMap` + + """ + + _schema = {"$ref": "#/definitions/Resolve"} + + def __init__( + self, + axis: Optional[SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map] = Undefined, + scale: Optional[SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__(axis=axis, legend=legend, scale=scale, **kwds) + + +class ResolveMode(VegaLiteSchema): + """ResolveMode schema wrapper.""" + + _schema = {"$ref": "#/definitions/ResolveMode"} + + def __init__(self, *args): + super().__init__(*args) + + +class RowColLayoutAlign(VegaLiteSchema): + """ + RowColLayoutAlign schema wrapper. + + Parameters + ---------- + column : :class:`LayoutAlign`, Literal['all', 'each', 'none'] + + row : :class:`LayoutAlign`, Literal['all', 'each', 'none'] + + """ + + _schema = {"$ref": "#/definitions/RowCol"} + + def __init__( + self, + column: Optional[SchemaBase | LayoutAlign_T] = Undefined, + row: Optional[SchemaBase | LayoutAlign_T] = Undefined, + **kwds, + ): + super().__init__(column=column, row=row, **kwds) + + +class RowColboolean(VegaLiteSchema): + """ + RowColboolean schema wrapper. + + Parameters + ---------- + column : bool + + row : bool + + """ + + _schema = {"$ref": "#/definitions/RowCol"} + + def __init__( + self, + column: Optional[bool] = Undefined, + row: Optional[bool] = Undefined, + **kwds, + ): + super().__init__(column=column, row=row, **kwds) + + +class RowColnumber(VegaLiteSchema): + """ + RowColnumber schema wrapper. + + Parameters + ---------- + column : float + + row : float + + """ + + _schema = {"$ref": "#/definitions/RowCol"} + + def __init__( + self, + column: Optional[float] = Undefined, + row: Optional[float] = Undefined, + **kwds, + ): + super().__init__(column=column, row=row, **kwds) + + +class RowColumnEncodingFieldDef(VegaLiteSchema): + r""" + RowColumnEncodingFieldDef schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + align : :class:`LayoutAlign`, Literal['all', 'each', 'none'] + The alignment to apply to row/column facet's subplot. The supported string values + are ``"all"``, ``"each"``, and ``"none"``. + + * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply + placed one after the other. + * For ``"each"``, subviews will be aligned into a clean grid structure, but each row + or column may be of variable size. + * For ``"all"``, subviews will be aligned and each row or column will be sized + identically based on the maximum observed size. String values for this property + will be applied to both grid rows and columns. + + **Default value:** ``"all"``. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + center : bool + Boolean flag indicating if facet's subviews should be centered relative to their + respective rows or columns. + + **Default value:** ``false`` + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + header : dict, :class:`Header`, None + An object defining properties of a facet's header. + sort : dict, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, Sequence[dict, :class:`DateTime`], Literal['ascending', 'descending'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` is not supported for ``row`` and ``column``. + spacing : float + The spacing in pixels between facet's sub-views. + + **Default value**: Depends on ``"spacing"`` property of `the view composition + configuration `__ + (``20`` by default) + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/RowColumnEncodingFieldDef"} + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + align: Optional[SchemaBase | LayoutAlign_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + center: Optional[bool] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + header: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | SortOrder_T + | None + ] = Undefined, + spacing: Optional[float] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + align=align, + bandPosition=bandPosition, + bin=bin, + center=center, + field=field, + header=header, + sort=sort, + spacing=spacing, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +class Scale(VegaLiteSchema): + """ + Scale schema wrapper. + + Parameters + ---------- + align : dict, float, :class:`ExprRef` + The alignment of the steps within the scale range. + + This value must lie in the range ``[0,1]``. A value of ``0.5`` indicates that the + steps should be centered within the range. A value of ``0`` or ``1`` may be used to + shift the bands to one side, say to position them adjacent to an axis. + + **Default value:** ``0.5`` + base : dict, float, :class:`ExprRef` + The logarithm base of the ``log`` scale (default ``10``). + bins : dict, Sequence[float], :class:`ScaleBins`, :class:`ScaleBinParams` + Bin boundaries can be provided to scales as either an explicit array of bin + boundaries or as a bin specification object. The legal values are: + + * An `array <../types/#Array>`__ literal of bin boundary values. For example, ``[0, + 5, 10, 15, 20]``. The array must include both starting and ending boundaries. The + previous example uses five values to indicate a total of four bin intervals: + [0-5), [5-10), [10-15), [15-20]. Array literals may include signal references as + elements. + * A `bin specification object + `__ that indicates the bin + *step* size, and optionally the *start* and *stop* boundaries. + * An array of bin boundaries over the scale domain. If provided, axes and legends + will use the bin boundaries to inform the choice of tick marks and text labels. + clamp : bool, dict, :class:`ExprRef` + 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). + constant : dict, float, :class:`ExprRef` + A constant determining the slope of the symlog function around zero. Only used for + ``symlog`` scales. + + **Default value:** ``1`` + domain : dict, :class:`ExprRef`, Literal['unaggregated'], :class:`DomainUnionWith`, :class:`ParameterExtent`, Sequence[str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, None] + Customized domain values in the form of constant values or dynamic values driven by + a parameter. + + 1) Constant ``domain`` for *quantitative* fields can take one of the following + forms: + + * A two-element array with minimum and maximum values. To create a diverging scale, + this two-element array can be combined with the ``domainMid`` property. + * An array with more than two entries, for `Piecewise quantitative scales + `__. + * A string value ``"unaggregated"``, if the input field is aggregated, to indicate + that the domain should include the raw data values prior to the aggregation. + + 2) Constant ``domain`` for *temporal* fields can be a two-element array with minimum + and maximum values, in the form of either timestamps or the `DateTime definition + objects `__. + + 3) Constant ``domain`` for *ordinal* and *nominal* fields can be an array that lists + valid input values. + + 4) To combine (union) specified constant domain with the field's values, ``domain`` + can be an object with a ``unionWith`` property that specify constant domain to be + combined. For example, ``domain: {unionWith: [0, 100]}`` for a quantitative scale + means that the scale domain always includes ``[0, 100]``, but will include other + values in the fields beyond ``[0, 100]``. + + 5) Domain can also takes an object defining a field or encoding of a parameter that + `interactively determines + `__ the scale + domain. + domainMax : dict, float, :class:`ExprRef`, :class:`DateTime` + Sets the maximum value in the scale domain, overriding the ``domain`` property. This + property is only intended for use with scales having continuous domains. + domainMid : dict, float, :class:`ExprRef` + Inserts a single mid-point value into a two-element domain. The mid-point value must + lie between the domain minimum and maximum values. This property can be useful for + setting a midpoint for `diverging color scales + `__. The domainMid + property is only intended for use with scales supporting continuous, piecewise + domains. + domainMin : dict, float, :class:`ExprRef`, :class:`DateTime` + Sets the minimum value in the scale domain, overriding the domain property. This + property is only intended for use with scales having continuous domains. + domainRaw : dict, :class:`ExprRef` + An expression for an array of raw values that, if non-null, directly overrides the + *domain* property. This is useful for supporting interactions such as panning or + zooming a scale. The scale may be initially determined using a data-driven domain, + then modified in response to user input by setting the rawDomain value. + exponent : dict, float, :class:`ExprRef` + The exponent of the ``pow`` scale. + interpolate : dict, :class:`ExprRef`, :class:`ScaleInterpolateEnum`, :class:`ScaleInterpolateParams`, Literal['rgb', 'lab', 'hcl', 'hsl', 'hsl-long', 'hcl-long', 'cubehelix', 'cubehelix-long'] + The interpolation method for range values. By default, a general interpolator for + numbers, dates, strings and colors (in HCL space) is used. For color ranges, this + property allows interpolation in alternative color spaces. Legal values include + ``rgb``, ``hsl``, ``hsl-long``, ``lab``, ``hcl``, ``hcl-long``, ``cubehelix`` and + ``cubehelix-long`` ('-long' variants use longer paths in polar coordinate spaces). + If object-valued, this property accepts an object with a string-valued *type* + property and an optional numeric *gamma* property applicable to rgb and cubehelix + interpolators. For more, see the `d3-interpolate documentation + `__. + + * **Default value:** ``hcl`` + nice : bool, dict, float, :class:`ExprRef`, :class:`TimeInterval`, :class:`TimeIntervalStep`, Literal['millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'year'] + 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]*. + + For 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. + + For 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. + + **Default value:** ``true`` for unbinned *quantitative* fields without explicit + domain bounds; ``false`` otherwise. + padding : dict, float, :class:`ExprRef` + 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``. By default, Vega-Lite sets padding such that *width/height = + number of unique values * step*. + paddingInner : dict, float, :class:`ExprRef` + 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``. + paddingOuter : dict, float, :class:`ExprRef` + 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. By default, Vega-Lite sets + outer padding such that *width/height = number of unique values * step*. + range : dict, :class:`RangeEnum`, :class:`FieldRange`, Sequence[str, dict, float, Sequence[float], :class:`ExprRef`], Literal['width', 'height', 'symbol', 'category', 'ordinal', 'ramp', 'diverging', 'heatmap'] + 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 or an object with a ``field`` property + representing the range values. For example, if a field ``color`` contains CSS + color names, we can set ``range`` to ``{field: "color"}``. + + **Notes:** + + 1) For 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``). + rangeMax : str, dict, float, :class:`ExprRef` + Sets the maximum value in the scale range, overriding the ``range`` property or the + default range. This property is only intended for use with scales having continuous + ranges. + rangeMin : str, dict, float, :class:`ExprRef` + Sets the minimum value in the scale range, overriding the ``range`` property or the + default range. This property is only intended for use with scales having continuous + ranges. + reverse : bool, dict, :class:`ExprRef` + If true, reverses the order of the scale range. **Default value:** ``false``. + round : bool, dict, :class:`ExprRef` + If ``true``, rounds numeric output values to integers. This can be helpful for + snapping to the pixel grid. + + **Default value:** ``false``. + scheme : dict, :class:`ExprRef`, :class:`Cyclical`, :class:`Diverging`, :class:`Categorical`, :class:`ColorScheme`, :class:`SchemeParams`, :class:`SequentialMultiHue`, :class:`SequentialSingleHue`, Literal['accent', 'category10', 'category20', 'category20b', 'category20c', 'dark2', 'paired', 'pastel1', 'pastel2', 'set1', 'set2', 'set3', 'tableau10', 'tableau20', 'blueorange', 'blueorange-3', 'blueorange-4', 'blueorange-5', 'blueorange-6', 'blueorange-7', 'blueorange-8', 'blueorange-9', 'blueorange-10', 'blueorange-11', 'brownbluegreen', 'brownbluegreen-3', 'brownbluegreen-4', 'brownbluegreen-5', 'brownbluegreen-6', 'brownbluegreen-7', 'brownbluegreen-8', 'brownbluegreen-9', 'brownbluegreen-10', 'brownbluegreen-11', 'purplegreen', 'purplegreen-3', 'purplegreen-4', 'purplegreen-5', 'purplegreen-6', 'purplegreen-7', 'purplegreen-8', 'purplegreen-9', 'purplegreen-10', 'purplegreen-11', 'pinkyellowgreen', 'pinkyellowgreen-3', 'pinkyellowgreen-4', 'pinkyellowgreen-5', 'pinkyellowgreen-6', 'pinkyellowgreen-7', 'pinkyellowgreen-8', 'pinkyellowgreen-9', 'pinkyellowgreen-10', 'pinkyellowgreen-11', 'purpleorange', 'purpleorange-3', 'purpleorange-4', 'purpleorange-5', 'purpleorange-6', 'purpleorange-7', 'purpleorange-8', 'purpleorange-9', 'purpleorange-10', 'purpleorange-11', 'redblue', 'redblue-3', 'redblue-4', 'redblue-5', 'redblue-6', 'redblue-7', 'redblue-8', 'redblue-9', 'redblue-10', 'redblue-11', 'redgrey', 'redgrey-3', 'redgrey-4', 'redgrey-5', 'redgrey-6', 'redgrey-7', 'redgrey-8', 'redgrey-9', 'redgrey-10', 'redgrey-11', 'redyellowblue', 'redyellowblue-3', 'redyellowblue-4', 'redyellowblue-5', 'redyellowblue-6', 'redyellowblue-7', 'redyellowblue-8', 'redyellowblue-9', 'redyellowblue-10', 'redyellowblue-11', 'redyellowgreen', 'redyellowgreen-3', 'redyellowgreen-4', 'redyellowgreen-5', 'redyellowgreen-6', 'redyellowgreen-7', 'redyellowgreen-8', 'redyellowgreen-9', 'redyellowgreen-10', 'redyellowgreen-11', 'spectral', 'spectral-3', 'spectral-4', 'spectral-5', 'spectral-6', 'spectral-7', 'spectral-8', 'spectral-9', 'spectral-10', 'spectral-11', 'blues', 'tealblues', 'teals', 'greens', 'browns', 'greys', 'purples', 'warmgreys', 'reds', 'oranges', 'rainbow', 'sinebow', 'turbo', 'viridis', 'inferno', 'magma', 'plasma', 'cividis', 'bluegreen', 'bluegreen-3', 'bluegreen-4', 'bluegreen-5', 'bluegreen-6', 'bluegreen-7', 'bluegreen-8', 'bluegreen-9', 'bluepurple', 'bluepurple-3', 'bluepurple-4', 'bluepurple-5', 'bluepurple-6', 'bluepurple-7', 'bluepurple-8', 'bluepurple-9', 'goldgreen', 'goldgreen-3', 'goldgreen-4', 'goldgreen-5', 'goldgreen-6', 'goldgreen-7', 'goldgreen-8', 'goldgreen-9', 'goldorange', 'goldorange-3', 'goldorange-4', 'goldorange-5', 'goldorange-6', 'goldorange-7', 'goldorange-8', 'goldorange-9', 'goldred', 'goldred-3', 'goldred-4', 'goldred-5', 'goldred-6', 'goldred-7', 'goldred-8', 'goldred-9', 'greenblue', 'greenblue-3', 'greenblue-4', 'greenblue-5', 'greenblue-6', 'greenblue-7', 'greenblue-8', 'greenblue-9', 'orangered', 'orangered-3', 'orangered-4', 'orangered-5', 'orangered-6', 'orangered-7', 'orangered-8', 'orangered-9', 'purplebluegreen', 'purplebluegreen-3', 'purplebluegreen-4', 'purplebluegreen-5', 'purplebluegreen-6', 'purplebluegreen-7', 'purplebluegreen-8', 'purplebluegreen-9', 'purpleblue', 'purpleblue-3', 'purpleblue-4', 'purpleblue-5', 'purpleblue-6', 'purpleblue-7', 'purpleblue-8', 'purpleblue-9', 'purplered', 'purplered-3', 'purplered-4', 'purplered-5', 'purplered-6', 'purplered-7', 'purplered-8', 'purplered-9', 'redpurple', 'redpurple-3', 'redpurple-4', 'redpurple-5', 'redpurple-6', 'redpurple-7', 'redpurple-8', 'redpurple-9', 'yellowgreenblue', 'yellowgreenblue-3', 'yellowgreenblue-4', 'yellowgreenblue-5', 'yellowgreenblue-6', 'yellowgreenblue-7', 'yellowgreenblue-8', 'yellowgreenblue-9', 'yellowgreen', 'yellowgreen-3', 'yellowgreen-4', 'yellowgreen-5', 'yellowgreen-6', 'yellowgreen-7', 'yellowgreen-8', 'yellowgreen-9', 'yelloworangebrown', 'yelloworangebrown-3', 'yelloworangebrown-4', 'yelloworangebrown-5', 'yelloworangebrown-6', 'yelloworangebrown-7', 'yelloworangebrown-8', 'yelloworangebrown-9', 'yelloworangered', 'yelloworangered-3', 'yelloworangered-4', 'yelloworangered-5', 'yelloworangered-6', 'yelloworangered-7', 'yelloworangered-8', 'yelloworangered-9', 'darkblue', 'darkblue-3', 'darkblue-4', 'darkblue-5', 'darkblue-6', 'darkblue-7', 'darkblue-8', 'darkblue-9', 'darkgold', 'darkgold-3', 'darkgold-4', 'darkgold-5', 'darkgold-6', 'darkgold-7', 'darkgold-8', 'darkgold-9', 'darkgreen', 'darkgreen-3', 'darkgreen-4', 'darkgreen-5', 'darkgreen-6', 'darkgreen-7', 'darkgreen-8', 'darkgreen-9', 'darkmulti', 'darkmulti-3', 'darkmulti-4', 'darkmulti-5', 'darkmulti-6', 'darkmulti-7', 'darkmulti-8', 'darkmulti-9', 'darkred', 'darkred-3', 'darkred-4', 'darkred-5', 'darkred-6', 'darkred-7', 'darkred-8', 'darkred-9', 'lightgreyred', 'lightgreyred-3', 'lightgreyred-4', 'lightgreyred-5', 'lightgreyred-6', 'lightgreyred-7', 'lightgreyred-8', 'lightgreyred-9', 'lightgreyteal', 'lightgreyteal-3', 'lightgreyteal-4', 'lightgreyteal-5', 'lightgreyteal-6', 'lightgreyteal-7', 'lightgreyteal-8', 'lightgreyteal-9', 'lightmulti', 'lightmulti-3', 'lightmulti-4', 'lightmulti-5', 'lightmulti-6', 'lightmulti-7', 'lightmulti-8', 'lightmulti-9', 'lightorange', 'lightorange-3', 'lightorange-4', 'lightorange-5', 'lightorange-6', 'lightorange-7', 'lightorange-8', 'lightorange-9', 'lighttealblue', 'lighttealblue-3', 'lighttealblue-4', 'lighttealblue-5', 'lighttealblue-6', 'lighttealblue-7', 'lighttealblue-8', 'lighttealblue-9'] + A string indicating a color `scheme + `__ name (e.g., + ``"category10"`` or ``"blues"``) or a `scheme parameter object + `__. + + Discrete color schemes may be used with `discrete + `__ or `discretizing + `__ scales. + Continuous color schemes are intended for use with color scales. + + To set a custom scheme, instead set the list of values `as the scale range + `__. + + For the full list of supported schemes, please refer to the `Vega Scheme + `__ reference. + type : :class:`ScaleType`, Literal['linear', 'log', 'pow', 'sqrt', 'symlog', 'identity', 'sequential', 'time', 'utc', 'quantile', 'quantize', 'threshold', 'bin-ordinal', 'ordinal', 'point', 'band'] + 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" + `__, `"symlog" + `__, `"log" + `__, `"time" + `__, `"utc" + `__. + + 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-ordinal" + `__, `"quantile" + `__, `"quantize" + `__ and `"threshold" + `__. + + **Default value:** please see the `scale type table + `__. + zero : bool, dict, :class:`ExprRef` + 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 + binned and no custom ``domain`` is provided; ``false`` otherwise. + + **Note:** Log, time, and utc scales do not support ``zero``. + """ + + _schema = {"$ref": "#/definitions/Scale"} + + def __init__( + self, + align: Optional[float | Parameter | SchemaBase | Map] = Undefined, + base: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + constant: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domain: Optional[ + Parameter + | SchemaBase + | Literal["unaggregated"] + | Sequence[ + str | bool | float | Temporal | Parameter | SchemaBase | Map | None + ] + | Map + ] = Undefined, + domainMax: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined, + domainMin: Optional[ + float | Temporal | Parameter | SchemaBase | Map + ] = Undefined, + domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined, + exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[ + Parameter | SchemaBase | Map | ScaleInterpolateEnum_T + ] = Undefined, + nice: Optional[ + bool | float | Parameter | SchemaBase | Map | TimeInterval_T + ] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + range: Optional[ + SchemaBase + | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map] + | Map + | RangeEnum_T + ] = Undefined, + rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined, + reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined, + type: Optional[SchemaBase | ScaleType_T] = Undefined, + zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + align=align, + base=base, + bins=bins, + clamp=clamp, + constant=constant, + domain=domain, + domainMax=domainMax, + domainMid=domainMid, + domainMin=domainMin, + domainRaw=domainRaw, + exponent=exponent, + interpolate=interpolate, + nice=nice, + padding=padding, + paddingInner=paddingInner, + paddingOuter=paddingOuter, + range=range, + rangeMax=rangeMax, + rangeMin=rangeMin, + reverse=reverse, + round=round, + scheme=scheme, + type=type, + zero=zero, + **kwds, + ) + + +class ScaleBins(VegaLiteSchema): + """ScaleBins schema wrapper.""" + + _schema = {"$ref": "#/definitions/ScaleBins"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ScaleBinParams(ScaleBins): + """ + ScaleBinParams schema wrapper. + + Parameters + ---------- + step : float + The step size defining the bin interval width. + start : float + The starting (lowest-valued) bin boundary. + + **Default value:** The lowest value of the scale domain will be used. + stop : float + The stopping (highest-valued) bin boundary. + + **Default value:** The highest value of the scale domain will be used. + """ + + _schema = {"$ref": "#/definitions/ScaleBinParams"} + + def __init__( + self, + step: Optional[float] = Undefined, + start: Optional[float] = Undefined, + stop: Optional[float] = Undefined, + **kwds, + ): + super().__init__(step=step, start=start, stop=stop, **kwds) + + +class ScaleConfig(VegaLiteSchema): + """ + ScaleConfig schema wrapper. + + Parameters + ---------- + bandPaddingInner : dict, float, :class:`ExprRef` + Default inner padding for ``x`` and ``y`` band scales. + + **Default value:** + + * ``nestedOffsetPaddingInner`` for x/y scales with nested x/y offset scales. + * ``barBandPaddingInner`` for bar marks (``0.1`` by default) + * ``rectBandPaddingInner`` for rect and other marks (``0`` by default) + bandPaddingOuter : dict, float, :class:`ExprRef` + Default outer padding for ``x`` and ``y`` band scales. + + **Default value:** ``paddingInner/2`` (which makes *width/height = number of unique + values * step*) + bandWithNestedOffsetPaddingInner : dict, float, :class:`ExprRef` + Default inner padding for ``x`` and ``y`` band scales with nested ``xOffset`` and + ``yOffset`` encoding. + + **Default value:** ``0.2`` + bandWithNestedOffsetPaddingOuter : dict, float, :class:`ExprRef` + Default outer padding for ``x`` and ``y`` band scales with nested ``xOffset`` and + ``yOffset`` encoding. + + **Default value:** ``0.2`` + barBandPaddingInner : dict, float, :class:`ExprRef` + Default inner padding for ``x`` and ``y`` band-ordinal scales of ``"bar"`` marks. + + **Default value:** ``0.1`` + clamp : bool, dict, :class:`ExprRef` + If true, values that exceed the data domain are clamped to either the minimum or + maximum range value + continuousPadding : dict, float, :class:`ExprRef` + Default padding for continuous x/y scales. + + **Default:** The bar width for continuous x-scale of a vertical bar and continuous + y-scale of a horizontal bar.; ``0`` otherwise. + invalid : dict, :class:`ScaleInvalidDataConfig` + An object that defines scale outputs per channel for invalid values (nulls and NaNs + on a continuous scale). + + * The keys in this object are the scale channels. + * The values is either ``"zero-or-min"`` (use zero if the scale includes zero or min + value otherwise) or a value definition ``{value: ...}``. + + *Example:* Setting this ``config.scale.invalid`` property to ``{color: {value: + '#aaa'}}`` will make the visualization color all invalid values with '#aaa'. + + See [https://vega.github.io/vega-lite/docs/invalid-data.html](Invalid Data Docs) for + more details. + maxBandSize : float + The default max value for mapping quantitative fields to bar's size/bandSize. + + If undefined (default), we will use the axis's size (width or height) - 1. + maxFontSize : float + The default max value for mapping quantitative fields to text's size/fontSize scale. + + **Default value:** ``40`` + maxOpacity : float + Default max opacity for mapping a field to opacity. + + **Default value:** ``0.8`` + maxSize : float + Default max value for point size scale. + maxStrokeWidth : float + Default max strokeWidth for the scale of strokeWidth for rule and line marks and of + size for trail marks. + + **Default value:** ``4`` + minBandSize : float + The default min value for mapping quantitative fields to bar and tick's + size/bandSize scale. + + **Default value:** ``2`` + minFontSize : float + The default min value for mapping quantitative fields to text's size/fontSize scale. + + **Default value:** ``8`` + minOpacity : float + Default minimum opacity for mapping a field to opacity. + + **Default value:** ``0.3`` + minSize : float + Default minimum value for point size scale. + + **Default value:** ``9`` + minStrokeWidth : float + Default minimum strokeWidth for the scale of strokeWidth for rule and line marks and + of size for trail marks. + + **Default value:** ``1`` + offsetBandPaddingInner : dict, float, :class:`ExprRef` + Default padding inner for xOffset/yOffset's band scales. + + **Default Value:** ``0`` + offsetBandPaddingOuter : dict, float, :class:`ExprRef` + Default padding outer for xOffset/yOffset's band scales. + + **Default Value:** ``0`` + pointPadding : dict, float, :class:`ExprRef` + Default outer padding for ``x`` and ``y`` point-ordinal scales. + + **Default value:** ``0.5`` (which makes *width/height = number of unique values * + step*) + quantileCount : float + Default range cardinality for `quantile + `__ scale. + + **Default value:** ``4`` + quantizeCount : float + Default range cardinality for `quantize + `__ scale. + + **Default value:** ``4`` + rectBandPaddingInner : dict, float, :class:`ExprRef` + Default inner padding for ``x`` and ``y`` band-ordinal scales of ``"rect"`` marks. + + **Default value:** ``0`` + round : bool, dict, :class:`ExprRef` + If true, rounds numeric output values to integers. This can be helpful for snapping + to the pixel grid. (Only available for ``x``, ``y``, and ``size`` scales.) + tickBandPaddingInner : dict, float, :class:`ExprRef` + Default inner padding for ``x`` and ``y`` band-ordinal scales of ``"tick"`` marks. + + **Default value:** ``0.25`` + useUnaggregatedDomain : bool + Use the source data range before aggregation as scale domain instead of aggregated + data for aggregate axis. + + This is equivalent to setting ``domain`` to ``"unaggregate"`` for aggregated + *quantitative* fields by default. + + This property only works with aggregate functions that produce values within the raw + data domain (``"mean"``, ``"average"``, ``"median"``, ``"q1"``, ``"q3"``, ``"min"``, + ``"max"``). For other aggregations that produce values outside of the raw data + domain (e.g. ``"count"``, ``"sum"``), this property is ignored. + + **Default value:** ``false`` + xReverse : bool, dict, :class:`ExprRef` + Reverse x-scale by default (useful for right-to-left charts). + zero : bool + Default ``scale.zero`` for `continuous + `__ scales except for + (1) x/y-scales of non-ranged bar or area charts and (2) size scales. + + **Default value:** ``true`` + """ + + _schema = {"$ref": "#/definitions/ScaleConfig"} + + def __init__( + self, + bandPaddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bandPaddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined, + bandWithNestedOffsetPaddingInner: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + bandWithNestedOffsetPaddingOuter: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + barBandPaddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined, + clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + continuousPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + invalid: Optional[SchemaBase | Map] = Undefined, + maxBandSize: Optional[float] = Undefined, + maxFontSize: Optional[float] = Undefined, + maxOpacity: Optional[float] = Undefined, + maxSize: Optional[float] = Undefined, + maxStrokeWidth: Optional[float] = Undefined, + minBandSize: Optional[float] = Undefined, + minFontSize: Optional[float] = Undefined, + minOpacity: Optional[float] = Undefined, + minSize: Optional[float] = Undefined, + minStrokeWidth: Optional[float] = Undefined, + offsetBandPaddingInner: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + offsetBandPaddingOuter: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + pointPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + quantileCount: Optional[float] = Undefined, + quantizeCount: Optional[float] = Undefined, + rectBandPaddingInner: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + round: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + tickBandPaddingInner: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + useUnaggregatedDomain: Optional[bool] = Undefined, + xReverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + zero: Optional[bool] = Undefined, + **kwds, + ): + super().__init__( + bandPaddingInner=bandPaddingInner, + bandPaddingOuter=bandPaddingOuter, + bandWithNestedOffsetPaddingInner=bandWithNestedOffsetPaddingInner, + bandWithNestedOffsetPaddingOuter=bandWithNestedOffsetPaddingOuter, + barBandPaddingInner=barBandPaddingInner, + clamp=clamp, + continuousPadding=continuousPadding, + invalid=invalid, + maxBandSize=maxBandSize, + maxFontSize=maxFontSize, + maxOpacity=maxOpacity, + maxSize=maxSize, + maxStrokeWidth=maxStrokeWidth, + minBandSize=minBandSize, + minFontSize=minFontSize, + minOpacity=minOpacity, + minSize=minSize, + minStrokeWidth=minStrokeWidth, + offsetBandPaddingInner=offsetBandPaddingInner, + offsetBandPaddingOuter=offsetBandPaddingOuter, + pointPadding=pointPadding, + quantileCount=quantileCount, + quantizeCount=quantizeCount, + rectBandPaddingInner=rectBandPaddingInner, + round=round, + tickBandPaddingInner=tickBandPaddingInner, + useUnaggregatedDomain=useUnaggregatedDomain, + xReverse=xReverse, + zero=zero, + **kwds, + ) + + +class ScaleDatumDef(OffsetDef): + """ + ScaleDatumDef schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/ScaleDatumDef"} + + def __init__( + self, + bandPosition: Optional[float] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + bandPosition=bandPosition, + datum=datum, + scale=scale, + title=title, + type=type, + **kwds, + ) + + +class ScaleFieldDef(OffsetDef): + r""" + ScaleFieldDef schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/ScaleFieldDef"} + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + scale=scale, + sort=sort, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +class ScaleInterpolateEnum(VegaLiteSchema): + """ScaleInterpolateEnum schema wrapper.""" + + _schema = {"$ref": "#/definitions/ScaleInterpolateEnum"} + + def __init__(self, *args): + super().__init__(*args) + + +class ScaleInterpolateParams(VegaLiteSchema): + """ + ScaleInterpolateParams schema wrapper. + + Parameters + ---------- + type : Literal['rgb', 'cubehelix', 'cubehelix-long'] + + gamma : float + + """ + + _schema = {"$ref": "#/definitions/ScaleInterpolateParams"} + + def __init__( + self, + type: Optional[Literal["rgb", "cubehelix", "cubehelix-long"]] = Undefined, + gamma: Optional[float] = Undefined, + **kwds, + ): + super().__init__(type=type, gamma=gamma, **kwds) + + +class ScaleInvalidDataConfig(VegaLiteSchema): + """ + ScaleInvalidDataConfig schema wrapper. + + Parameters + ---------- + angle : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsangle`, :class:`ScaleInvalidDataShowAsValueangle` + + color : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAscolor`, :class:`ScaleInvalidDataShowAsValuecolor` + + fill : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsfill`, :class:`ScaleInvalidDataShowAsValuefill` + + fillOpacity : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsfillOpacity`, :class:`ScaleInvalidDataShowAsValuefillOpacity` + + opacity : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsopacity`, :class:`ScaleInvalidDataShowAsValueopacity` + + radius : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsradius`, :class:`ScaleInvalidDataShowAsValueradius` + + shape : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsshape`, :class:`ScaleInvalidDataShowAsValueshape` + + size : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAssize`, :class:`ScaleInvalidDataShowAsValuesize` + + stroke : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsstroke`, :class:`ScaleInvalidDataShowAsValuestroke` + + strokeDash : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsstrokeDash`, :class:`ScaleInvalidDataShowAsValuestrokeDash` + + strokeOpacity : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsstrokeOpacity`, :class:`ScaleInvalidDataShowAsValuestrokeOpacity` + + strokeWidth : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsstrokeWidth`, :class:`ScaleInvalidDataShowAsValuestrokeWidth` + + theta : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAstheta`, :class:`ScaleInvalidDataShowAsValuetheta` + + x : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsx`, :class:`ScaleInvalidDataShowAsValuex` + + xOffset : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsxOffset`, :class:`ScaleInvalidDataShowAsValuexOffset` + + y : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsy`, :class:`ScaleInvalidDataShowAsValuey` + + yOffset : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsyOffset`, :class:`ScaleInvalidDataShowAsValueyOffset` + + """ + + _schema = {"$ref": "#/definitions/ScaleInvalidDataConfig"} + + def __init__( + self, + angle: Optional[SchemaBase | Literal["zero-or-min"] | Map] = Undefined, + color: Optional[SchemaBase | Literal["zero-or-min"] | Map] = Undefined, + fill: Optional[SchemaBase | Literal["zero-or-min"] | Map] = Undefined, + fillOpacity: Optional[SchemaBase | Literal["zero-or-min"] | Map] = Undefined, + opacity: Optional[SchemaBase | Literal["zero-or-min"] | Map] = Undefined, + radius: Optional[SchemaBase | Literal["zero-or-min"] | Map] = Undefined, + shape: Optional[SchemaBase | Literal["zero-or-min"] | Map] = Undefined, + size: Optional[SchemaBase | Literal["zero-or-min"] | Map] = Undefined, + stroke: Optional[SchemaBase | Literal["zero-or-min"] | Map] = Undefined, + strokeDash: Optional[SchemaBase | Literal["zero-or-min"] | Map] = Undefined, + strokeOpacity: Optional[SchemaBase | Literal["zero-or-min"] | Map] = Undefined, + strokeWidth: Optional[SchemaBase | Literal["zero-or-min"] | Map] = Undefined, + theta: Optional[SchemaBase | Literal["zero-or-min"] | Map] = Undefined, + x: Optional[SchemaBase | Literal["zero-or-min"] | Map] = Undefined, + xOffset: Optional[SchemaBase | Literal["zero-or-min"] | Map] = Undefined, + y: Optional[SchemaBase | Literal["zero-or-min"] | Map] = Undefined, + yOffset: Optional[SchemaBase | Literal["zero-or-min"] | Map] = Undefined, + **kwds, + ): + super().__init__( + angle=angle, + color=color, + fill=fill, + fillOpacity=fillOpacity, + opacity=opacity, + radius=radius, + shape=shape, + size=size, + stroke=stroke, + strokeDash=strokeDash, + strokeOpacity=strokeOpacity, + strokeWidth=strokeWidth, + theta=theta, + x=x, + xOffset=xOffset, + y=y, + yOffset=yOffset, + **kwds, + ) + + +class ScaleInvalidDataShowAsangle(VegaLiteSchema): + """ScaleInvalidDataShowAsangle schema wrapper.""" + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAs<"angle">'} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ScaleInvalidDataShowAsValueangle(ScaleInvalidDataShowAsangle): + """ + ScaleInvalidDataShowAsValueangle schema wrapper. + + Parameters + ---------- + value : float + The rotation angle of the text, in degrees. + """ + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAsValue<"angle">'} + + def __init__(self, value: Optional[float] = Undefined, **kwds): + super().__init__(value=value, **kwds) + + +class ScaleInvalidDataShowAscolor(VegaLiteSchema): + """ScaleInvalidDataShowAscolor schema wrapper.""" + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAs<"color">'} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ScaleInvalidDataShowAsValuecolor(ScaleInvalidDataShowAscolor): + """ + ScaleInvalidDataShowAsValuecolor schema wrapper. + + Parameters + ---------- + value : str, dict, :class:`Color`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + """ + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAsValue<"color">'} + + def __init__( + self, value: Optional[str | SchemaBase | Map | ColorName_T] = Undefined, **kwds + ): + super().__init__(value=value, **kwds) + + +class ScaleInvalidDataShowAsfill(VegaLiteSchema): + """ScaleInvalidDataShowAsfill schema wrapper.""" + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAs<"fill">'} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ScaleInvalidDataShowAsValuefill(ScaleInvalidDataShowAsfill): + """ + ScaleInvalidDataShowAsValuefill schema wrapper. + + Parameters + ---------- + value : str, dict, :class:`Color`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default fill color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove fill. + + **Default value:** (None) + """ + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAsValue<"fill">'} + + def __init__( + self, + value: Optional[str | SchemaBase | Map | ColorName_T | None] = Undefined, + **kwds, + ): + super().__init__(value=value, **kwds) + + +class ScaleInvalidDataShowAsfillOpacity(VegaLiteSchema): + """ScaleInvalidDataShowAsfillOpacity schema wrapper.""" + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAs<"fillOpacity">'} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ScaleInvalidDataShowAsValuefillOpacity(ScaleInvalidDataShowAsfillOpacity): + """ + ScaleInvalidDataShowAsValuefillOpacity schema wrapper. + + Parameters + ---------- + value : float + The fill opacity (value between [0,1]). + + **Default value:** ``1`` + """ + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAsValue<"fillOpacity">'} + + def __init__(self, value: Optional[float] = Undefined, **kwds): + super().__init__(value=value, **kwds) + + +class ScaleInvalidDataShowAsopacity(VegaLiteSchema): + """ScaleInvalidDataShowAsopacity schema wrapper.""" + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAs<"opacity">'} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ScaleInvalidDataShowAsValueopacity(ScaleInvalidDataShowAsopacity): + """ + ScaleInvalidDataShowAsValueopacity schema wrapper. + + Parameters + ---------- + value : float + The overall opacity (value between [0,1]). + + **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, + ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. + """ + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAsValue<"opacity">'} + + def __init__(self, value: Optional[float] = Undefined, **kwds): + super().__init__(value=value, **kwds) + + +class ScaleInvalidDataShowAsradius(VegaLiteSchema): + """ScaleInvalidDataShowAsradius schema wrapper.""" + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAs<"radius">'} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ScaleInvalidDataShowAsValueradius(ScaleInvalidDataShowAsradius): + """ + ScaleInvalidDataShowAsValueradius schema wrapper. + + Parameters + ---------- + value : float + For arc mark, the primary (outer) radius in pixels. + + For text marks, polar coordinate radial offset, in pixels, of the text from the + origin determined by the ``x`` and ``y`` properties. + + **Default value:** ``min(plot_width, plot_height)/2`` + """ + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAsValue<"radius">'} + + def __init__(self, value: Optional[float] = Undefined, **kwds): + super().__init__(value=value, **kwds) + + +class ScaleInvalidDataShowAsshape(VegaLiteSchema): + """ScaleInvalidDataShowAsshape schema wrapper.""" + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAs<"shape">'} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ScaleInvalidDataShowAsValueshape(ScaleInvalidDataShowAsshape): + """ + ScaleInvalidDataShowAsValueshape schema wrapper. + + Parameters + ---------- + value : str, :class:`SymbolShape` + Shape of the point marks. Supported values include: + + * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, + ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or + ``"triangle-left"``. + * the line symbol ``"stroke"`` + * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` + * a custom `SVG path string + `__ (For correct + sizing, custom shape paths should be defined within a square bounding box with + coordinates ranging from -1 to 1 along both the x and y dimensions.) + + **Default value:** ``"circle"`` + """ + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAsValue<"shape">'} + + def __init__(self, value: Optional[str | SchemaBase] = Undefined, **kwds): + super().__init__(value=value, **kwds) + + +class ScaleInvalidDataShowAssize(VegaLiteSchema): + """ScaleInvalidDataShowAssize schema wrapper.""" + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAs<"size">'} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ScaleInvalidDataShowAsValuesize(ScaleInvalidDataShowAssize): + """ + ScaleInvalidDataShowAsValuesize schema wrapper. + + Parameters + ---------- + value : float + Default size for marks. + + * For ``point``/``circle``/``square``, this represents the pixel area of the marks. + Note that this value sets the area of the symbol; the side lengths will increase + with the square root of this value. + * For ``bar``, this represents the band size of the bar, in pixels. + * For ``text``, this represents the font size, in pixels. + + **Default value:** + + * ``30`` for point, circle, square marks; width/height's ``step`` + * ``2`` for bar marks with discrete dimensions; + * ``5`` for bar marks with continuous dimensions; + * ``11`` for text marks. + """ + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAsValue<"size">'} + + def __init__(self, value: Optional[float] = Undefined, **kwds): + super().__init__(value=value, **kwds) + + +class ScaleInvalidDataShowAsstroke(VegaLiteSchema): + """ScaleInvalidDataShowAsstroke schema wrapper.""" + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAs<"stroke">'} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ScaleInvalidDataShowAsValuestroke(ScaleInvalidDataShowAsstroke): + """ + ScaleInvalidDataShowAsValuestroke schema wrapper. + + Parameters + ---------- + value : str, dict, :class:`Color`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default stroke color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove stroke. + + **Default value:** (None) + """ + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAsValue<"stroke">'} + + def __init__( + self, + value: Optional[str | SchemaBase | Map | ColorName_T | None] = Undefined, + **kwds, + ): + super().__init__(value=value, **kwds) + + +class ScaleInvalidDataShowAsstrokeDash(VegaLiteSchema): + """ScaleInvalidDataShowAsstrokeDash schema wrapper.""" + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAs<"strokeDash">'} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ScaleInvalidDataShowAsValuestrokeDash(ScaleInvalidDataShowAsstrokeDash): + """ + ScaleInvalidDataShowAsValuestrokeDash schema wrapper. + + Parameters + ---------- + value : Sequence[float] + An array of alternating stroke, space lengths for creating dashed or dotted lines. + """ + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAsValue<"strokeDash">'} + + def __init__(self, value: Optional[Sequence[float]] = Undefined, **kwds): + super().__init__(value=value, **kwds) + + +class ScaleInvalidDataShowAsstrokeOpacity(VegaLiteSchema): + """ScaleInvalidDataShowAsstrokeOpacity schema wrapper.""" + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAs<"strokeOpacity">'} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ScaleInvalidDataShowAsValuestrokeOpacity(ScaleInvalidDataShowAsstrokeOpacity): + """ + ScaleInvalidDataShowAsValuestrokeOpacity schema wrapper. + + Parameters + ---------- + value : float + The stroke opacity (value between [0,1]). + + **Default value:** ``1`` + """ + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAsValue<"strokeOpacity">'} + + def __init__(self, value: Optional[float] = Undefined, **kwds): + super().__init__(value=value, **kwds) + + +class ScaleInvalidDataShowAsstrokeWidth(VegaLiteSchema): + """ScaleInvalidDataShowAsstrokeWidth schema wrapper.""" + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAs<"strokeWidth">'} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ScaleInvalidDataShowAsValuestrokeWidth(ScaleInvalidDataShowAsstrokeWidth): + """ + ScaleInvalidDataShowAsValuestrokeWidth schema wrapper. + + Parameters + ---------- + value : float + The stroke width, in pixels. + """ + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAsValue<"strokeWidth">'} + + def __init__(self, value: Optional[float] = Undefined, **kwds): + super().__init__(value=value, **kwds) + + +class ScaleInvalidDataShowAstheta(VegaLiteSchema): + """ScaleInvalidDataShowAstheta schema wrapper.""" + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAs<"theta">'} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ScaleInvalidDataShowAsValuetheta(ScaleInvalidDataShowAstheta): + """ + ScaleInvalidDataShowAsValuetheta schema wrapper. + + Parameters + ---------- + value : float + * For arc marks, the arc length in radians if theta2 is not specified, otherwise the + start arc angle. (A value of 0 indicates up or “north”, increasing values proceed + clockwise.) + + * For text marks, polar coordinate angle in radians. + """ + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAsValue<"theta">'} + + def __init__(self, value: Optional[float] = Undefined, **kwds): + super().__init__(value=value, **kwds) + + +class ScaleInvalidDataShowAsx(VegaLiteSchema): + """ScaleInvalidDataShowAsx schema wrapper.""" + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAs<"x">'} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ScaleInvalidDataShowAsValuex(ScaleInvalidDataShowAsx): + """ + ScaleInvalidDataShowAsValuex schema wrapper. + + Parameters + ---------- + value : float, Literal['width'] + X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without + specified ``x2`` or ``width``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + """ + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAsValue<"x">'} + + def __init__(self, value: Optional[float | Literal["width"]] = Undefined, **kwds): + super().__init__(value=value, **kwds) + + +class ScaleInvalidDataShowAsxOffset(VegaLiteSchema): + """ScaleInvalidDataShowAsxOffset schema wrapper.""" + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAs<"xOffset">'} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ScaleInvalidDataShowAsValuexOffset(ScaleInvalidDataShowAsxOffset): + """ + ScaleInvalidDataShowAsValuexOffset schema wrapper. + + Parameters + ---------- + value : float + Offset for x-position. + """ + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAsValue<"xOffset">'} + + def __init__(self, value: Optional[float] = Undefined, **kwds): + super().__init__(value=value, **kwds) + + +class ScaleInvalidDataShowAsy(VegaLiteSchema): + """ScaleInvalidDataShowAsy schema wrapper.""" + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAs<"y">'} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ScaleInvalidDataShowAsValuey(ScaleInvalidDataShowAsy): + """ + ScaleInvalidDataShowAsValuey schema wrapper. + + Parameters + ---------- + value : float, Literal['height'] + Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without + specified ``y2`` or ``height``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + """ + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAsValue<"y">'} + + def __init__(self, value: Optional[float | Literal["height"]] = Undefined, **kwds): + super().__init__(value=value, **kwds) + + +class ScaleInvalidDataShowAsyOffset(VegaLiteSchema): + """ScaleInvalidDataShowAsyOffset schema wrapper.""" + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAs<"yOffset">'} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ScaleInvalidDataShowAsValueyOffset(ScaleInvalidDataShowAsyOffset): + """ + ScaleInvalidDataShowAsValueyOffset schema wrapper. + + Parameters + ---------- + value : float + Offset for y-position. + """ + + _schema = {"$ref": '#/definitions/ScaleInvalidDataShowAsValue<"yOffset">'} + + def __init__(self, value: Optional[float] = Undefined, **kwds): + super().__init__(value=value, **kwds) + + +class ScaleResolveMap(VegaLiteSchema): + """ + ScaleResolveMap schema wrapper. + + Parameters + ---------- + angle : :class:`ResolveMode`, Literal['independent', 'shared'] + + color : :class:`ResolveMode`, Literal['independent', 'shared'] + + fill : :class:`ResolveMode`, Literal['independent', 'shared'] + + fillOpacity : :class:`ResolveMode`, Literal['independent', 'shared'] + + opacity : :class:`ResolveMode`, Literal['independent', 'shared'] + + radius : :class:`ResolveMode`, Literal['independent', 'shared'] + + shape : :class:`ResolveMode`, Literal['independent', 'shared'] + + size : :class:`ResolveMode`, Literal['independent', 'shared'] + + stroke : :class:`ResolveMode`, Literal['independent', 'shared'] + + strokeDash : :class:`ResolveMode`, Literal['independent', 'shared'] + + strokeOpacity : :class:`ResolveMode`, Literal['independent', 'shared'] + + strokeWidth : :class:`ResolveMode`, Literal['independent', 'shared'] + + theta : :class:`ResolveMode`, Literal['independent', 'shared'] + + x : :class:`ResolveMode`, Literal['independent', 'shared'] + + xOffset : :class:`ResolveMode`, Literal['independent', 'shared'] + + y : :class:`ResolveMode`, Literal['independent', 'shared'] + + yOffset : :class:`ResolveMode`, Literal['independent', 'shared'] + + """ + + _schema = {"$ref": "#/definitions/ScaleResolveMap"} + + def __init__( + self, + angle: Optional[SchemaBase | ResolveMode_T] = Undefined, + color: Optional[SchemaBase | ResolveMode_T] = Undefined, + fill: Optional[SchemaBase | ResolveMode_T] = Undefined, + fillOpacity: Optional[SchemaBase | ResolveMode_T] = Undefined, + opacity: Optional[SchemaBase | ResolveMode_T] = Undefined, + radius: Optional[SchemaBase | ResolveMode_T] = Undefined, + shape: Optional[SchemaBase | ResolveMode_T] = Undefined, + size: Optional[SchemaBase | ResolveMode_T] = Undefined, + stroke: Optional[SchemaBase | ResolveMode_T] = Undefined, + strokeDash: Optional[SchemaBase | ResolveMode_T] = Undefined, + strokeOpacity: Optional[SchemaBase | ResolveMode_T] = Undefined, + strokeWidth: Optional[SchemaBase | ResolveMode_T] = Undefined, + theta: Optional[SchemaBase | ResolveMode_T] = Undefined, + x: Optional[SchemaBase | ResolveMode_T] = Undefined, + xOffset: Optional[SchemaBase | ResolveMode_T] = Undefined, + y: Optional[SchemaBase | ResolveMode_T] = Undefined, + yOffset: Optional[SchemaBase | ResolveMode_T] = Undefined, + **kwds, + ): + super().__init__( + angle=angle, + color=color, + fill=fill, + fillOpacity=fillOpacity, + opacity=opacity, + radius=radius, + shape=shape, + size=size, + stroke=stroke, + strokeDash=strokeDash, + strokeOpacity=strokeOpacity, + strokeWidth=strokeWidth, + theta=theta, + x=x, + xOffset=xOffset, + y=y, + yOffset=yOffset, + **kwds, + ) + + +class ScaleType(VegaLiteSchema): + """ScaleType schema wrapper.""" + + _schema = {"$ref": "#/definitions/ScaleType"} + + def __init__(self, *args): + super().__init__(*args) + + +class SchemeParams(VegaLiteSchema): + """ + SchemeParams schema wrapper. + + Parameters + ---------- + name : :class:`Cyclical`, :class:`Diverging`, :class:`Categorical`, :class:`ColorScheme`, :class:`SequentialMultiHue`, :class:`SequentialSingleHue`, Literal['accent', 'category10', 'category20', 'category20b', 'category20c', 'dark2', 'paired', 'pastel1', 'pastel2', 'set1', 'set2', 'set3', 'tableau10', 'tableau20', 'blueorange', 'blueorange-3', 'blueorange-4', 'blueorange-5', 'blueorange-6', 'blueorange-7', 'blueorange-8', 'blueorange-9', 'blueorange-10', 'blueorange-11', 'brownbluegreen', 'brownbluegreen-3', 'brownbluegreen-4', 'brownbluegreen-5', 'brownbluegreen-6', 'brownbluegreen-7', 'brownbluegreen-8', 'brownbluegreen-9', 'brownbluegreen-10', 'brownbluegreen-11', 'purplegreen', 'purplegreen-3', 'purplegreen-4', 'purplegreen-5', 'purplegreen-6', 'purplegreen-7', 'purplegreen-8', 'purplegreen-9', 'purplegreen-10', 'purplegreen-11', 'pinkyellowgreen', 'pinkyellowgreen-3', 'pinkyellowgreen-4', 'pinkyellowgreen-5', 'pinkyellowgreen-6', 'pinkyellowgreen-7', 'pinkyellowgreen-8', 'pinkyellowgreen-9', 'pinkyellowgreen-10', 'pinkyellowgreen-11', 'purpleorange', 'purpleorange-3', 'purpleorange-4', 'purpleorange-5', 'purpleorange-6', 'purpleorange-7', 'purpleorange-8', 'purpleorange-9', 'purpleorange-10', 'purpleorange-11', 'redblue', 'redblue-3', 'redblue-4', 'redblue-5', 'redblue-6', 'redblue-7', 'redblue-8', 'redblue-9', 'redblue-10', 'redblue-11', 'redgrey', 'redgrey-3', 'redgrey-4', 'redgrey-5', 'redgrey-6', 'redgrey-7', 'redgrey-8', 'redgrey-9', 'redgrey-10', 'redgrey-11', 'redyellowblue', 'redyellowblue-3', 'redyellowblue-4', 'redyellowblue-5', 'redyellowblue-6', 'redyellowblue-7', 'redyellowblue-8', 'redyellowblue-9', 'redyellowblue-10', 'redyellowblue-11', 'redyellowgreen', 'redyellowgreen-3', 'redyellowgreen-4', 'redyellowgreen-5', 'redyellowgreen-6', 'redyellowgreen-7', 'redyellowgreen-8', 'redyellowgreen-9', 'redyellowgreen-10', 'redyellowgreen-11', 'spectral', 'spectral-3', 'spectral-4', 'spectral-5', 'spectral-6', 'spectral-7', 'spectral-8', 'spectral-9', 'spectral-10', 'spectral-11', 'blues', 'tealblues', 'teals', 'greens', 'browns', 'greys', 'purples', 'warmgreys', 'reds', 'oranges', 'rainbow', 'sinebow', 'turbo', 'viridis', 'inferno', 'magma', 'plasma', 'cividis', 'bluegreen', 'bluegreen-3', 'bluegreen-4', 'bluegreen-5', 'bluegreen-6', 'bluegreen-7', 'bluegreen-8', 'bluegreen-9', 'bluepurple', 'bluepurple-3', 'bluepurple-4', 'bluepurple-5', 'bluepurple-6', 'bluepurple-7', 'bluepurple-8', 'bluepurple-9', 'goldgreen', 'goldgreen-3', 'goldgreen-4', 'goldgreen-5', 'goldgreen-6', 'goldgreen-7', 'goldgreen-8', 'goldgreen-9', 'goldorange', 'goldorange-3', 'goldorange-4', 'goldorange-5', 'goldorange-6', 'goldorange-7', 'goldorange-8', 'goldorange-9', 'goldred', 'goldred-3', 'goldred-4', 'goldred-5', 'goldred-6', 'goldred-7', 'goldred-8', 'goldred-9', 'greenblue', 'greenblue-3', 'greenblue-4', 'greenblue-5', 'greenblue-6', 'greenblue-7', 'greenblue-8', 'greenblue-9', 'orangered', 'orangered-3', 'orangered-4', 'orangered-5', 'orangered-6', 'orangered-7', 'orangered-8', 'orangered-9', 'purplebluegreen', 'purplebluegreen-3', 'purplebluegreen-4', 'purplebluegreen-5', 'purplebluegreen-6', 'purplebluegreen-7', 'purplebluegreen-8', 'purplebluegreen-9', 'purpleblue', 'purpleblue-3', 'purpleblue-4', 'purpleblue-5', 'purpleblue-6', 'purpleblue-7', 'purpleblue-8', 'purpleblue-9', 'purplered', 'purplered-3', 'purplered-4', 'purplered-5', 'purplered-6', 'purplered-7', 'purplered-8', 'purplered-9', 'redpurple', 'redpurple-3', 'redpurple-4', 'redpurple-5', 'redpurple-6', 'redpurple-7', 'redpurple-8', 'redpurple-9', 'yellowgreenblue', 'yellowgreenblue-3', 'yellowgreenblue-4', 'yellowgreenblue-5', 'yellowgreenblue-6', 'yellowgreenblue-7', 'yellowgreenblue-8', 'yellowgreenblue-9', 'yellowgreen', 'yellowgreen-3', 'yellowgreen-4', 'yellowgreen-5', 'yellowgreen-6', 'yellowgreen-7', 'yellowgreen-8', 'yellowgreen-9', 'yelloworangebrown', 'yelloworangebrown-3', 'yelloworangebrown-4', 'yelloworangebrown-5', 'yelloworangebrown-6', 'yelloworangebrown-7', 'yelloworangebrown-8', 'yelloworangebrown-9', 'yelloworangered', 'yelloworangered-3', 'yelloworangered-4', 'yelloworangered-5', 'yelloworangered-6', 'yelloworangered-7', 'yelloworangered-8', 'yelloworangered-9', 'darkblue', 'darkblue-3', 'darkblue-4', 'darkblue-5', 'darkblue-6', 'darkblue-7', 'darkblue-8', 'darkblue-9', 'darkgold', 'darkgold-3', 'darkgold-4', 'darkgold-5', 'darkgold-6', 'darkgold-7', 'darkgold-8', 'darkgold-9', 'darkgreen', 'darkgreen-3', 'darkgreen-4', 'darkgreen-5', 'darkgreen-6', 'darkgreen-7', 'darkgreen-8', 'darkgreen-9', 'darkmulti', 'darkmulti-3', 'darkmulti-4', 'darkmulti-5', 'darkmulti-6', 'darkmulti-7', 'darkmulti-8', 'darkmulti-9', 'darkred', 'darkred-3', 'darkred-4', 'darkred-5', 'darkred-6', 'darkred-7', 'darkred-8', 'darkred-9', 'lightgreyred', 'lightgreyred-3', 'lightgreyred-4', 'lightgreyred-5', 'lightgreyred-6', 'lightgreyred-7', 'lightgreyred-8', 'lightgreyred-9', 'lightgreyteal', 'lightgreyteal-3', 'lightgreyteal-4', 'lightgreyteal-5', 'lightgreyteal-6', 'lightgreyteal-7', 'lightgreyteal-8', 'lightgreyteal-9', 'lightmulti', 'lightmulti-3', 'lightmulti-4', 'lightmulti-5', 'lightmulti-6', 'lightmulti-7', 'lightmulti-8', 'lightmulti-9', 'lightorange', 'lightorange-3', 'lightorange-4', 'lightorange-5', 'lightorange-6', 'lightorange-7', 'lightorange-8', 'lightorange-9', 'lighttealblue', 'lighttealblue-3', 'lighttealblue-4', 'lighttealblue-5', 'lighttealblue-6', 'lighttealblue-7', 'lighttealblue-8', 'lighttealblue-9'] + A color scheme name for ordinal scales (e.g., ``"category10"`` or ``"blues"``). + + For the full list of supported schemes, please refer to the `Vega Scheme + `__ reference. + count : float + The number of colors to use in the scheme. This can be useful for scale types such + as ``"quantize"``, which use the length of the scale range to determine the number + of discrete bins for the scale domain. + extent : Sequence[float] + The extent of the color range to use. For example ``[0.2, 1]`` will rescale the + color scheme such that color values in the range *[0, 0.2)* are excluded from the + scheme. + """ + + _schema = {"$ref": "#/definitions/SchemeParams"} + + def __init__( + self, + name: Optional[SchemaBase | ColorScheme_T] = Undefined, + count: Optional[float] = Undefined, + extent: Optional[Sequence[float]] = Undefined, + **kwds, + ): + super().__init__(name=name, count=count, extent=extent, **kwds) + + +class SecondaryFieldDef(Position2Def): + r""" + SecondaryFieldDef schema wrapper. + + A field definition of a secondary channel that shares a scale with another primary channel. + For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + """ + + _schema = {"$ref": "#/definitions/SecondaryFieldDef"} + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + timeUnit=timeUnit, + title=title, + **kwds, + ) + + +class SelectionConfig(VegaLiteSchema): + """ + SelectionConfig schema wrapper. + + Parameters + ---------- + interval : dict, :class:`IntervalSelectionConfigWithoutType` + 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. + point : dict, :class:`PointSelectionConfigWithoutType` + The default definition for a `point + `__ selection. All + properties and transformations for a point selection definition (except ``type``) + may be specified here. + + For instance, setting ``point`` to ``{"on": "dblclick"}`` populates point selections + on double-click by default. + """ + + _schema = {"$ref": "#/definitions/SelectionConfig"} + + def __init__( + self, + interval: Optional[SchemaBase | Map] = Undefined, + point: Optional[SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__(interval=interval, point=point, **kwds) + + +class SelectionInit(VegaLiteSchema): + """SelectionInit schema wrapper.""" + + _schema = {"$ref": "#/definitions/SelectionInit"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class DateTime(SelectionInit): + """ + DateTime schema wrapper. + + Object for defining datetime in Vega-Lite Filter. If both month and quarter are provided, + month has higher precedence. ``day`` cannot be combined with other date. We accept string + for month and day names. + + Parameters + ---------- + date : float + Integer value representing the date (day of the month) from 1-31. + day : str, float, :class:`Day` + Value representing the day of a week. This can be one of: (1) integer value -- ``1`` + represents Monday; (2) case-insensitive day name (e.g., ``"Monday"``); (3) + case-insensitive, 3-character short day name (e.g., ``"Mon"``). + + **Warning:** A DateTime definition object with ``day``** should not be combined with + ``year``, ``quarter``, ``month``, or ``date``. + hours : float + Integer value representing the hour of a day from 0-23. + milliseconds : float + Integer value representing the millisecond segment of time. + minutes : float + Integer value representing the minute segment of time from 0-59. + month : str, float, :class:`Month` + One of: (1) integer value representing the month from ``1``-``12``. ``1`` represents + January; (2) case-insensitive month name (e.g., ``"January"``); (3) + case-insensitive, 3-character short month name (e.g., ``"Jan"``). + quarter : float + Integer value representing the quarter of the year (from 1-4). + seconds : float + Integer value representing the second segment (0-59) of a time value + utc : bool + A boolean flag indicating if date time is in utc time. If false, the date time is in + local time + year : float + Integer value representing the year. + """ + + _schema = {"$ref": "#/definitions/DateTime"} + + def __init__( + self, + date: Optional[float] = Undefined, + day: Optional[str | float | SchemaBase] = Undefined, + hours: Optional[float] = Undefined, + milliseconds: Optional[float] = Undefined, + minutes: Optional[float] = Undefined, + month: Optional[str | float | SchemaBase] = Undefined, + quarter: Optional[float] = Undefined, + seconds: Optional[float] = Undefined, + utc: Optional[bool] = Undefined, + year: Optional[float] = Undefined, + **kwds, + ): + super().__init__( + date=date, + day=day, + hours=hours, + milliseconds=milliseconds, + minutes=minutes, + month=month, + quarter=quarter, + seconds=seconds, + utc=utc, + year=year, + **kwds, + ) + + +class PrimitiveValue(SelectionInit): + """PrimitiveValue schema wrapper.""" + + _schema = {"$ref": "#/definitions/PrimitiveValue"} + + def __init__(self, *args): + super().__init__(*args) + + +class SelectionInitInterval(VegaLiteSchema): + """SelectionInitInterval schema wrapper.""" + + _schema = {"$ref": "#/definitions/SelectionInitInterval"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class SelectionInitIntervalMapping(VegaLiteSchema): + """SelectionInitIntervalMapping schema wrapper.""" + + _schema = {"$ref": "#/definitions/SelectionInitIntervalMapping"} + + def __init__(self, **kwds): + super().__init__(**kwds) + + +class SelectionInitMapping(VegaLiteSchema): + """SelectionInitMapping schema wrapper.""" + + _schema = {"$ref": "#/definitions/SelectionInitMapping"} + + def __init__(self, **kwds): + super().__init__(**kwds) + + +class SelectionParameter(VegaLiteSchema): + """ + SelectionParameter schema wrapper. + + Parameters + ---------- + name : str, :class:`ParameterName` + Required. A unique name for the selection parameter. Selection names should be valid + JavaScript identifiers: they should contain only alphanumeric characters (or "$", or + "_") and may not start with a digit. Reserved keywords that may not be used as + parameter names are "datum", "event", "item", and "parent". + select : dict, :class:`SelectionType`, Literal['point', 'interval'], :class:`PointSelectionConfig`, :class:`IntervalSelectionConfig` + Determines the default event processing and data query for the selection. Vega-Lite + currently supports two selection types: + + * ``"point"`` -- to select multiple discrete data values; the first value is + selected on ``click`` and additional values toggled on shift-click. + * ``"interval"`` -- to select a continuous range of data values on ``drag``. + bind : dict, :class:`Binding`, :class:`BindInput`, :class:`BindRange`, :class:`BindDirect`, :class:`BindCheckbox`, :class:`LegendBinding`, :class:`BindRadioSelect`, Literal['legend', 'scales'], :class:`LegendStreamBinding` + When set, a selection is populated by input elements (also known as dynamic query + widgets) or by interacting with the corresponding legend. Direct manipulation + interaction is disabled by default; to re-enable it, set the selection's `on + `__ + property. + + Legend bindings are restricted to selections that only specify a single field or + encoding. + + Query widget binding takes the form of Vega's `input element binding definition + `__ or can be a mapping between + projected field/encodings and binding definitions. + + **See also:** `bind `__ + documentation. + value : str, bool, dict, float, :class:`DateTime`, :class:`SelectionInit`, :class:`PrimitiveValue`, :class:`SelectionInitIntervalMapping`, Sequence[dict, :class:`SelectionInitMapping`], None + Initialize the selection with a mapping between `projected channels or field names + `__ and initial + values. + + **See also:** `init `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/SelectionParameter"} + + def __init__( + self, + name: Optional[str | SchemaBase] = Undefined, + select: Optional[SchemaBase | Map | SelectionType_T] = Undefined, + bind: Optional[SchemaBase | Literal["legend", "scales"] | Map] = Undefined, + value: Optional[ + Temporal | SchemaBase | Sequence[SchemaBase | Map] | Map | PrimitiveValue_T + ] = Undefined, + **kwds, + ): + super().__init__(name=name, select=select, bind=bind, value=value, **kwds) + + +class SelectionResolution(VegaLiteSchema): + """SelectionResolution schema wrapper.""" + + _schema = {"$ref": "#/definitions/SelectionResolution"} + + def __init__(self, *args): + super().__init__(*args) + + +class SelectionType(VegaLiteSchema): + """SelectionType schema wrapper.""" + + _schema = {"$ref": "#/definitions/SelectionType"} + + def __init__(self, *args): + super().__init__(*args) + + +class SequenceGenerator(Generator): + """ + SequenceGenerator schema wrapper. + + Parameters + ---------- + sequence : dict, :class:`SequenceParams` + Generate a sequence of numbers. + name : str + Provide a placeholder name and bind data at runtime. + """ + + _schema = {"$ref": "#/definitions/SequenceGenerator"} + + def __init__( + self, + sequence: Optional[SchemaBase | Map] = Undefined, + name: Optional[str] = Undefined, + **kwds, + ): + super().__init__(sequence=sequence, name=name, **kwds) + + +class SequenceParams(VegaLiteSchema): + """ + SequenceParams schema wrapper. + + Parameters + ---------- + start : float + The starting value of the sequence (inclusive). + stop : float + The ending value of the sequence (exclusive). + step : float + The step value between sequence entries. + + **Default value:** ``1`` + as : str, :class:`FieldName` + The name of the generated sequence field. + + **Default value:** ``"data"`` + """ + + _schema = {"$ref": "#/definitions/SequenceParams"} + + def __init__( + self, + start: Optional[float] = Undefined, + stop: Optional[float] = Undefined, + step: Optional[float] = Undefined, + **kwds, + ): + super().__init__(start=start, stop=stop, step=step, **kwds) + + +class SequentialMultiHue(ColorScheme): + """SequentialMultiHue schema wrapper.""" + + _schema = {"$ref": "#/definitions/SequentialMultiHue"} + + def __init__(self, *args): + super().__init__(*args) + + +class SequentialSingleHue(ColorScheme): + """SequentialSingleHue schema wrapper.""" + + _schema = {"$ref": "#/definitions/SequentialSingleHue"} + + def __init__(self, *args): + super().__init__(*args) + + +class ShapeDef(VegaLiteSchema): + """ShapeDef schema wrapper.""" + + _schema = {"$ref": "#/definitions/ShapeDef"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class FieldOrDatumDefWithConditionDatumDefstringnull( + MarkPropDefstringnullTypeForShape, ShapeDef +): + """ + FieldOrDatumDefWithConditionDatumDefstringnull schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + condition : dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = { + "$ref": "#/definitions/FieldOrDatumDefWithCondition" + } + + def __init__( + self, + bandPosition: Optional[float] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + bandPosition=bandPosition, + condition=condition, + datum=datum, + title=title, + type=type, + **kwds, + ) + + +class FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull( + MarkPropDefstringnullTypeForShape, ShapeDef +): + r""" + FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + legend : dict, :class:`Legend`, None + An object defining properties of the legend. If ``null``, the legend for the + encoding channel will be removed. + + **Default value:** If undefined, default `legend properties + `__ are applied. + + **See also:** `legend `__ + documentation. + scale : dict, :class:`Scale`, None + An object defining properties of the channel's scale, which is the function that + transforms values in the data domain (numbers, dates, strings, etc) to visual values + (pixels, colors, sizes) of the encoding channels. + + If ``null``, the scale will be `disabled and the data value will be directly encoded + `__. + + **Default value:** If undefined, default `scale properties + `__ are applied. + + **See also:** `scale `__ + documentation. + sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None + Sort order for the encoded field. + + For continuous fields (quantitative or temporal), ``sort`` can be either + ``"ascending"`` or ``"descending"``. + + For discrete fields, ``sort`` can be one of the following: + + * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in + JavaScript. + * `A string indicating an encoding channel name to sort by + `__ (e.g., + ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g., + ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a + sort-by-encoding definition + `__. For + example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order": + "descending"}``. + * `A sort field definition + `__ for sorting by + another field. + * `An array specifying the field values in preferred order + `__. In this case, the + sort order will obey the values in the array, followed by any unspecified values + in their original order. For discrete time field, values in the sort array can be + `date-time definition objects + `__. In addition, for time + units ``"month"`` and ``"day"``, the values can be the month or day names (case + insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``). + * ``null`` indicating no sort. + + **Default value:** ``"ascending"`` + + **Note:** ``null`` and sorting by another channel is not supported for ``row`` and + ``column``. + + **See also:** `sort `__ + documentation. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`TypeForShape`, Literal['nominal', 'ordinal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = { + "$ref": "#/definitions/FieldOrDatumDefWithCondition,(string|null)>" + } + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + legend: Optional[SchemaBase | Map | None] = Undefined, + scale: Optional[SchemaBase | Map | None] = Undefined, + sort: Optional[ + SchemaBase + | Sequence[str] + | Sequence[bool] + | Sequence[float] + | Sequence[Temporal | SchemaBase | Map] + | Map + | AllSortString_T + | None + ] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | TypeForShape_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + legend=legend, + scale=scale, + sort=sort, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +class SharedEncoding(VegaLiteSchema): + """ + SharedEncoding schema wrapper. + + Parameters + ---------- + angle : dict + + color : dict + + description : dict + + detail : dict, :class:`FieldDefWithoutScale`, Sequence[dict, :class:`FieldDefWithoutScale`] + 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 : dict + + fillOpacity : dict + + href : dict + + key : dict + + latitude : dict + + latitude2 : dict + + longitude : dict + + longitude2 : dict + + opacity : dict + + order : dict, :class:`OrderOnlyDef`, :class:`OrderFieldDef`, :class:`OrderValueDef`, Sequence[dict, :class:`OrderFieldDef`] + Order of the marks. + + * For stacked marks, this ``order`` channel encodes `stack order + `__. + * For line and trail marks, this ``order`` channel encodes order of data points in + the lines. This can be useful for creating `a connected scatterplot + `__. Setting + ``order`` to ``{"value": null}`` makes the line marks use the original order in + the data sources. + * Otherwise, this ``order`` channel encodes layer order of the marks. + + **Note**: In aggregate plots, ``order`` field should be ``aggregate``d to avoid + creating additional aggregation grouping. + radius : dict + + radius2 : dict + + shape : dict + + size : dict + + stroke : dict + + strokeDash : dict + + strokeOpacity : dict + + strokeWidth : dict + + text : dict + + theta : dict + + theta2 : dict + + tooltip : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`, Sequence[dict, :class:`StringFieldDef`], None + The tooltip text to show upon mouse hover. Specifying ``tooltip`` encoding overrides + `the tooltip property in the mark definition + `__. + + See the `tooltip `__ + documentation for a detailed discussion about tooltip in Vega-Lite. + url : dict + + x : dict + + x2 : dict + + xError : dict + + xError2 : dict + + xOffset : dict + + y : dict + + y2 : dict + + yError : dict + + yError2 : dict + + yOffset : dict + + """ + + _schema = {"$ref": "#/definitions/SharedEncoding"} + + def __init__( + self, + angle: Optional[Map] = Undefined, + color: Optional[Map] = Undefined, + description: Optional[Map] = Undefined, + detail: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + fill: Optional[Map] = Undefined, + fillOpacity: Optional[Map] = Undefined, + href: Optional[Map] = Undefined, + key: Optional[Map] = Undefined, + latitude: Optional[Map] = Undefined, + latitude2: Optional[Map] = Undefined, + longitude: Optional[Map] = Undefined, + longitude2: Optional[Map] = Undefined, + opacity: Optional[Map] = Undefined, + order: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + radius: Optional[Map] = Undefined, + radius2: Optional[Map] = Undefined, + shape: Optional[Map] = Undefined, + size: Optional[Map] = Undefined, + stroke: Optional[Map] = Undefined, + strokeDash: Optional[Map] = Undefined, + strokeOpacity: Optional[Map] = Undefined, + strokeWidth: Optional[Map] = Undefined, + text: Optional[Map] = Undefined, + theta: Optional[Map] = Undefined, + theta2: Optional[Map] = Undefined, + tooltip: Optional[ + SchemaBase | Sequence[SchemaBase | Map] | Map | None + ] = Undefined, + url: Optional[Map] = Undefined, + x: Optional[Map] = Undefined, + x2: Optional[Map] = Undefined, + xError: Optional[Map] = Undefined, + xError2: Optional[Map] = Undefined, + xOffset: Optional[Map] = Undefined, + y: Optional[Map] = Undefined, + y2: Optional[Map] = Undefined, + yError: Optional[Map] = Undefined, + yError2: Optional[Map] = Undefined, + yOffset: Optional[Map] = Undefined, + **kwds, + ): + super().__init__( + angle=angle, + color=color, + description=description, + detail=detail, + fill=fill, + fillOpacity=fillOpacity, + href=href, + key=key, + latitude=latitude, + latitude2=latitude2, + longitude=longitude, + longitude2=longitude2, + opacity=opacity, + order=order, + radius=radius, + radius2=radius2, + shape=shape, + size=size, + stroke=stroke, + strokeDash=strokeDash, + strokeOpacity=strokeOpacity, + strokeWidth=strokeWidth, + text=text, + theta=theta, + theta2=theta2, + tooltip=tooltip, + url=url, + x=x, + x2=x2, + xError=xError, + xError2=xError2, + xOffset=xOffset, + y=y, + y2=y2, + yError=yError, + yError2=yError2, + yOffset=yOffset, + **kwds, + ) + + +class SingleDefUnitChannel(VegaLiteSchema): + """SingleDefUnitChannel schema wrapper.""" + + _schema = {"$ref": "#/definitions/SingleDefUnitChannel"} + + def __init__(self, *args): + super().__init__(*args) + + +class Sort(VegaLiteSchema): + """Sort schema wrapper.""" + + _schema = {"$ref": "#/definitions/Sort"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class AllSortString(Sort): + """AllSortString schema wrapper.""" + + _schema = {"$ref": "#/definitions/AllSortString"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class EncodingSortField(Sort): + """ + EncodingSortField schema wrapper. + + A sort definition for sorting a discrete scale in an encoding field definition. + + Parameters + ---------- + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + The data `field `__ to sort by. + + **Default value:** If unspecified, defaults to the field specified in the outer data + reference. + op : :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + An `aggregate operation + `__ to perform on the + field prior to sorting (e.g., ``"count"``, ``"mean"`` and ``"median"``). An + aggregation is required when there are multiple values of the sort field for each + encoded data field. 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 + `__. + + **Default value:** ``"sum"`` for stacked plots. Otherwise, ``"min"``. + order : :class:`SortOrder`, Literal['ascending', 'descending'], None + The sort order. One of ``"ascending"`` (default), ``"descending"``, or ``null`` (no + not sort). + """ + + _schema = {"$ref": "#/definitions/EncodingSortField"} + + def __init__( + self, + field: Optional[str | SchemaBase | Map] = Undefined, + op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + **kwds, + ): + super().__init__(field=field, op=op, order=order, **kwds) + + +class SortArray(Sort): + """SortArray schema wrapper.""" + + _schema = {"$ref": "#/definitions/SortArray"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class SortByChannel(AllSortString): + """SortByChannel schema wrapper.""" + + _schema = {"$ref": "#/definitions/SortByChannel"} + + def __init__(self, *args): + super().__init__(*args) + + +class SortByChannelDesc(AllSortString): + """SortByChannelDesc schema wrapper.""" + + _schema = {"$ref": "#/definitions/SortByChannelDesc"} + + def __init__(self, *args): + super().__init__(*args) + + +class SortByEncoding(Sort): + """ + SortByEncoding schema wrapper. + + Parameters + ---------- + encoding : :class:`SortByChannel`, Literal['x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'] + The `encoding channel + `__ to sort by (e.g., + ``"x"``, ``"y"``) + order : :class:`SortOrder`, Literal['ascending', 'descending'], None + The sort order. One of ``"ascending"`` (default), ``"descending"``, or ``null`` (no + not sort). + """ + + _schema = {"$ref": "#/definitions/SortByEncoding"} + + def __init__( + self, + encoding: Optional[SchemaBase | SortByChannel_T] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + **kwds, + ): + super().__init__(encoding=encoding, order=order, **kwds) + + +class SortField(VegaLiteSchema): + """ + SortField schema wrapper. + + A sort definition for transform + + Parameters + ---------- + field : str, :class:`FieldName` + The name of the field to sort. + order : :class:`SortOrder`, Literal['ascending', 'descending'], None + Whether to sort the field in ascending or descending order. One of ``"ascending"`` + (default), ``"descending"``, or ``null`` (no not sort). + """ + + _schema = {"$ref": "#/definitions/SortField"} + + def __init__( + self, + field: Optional[str | SchemaBase] = Undefined, + order: Optional[SchemaBase | SortOrder_T | None] = Undefined, + **kwds, + ): + super().__init__(field=field, order=order, **kwds) + + +class SortOrder(AllSortString): + """SortOrder schema wrapper.""" + + _schema = {"$ref": "#/definitions/SortOrder"} + + def __init__(self, *args): + super().__init__(*args) + + +class Spec(VegaLiteSchema): + """ + Spec schema wrapper. + + Any specification in Vega-Lite. + """ + + _schema = {"$ref": "#/definitions/Spec"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class ConcatSpecGenericSpec(Spec, NonNormalizedSpec): + """ + ConcatSpecGenericSpec schema wrapper. + + Base interface for a generalized concatenation specification. + + Parameters + ---------- + concat : Sequence[dict, :class:`Spec`, :class:`FacetSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetedUnitSpec`, :class:`LayerRepeatSpec`, :class:`NonLayerRepeatSpec`, :class:`ConcatSpecGenericSpec`, :class:`HConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec`] + A list of views to be concatenated. + align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none'] + The alignment to apply to grid rows and columns. The supported string values are + ``"all"``, ``"each"``, and ``"none"``. + + * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply + placed one after the other. + * For ``"each"``, subviews will be aligned into a clean grid structure, but each row + or column may be of variable size. + * For ``"all"``, subviews will be aligned and each row or column will be sized + identically based on the maximum observed size. String values for this property + will be applied to both grid rows and columns. + + Alternatively, an object value of the form ``{"row": string, "column": string}`` can + be used to supply different alignments for rows and columns. + + **Default value:** ``"all"``. + bounds : Literal['full', 'flush'] + The bounds calculation method to use for determining the extent of a sub-plot. One + of ``full`` (the default) or ``flush``. + + * If set to ``full``, the entire calculated bounds (including axes, title, and + legend) will be used. + * If set to ``flush``, only the specified width and height values for the sub-view + will be used. The ``flush`` setting can be useful when attempting to place + sub-plots without axes or legends into a uniform grid structure. + + **Default value:** ``"full"`` + center : bool, dict, :class:`RowColboolean` + Boolean flag indicating if subviews should be centered relative to their respective + rows or columns. + + An object value of the form ``{"row": boolean, "column": boolean}`` can be used to + supply different centering values for rows and columns. + + **Default value:** ``false`` + columns : float + The number of columns to include in the view composition layout. + + **Default value**: ``undefined`` -- An infinite number of columns (a single row) + will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the + ``column`` channel (for ``facet`` and ``repeat``). + + **Note**: + + 1) This property is only for: + + * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``) + * the ``facet`` and ``repeat`` operator with one field/repetition definition + (without row/column nesting) + + 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``) + and to using the ``row`` channel (for ``facet`` and ``repeat``). + data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None + An object describing the data source. Set to ``null`` to ignore the parent's data + source. If no data is set, it is derived from the parent. + description : str + Description of this mark for commenting purpose. + name : str + Name of the visualization for later reference. + resolve : dict, :class:`Resolve` + Scale, axis, and legend resolutions for view composition specifications. + spacing : dict, float, :class:`RowColnumber` + The spacing in pixels between sub-views of the composition operator. An object of + the form ``{"row": number, "column": number}`` can be used to set different spacing + values for rows and columns. + + **Default value**: Depends on ``"spacing"`` property of `the view composition + configuration `__ + (``20`` by default) + title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams` + Title for the plot. + transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`] + An array of data transformations such as filter and new field calculation. + """ + + _schema = {"$ref": "#/definitions/ConcatSpec"} + + def __init__( + self, + concat: Optional[Sequence[SchemaBase | Map]] = Undefined, + align: Optional[SchemaBase | Map | LayoutAlign_T] = Undefined, + bounds: Optional[Literal["full", "flush"]] = Undefined, + center: Optional[bool | SchemaBase | Map] = Undefined, + columns: Optional[float] = Undefined, + data: Optional[SchemaBase | Map | None] = Undefined, + description: Optional[str] = Undefined, + name: Optional[str] = Undefined, + resolve: Optional[SchemaBase | Map] = Undefined, + spacing: Optional[float | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + transform: Optional[Sequence[SchemaBase | Map]] = Undefined, + **kwds, + ): + super().__init__( + concat=concat, + align=align, + bounds=bounds, + center=center, + columns=columns, + data=data, + description=description, + name=name, + resolve=resolve, + spacing=spacing, + title=title, + transform=transform, + **kwds, + ) + + +class FacetSpec(Spec, NonNormalizedSpec): + """ + FacetSpec schema wrapper. + + Base interface for a facet specification. + + Parameters + ---------- + facet : dict, :class:`FacetMapping`, :class:`FacetFieldDef` + Definition for how to facet the data. One of: 1) `a field definition for faceting + the plot by one field + `__ 2) `An object that + maps row and column channels to their field definitions + `__ + spec : dict, :class:`LayerSpec`, :class:`FacetedUnitSpec` + A specification of the view that gets faceted. + align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none'] + The alignment to apply to grid rows and columns. The supported string values are + ``"all"``, ``"each"``, and ``"none"``. + + * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply + placed one after the other. + * For ``"each"``, subviews will be aligned into a clean grid structure, but each row + or column may be of variable size. + * For ``"all"``, subviews will be aligned and each row or column will be sized + identically based on the maximum observed size. String values for this property + will be applied to both grid rows and columns. + + Alternatively, an object value of the form ``{"row": string, "column": string}`` can + be used to supply different alignments for rows and columns. + + **Default value:** ``"all"``. + bounds : Literal['full', 'flush'] + The bounds calculation method to use for determining the extent of a sub-plot. One + of ``full`` (the default) or ``flush``. + + * If set to ``full``, the entire calculated bounds (including axes, title, and + legend) will be used. + * If set to ``flush``, only the specified width and height values for the sub-view + will be used. The ``flush`` setting can be useful when attempting to place + sub-plots without axes or legends into a uniform grid structure. + + **Default value:** ``"full"`` + center : bool, dict, :class:`RowColboolean` + Boolean flag indicating if subviews should be centered relative to their respective + rows or columns. + + An object value of the form ``{"row": boolean, "column": boolean}`` can be used to + supply different centering values for rows and columns. + + **Default value:** ``false`` + columns : float + The number of columns to include in the view composition layout. + + **Default value**: ``undefined`` -- An infinite number of columns (a single row) + will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the + ``column`` channel (for ``facet`` and ``repeat``). + + **Note**: + + 1) This property is only for: + + * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``) + * the ``facet`` and ``repeat`` operator with one field/repetition definition + (without row/column nesting) + + 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``) + and to using the ``row`` channel (for ``facet`` and ``repeat``). + data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None + An object describing the data source. Set to ``null`` to ignore the parent's data + source. If no data is set, it is derived from the parent. + description : str + Description of this mark for commenting purpose. + name : str + Name of the visualization for later reference. + resolve : dict, :class:`Resolve` + Scale, axis, and legend resolutions for view composition specifications. + spacing : dict, float, :class:`RowColnumber` + The spacing in pixels between sub-views of the composition operator. An object of + the form ``{"row": number, "column": number}`` can be used to set different spacing + values for rows and columns. + + **Default value**: Depends on ``"spacing"`` property of `the view composition + configuration `__ + (``20`` by default) + title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams` + Title for the plot. + transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`] + An array of data transformations such as filter and new field calculation. + """ + + _schema = {"$ref": "#/definitions/FacetSpec"} + + def __init__( + self, + facet: Optional[SchemaBase | Map] = Undefined, + spec: Optional[SchemaBase | Map] = Undefined, + align: Optional[SchemaBase | Map | LayoutAlign_T] = Undefined, + bounds: Optional[Literal["full", "flush"]] = Undefined, + center: Optional[bool | SchemaBase | Map] = Undefined, + columns: Optional[float] = Undefined, + data: Optional[SchemaBase | Map | None] = Undefined, + description: Optional[str] = Undefined, + name: Optional[str] = Undefined, + resolve: Optional[SchemaBase | Map] = Undefined, + spacing: Optional[float | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + transform: Optional[Sequence[SchemaBase | Map]] = Undefined, + **kwds, + ): + super().__init__( + facet=facet, + spec=spec, + align=align, + bounds=bounds, + center=center, + columns=columns, + data=data, + description=description, + name=name, + resolve=resolve, + spacing=spacing, + title=title, + transform=transform, + **kwds, + ) + + +class FacetedUnitSpec(Spec, NonNormalizedSpec): + """ + FacetedUnitSpec schema wrapper. + + Unit spec that can have a composite mark and row or column channels (shorthand for a facet + spec). + + Parameters + ---------- + mark : dict, :class:`Mark`, :class:`AnyMark`, :class:`BoxPlot`, :class:`MarkDef`, :class:`ErrorBar`, :class:`ErrorBand`, :class:`BoxPlotDef`, :class:`ErrorBarDef`, :class:`ErrorBandDef`, :class:`CompositeMark`, :class:`CompositeMarkDef`, Literal['arc', 'area', 'bar', 'image', 'line', 'point', 'rect', 'rule', 'text', 'tick', 'trail', 'circle', 'square', 'geoshape', 'boxplot', 'errorband', 'errorbar'] + A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``, + ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and + ``"text"``) or a `mark definition object + `__. + align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none'] + The alignment to apply to grid rows and columns. The supported string values are + ``"all"``, ``"each"``, and ``"none"``. + + * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply + placed one after the other. + * For ``"each"``, subviews will be aligned into a clean grid structure, but each row + or column may be of variable size. + * For ``"all"``, subviews will be aligned and each row or column will be sized + identically based on the maximum observed size. String values for this property + will be applied to both grid rows and columns. + + Alternatively, an object value of the form ``{"row": string, "column": string}`` can + be used to supply different alignments for rows and columns. + + **Default value:** ``"all"``. + bounds : Literal['full', 'flush'] + The bounds calculation method to use for determining the extent of a sub-plot. One + of ``full`` (the default) or ``flush``. + + * If set to ``full``, the entire calculated bounds (including axes, title, and + legend) will be used. + * If set to ``flush``, only the specified width and height values for the sub-view + will be used. The ``flush`` setting can be useful when attempting to place + sub-plots without axes or legends into a uniform grid structure. + + **Default value:** ``"full"`` + center : bool, dict, :class:`RowColboolean` + Boolean flag indicating if subviews should be centered relative to their respective + rows or columns. + + An object value of the form ``{"row": boolean, "column": boolean}`` can be used to + supply different centering values for rows and columns. + + **Default value:** ``false`` + data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None + An object describing the data source. Set to ``null`` to ignore the parent's data + source. If no data is set, it is derived from the parent. + description : str + Description of this mark for commenting purpose. + encoding : dict, :class:`FacetedEncoding` + A key-value mapping between encoding channels and definition of fields. + height : dict, float, :class:`Step`, Literal['container'] + The height of a visualization. + + * For a plot with a continuous y-field, height should be a number. + * For a plot with either a discrete y-field or no y-field, height can be either a + number indicating a fixed height or an object in the form of ``{step: number}`` + defining the height per discrete step. (No y-field is equivalent to having one + discrete step.) + * To enable responsive sizing on height, it should be set to ``"container"``. + + **Default value:** Based on ``config.view.continuousHeight`` for a plot with a + continuous y-field and ``config.view.discreteHeight`` otherwise. + + **Note:** For plots with `row and column channels + `__, this represents the + height of a single view and the ``"container"`` option cannot be used. + + **See also:** `height `__ + documentation. + name : str + Name of the visualization for later reference. + params : Sequence[dict, :class:`SelectionParameter`] + An array of parameters that may either be simple variables, or more complex + selections that map user input to data queries. + projection : dict, :class:`Projection` + An object defining properties of geographic projection, which will be applied to + ``shape`` path for ``"geoshape"`` marks and to ``latitude`` and ``"longitude"`` + channels for other marks. + resolve : dict, :class:`Resolve` + Scale, axis, and legend resolutions for view composition specifications. + spacing : dict, float, :class:`RowColnumber` + The spacing in pixels between sub-views of the composition operator. An object of + the form ``{"row": number, "column": number}`` can be used to set different spacing + values for rows and columns. + + **Default value**: Depends on ``"spacing"`` property of `the view composition + configuration `__ + (``20`` by default) + title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams` + Title for the plot. + transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`] + An array of data transformations such as filter and new field calculation. + view : dict, :class:`ViewBackground` + An object defining the view background's fill and stroke. + + **Default value:** none (transparent) + width : dict, float, :class:`Step`, Literal['container'] + The width of a visualization. + + * For a plot with a continuous x-field, width should be a number. + * For a plot with either a discrete x-field or no x-field, width can be either a + number indicating a fixed width or an object in the form of ``{step: number}`` + defining the width per discrete step. (No x-field is equivalent to having one + discrete step.) + * To enable responsive sizing on width, it should be set to ``"container"``. + + **Default value:** Based on ``config.view.continuousWidth`` for a plot with a + continuous x-field and ``config.view.discreteWidth`` otherwise. + + **Note:** For plots with `row and column channels + `__, this represents the + width of a single view and the ``"container"`` option cannot be used. + + **See also:** `width `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/FacetedUnitSpec"} + + def __init__( + self, + mark: Optional[SchemaBase | Map | Mark_T | CompositeMark_T] = Undefined, + align: Optional[SchemaBase | Map | LayoutAlign_T] = Undefined, + bounds: Optional[Literal["full", "flush"]] = Undefined, + center: Optional[bool | SchemaBase | Map] = Undefined, + data: Optional[SchemaBase | Map | None] = Undefined, + description: Optional[str] = Undefined, + encoding: Optional[SchemaBase | Map] = Undefined, + height: Optional[float | SchemaBase | Literal["container"] | Map] = Undefined, + name: Optional[str] = Undefined, + params: Optional[Sequence[SchemaBase | Map]] = Undefined, + projection: Optional[SchemaBase | Map] = Undefined, + resolve: Optional[SchemaBase | Map] = Undefined, + spacing: Optional[float | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + transform: Optional[Sequence[SchemaBase | Map]] = Undefined, + view: Optional[SchemaBase | Map] = Undefined, + width: Optional[float | SchemaBase | Literal["container"] | Map] = Undefined, + **kwds, + ): + super().__init__( + mark=mark, + align=align, + bounds=bounds, + center=center, + data=data, + description=description, + encoding=encoding, + height=height, + name=name, + params=params, + projection=projection, + resolve=resolve, + spacing=spacing, + title=title, + transform=transform, + view=view, + width=width, + **kwds, + ) + + +class HConcatSpecGenericSpec(Spec, NonNormalizedSpec): + """ + HConcatSpecGenericSpec schema wrapper. + + Base interface for a horizontal concatenation specification. + + Parameters + ---------- + hconcat : Sequence[dict, :class:`Spec`, :class:`FacetSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetedUnitSpec`, :class:`LayerRepeatSpec`, :class:`NonLayerRepeatSpec`, :class:`ConcatSpecGenericSpec`, :class:`HConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec`] + A list of views to be concatenated and put into a row. + bounds : Literal['full', 'flush'] + The bounds calculation method to use for determining the extent of a sub-plot. One + of ``full`` (the default) or ``flush``. + + * If set to ``full``, the entire calculated bounds (including axes, title, and + legend) will be used. + * If set to ``flush``, only the specified width and height values for the sub-view + will be used. The ``flush`` setting can be useful when attempting to place + sub-plots without axes or legends into a uniform grid structure. + + **Default value:** ``"full"`` + center : bool + Boolean flag indicating if subviews should be centered relative to their respective + rows or columns. + + **Default value:** ``false`` + data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None + An object describing the data source. Set to ``null`` to ignore the parent's data + source. If no data is set, it is derived from the parent. + description : str + Description of this mark for commenting purpose. + name : str + Name of the visualization for later reference. + resolve : dict, :class:`Resolve` + Scale, axis, and legend resolutions for view composition specifications. + spacing : float + The spacing in pixels between sub-views of the concat operator. + + **Default value**: ``10`` + title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams` + Title for the plot. + transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`] + An array of data transformations such as filter and new field calculation. + """ + + _schema = {"$ref": "#/definitions/HConcatSpec"} + + def __init__( + self, + hconcat: Optional[Sequence[SchemaBase | Map]] = Undefined, + bounds: Optional[Literal["full", "flush"]] = Undefined, + center: Optional[bool] = Undefined, + data: Optional[SchemaBase | Map | None] = Undefined, + description: Optional[str] = Undefined, + name: Optional[str] = Undefined, + resolve: Optional[SchemaBase | Map] = Undefined, + spacing: Optional[float] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + transform: Optional[Sequence[SchemaBase | Map]] = Undefined, + **kwds, + ): + super().__init__( + hconcat=hconcat, + bounds=bounds, + center=center, + data=data, + description=description, + name=name, + resolve=resolve, + spacing=spacing, + title=title, + transform=transform, + **kwds, + ) + + +class LayerSpec(Spec, NonNormalizedSpec): + """ + LayerSpec schema wrapper. + + A full layered plot specification, which may contains ``encoding`` and ``projection`` + properties that will be applied to underlying unit (single-view) specifications. + + Parameters + ---------- + layer : Sequence[dict, :class:`UnitSpec`, :class:`LayerSpec`] + Layer or single view specifications to be layered. + + **Note**: Specifications inside ``layer`` cannot use ``row`` and ``column`` channels + as layering facet specifications is not allowed. Instead, use the `facet operator + `__ and place a layer inside a + facet. + data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None + An object describing the data source. Set to ``null`` to ignore the parent's data + source. If no data is set, it is derived from the parent. + description : str + Description of this mark for commenting purpose. + encoding : dict, :class:`SharedEncoding` + A shared key-value mapping between encoding channels and definition of fields in the + underlying layers. + height : dict, float, :class:`Step`, Literal['container'] + The height of a visualization. + + * For a plot with a continuous y-field, height should be a number. + * For a plot with either a discrete y-field or no y-field, height can be either a + number indicating a fixed height or an object in the form of ``{step: number}`` + defining the height per discrete step. (No y-field is equivalent to having one + discrete step.) + * To enable responsive sizing on height, it should be set to ``"container"``. + + **Default value:** Based on ``config.view.continuousHeight`` for a plot with a + continuous y-field and ``config.view.discreteHeight`` otherwise. + + **Note:** For plots with `row and column channels + `__, this represents the + height of a single view and the ``"container"`` option cannot be used. + + **See also:** `height `__ + documentation. + name : str + Name of the visualization for later reference. + projection : dict, :class:`Projection` + An object defining properties of the geographic projection shared by underlying + layers. + resolve : dict, :class:`Resolve` + Scale, axis, and legend resolutions for view composition specifications. + title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams` + Title for the plot. + transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`] + An array of data transformations such as filter and new field calculation. + view : dict, :class:`ViewBackground` + An object defining the view background's fill and stroke. + + **Default value:** none (transparent) + width : dict, float, :class:`Step`, Literal['container'] + The width of a visualization. + + * For a plot with a continuous x-field, width should be a number. + * For a plot with either a discrete x-field or no x-field, width can be either a + number indicating a fixed width or an object in the form of ``{step: number}`` + defining the width per discrete step. (No x-field is equivalent to having one + discrete step.) + * To enable responsive sizing on width, it should be set to ``"container"``. + + **Default value:** Based on ``config.view.continuousWidth`` for a plot with a + continuous x-field and ``config.view.discreteWidth`` otherwise. + + **Note:** For plots with `row and column channels + `__, this represents the + width of a single view and the ``"container"`` option cannot be used. + + **See also:** `width `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/LayerSpec"} + + def __init__( + self, + layer: Optional[Sequence[SchemaBase | Map]] = Undefined, + data: Optional[SchemaBase | Map | None] = Undefined, + description: Optional[str] = Undefined, + encoding: Optional[SchemaBase | Map] = Undefined, + height: Optional[float | SchemaBase | Literal["container"] | Map] = Undefined, + name: Optional[str] = Undefined, + projection: Optional[SchemaBase | Map] = Undefined, + resolve: Optional[SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + transform: Optional[Sequence[SchemaBase | Map]] = Undefined, + view: Optional[SchemaBase | Map] = Undefined, + width: Optional[float | SchemaBase | Literal["container"] | Map] = Undefined, + **kwds, + ): + super().__init__( + layer=layer, + data=data, + description=description, + encoding=encoding, + height=height, + name=name, + projection=projection, + resolve=resolve, + title=title, + transform=transform, + view=view, + width=width, + **kwds, + ) + + +class RepeatSpec(Spec, NonNormalizedSpec): + """RepeatSpec schema wrapper.""" + + _schema = {"$ref": "#/definitions/RepeatSpec"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class LayerRepeatSpec(RepeatSpec): + """ + LayerRepeatSpec schema wrapper. + + Parameters + ---------- + repeat : dict, :class:`LayerRepeatMapping` + Definition for fields to be repeated. One of: 1) An array of fields to be repeated. + If ``"repeat"`` is an array, the field can be referred to as ``{"repeat": + "repeat"}``. The repeated views are laid out in a wrapped row. You can set the + number of columns to control the wrapping. 2) An object that maps ``"row"`` and/or + ``"column"`` to the listed fields to be repeated along the particular orientations. + The objects ``{"repeat": "row"}`` and ``{"repeat": "column"}`` can be used to refer + to the repeated field respectively. + spec : dict, :class:`LayerSpec`, :class:`UnitSpecWithFrame` + A specification of the view that gets repeated. + align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none'] + The alignment to apply to grid rows and columns. The supported string values are + ``"all"``, ``"each"``, and ``"none"``. + + * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply + placed one after the other. + * For ``"each"``, subviews will be aligned into a clean grid structure, but each row + or column may be of variable size. + * For ``"all"``, subviews will be aligned and each row or column will be sized + identically based on the maximum observed size. String values for this property + will be applied to both grid rows and columns. + + Alternatively, an object value of the form ``{"row": string, "column": string}`` can + be used to supply different alignments for rows and columns. + + **Default value:** ``"all"``. + bounds : Literal['full', 'flush'] + The bounds calculation method to use for determining the extent of a sub-plot. One + of ``full`` (the default) or ``flush``. + + * If set to ``full``, the entire calculated bounds (including axes, title, and + legend) will be used. + * If set to ``flush``, only the specified width and height values for the sub-view + will be used. The ``flush`` setting can be useful when attempting to place + sub-plots without axes or legends into a uniform grid structure. + + **Default value:** ``"full"`` + center : bool, dict, :class:`RowColboolean` + Boolean flag indicating if subviews should be centered relative to their respective + rows or columns. + + An object value of the form ``{"row": boolean, "column": boolean}`` can be used to + supply different centering values for rows and columns. + + **Default value:** ``false`` + columns : float + The number of columns to include in the view composition layout. + + **Default value**: ``undefined`` -- An infinite number of columns (a single row) + will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the + ``column`` channel (for ``facet`` and ``repeat``). + + **Note**: + + 1) This property is only for: + + * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``) + * the ``facet`` and ``repeat`` operator with one field/repetition definition + (without row/column nesting) + + 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``) + and to using the ``row`` channel (for ``facet`` and ``repeat``). + data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None + An object describing the data source. Set to ``null`` to ignore the parent's data + source. If no data is set, it is derived from the parent. + description : str + Description of this mark for commenting purpose. + name : str + Name of the visualization for later reference. + resolve : dict, :class:`Resolve` + Scale, axis, and legend resolutions for view composition specifications. + spacing : dict, float, :class:`RowColnumber` + The spacing in pixels between sub-views of the composition operator. An object of + the form ``{"row": number, "column": number}`` can be used to set different spacing + values for rows and columns. + + **Default value**: Depends on ``"spacing"`` property of `the view composition + configuration `__ + (``20`` by default) + title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams` + Title for the plot. + transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`] + An array of data transformations such as filter and new field calculation. + """ + + _schema = {"$ref": "#/definitions/LayerRepeatSpec"} + + def __init__( + self, + repeat: Optional[SchemaBase | Map] = Undefined, + spec: Optional[SchemaBase | Map] = Undefined, + align: Optional[SchemaBase | Map | LayoutAlign_T] = Undefined, + bounds: Optional[Literal["full", "flush"]] = Undefined, + center: Optional[bool | SchemaBase | Map] = Undefined, + columns: Optional[float] = Undefined, + data: Optional[SchemaBase | Map | None] = Undefined, + description: Optional[str] = Undefined, + name: Optional[str] = Undefined, + resolve: Optional[SchemaBase | Map] = Undefined, + spacing: Optional[float | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + transform: Optional[Sequence[SchemaBase | Map]] = Undefined, + **kwds, + ): + super().__init__( + repeat=repeat, + spec=spec, + align=align, + bounds=bounds, + center=center, + columns=columns, + data=data, + description=description, + name=name, + resolve=resolve, + spacing=spacing, + title=title, + transform=transform, + **kwds, + ) + + +class NonLayerRepeatSpec(RepeatSpec): + """ + NonLayerRepeatSpec schema wrapper. + + Base interface for a repeat specification. + + Parameters + ---------- + repeat : dict, Sequence[str], :class:`RepeatMapping` + Definition for fields to be repeated. One of: 1) An array of fields to be repeated. + If ``"repeat"`` is an array, the field can be referred to as ``{"repeat": + "repeat"}``. The repeated views are laid out in a wrapped row. You can set the + number of columns to control the wrapping. 2) An object that maps ``"row"`` and/or + ``"column"`` to the listed fields to be repeated along the particular orientations. + The objects ``{"repeat": "row"}`` and ``{"repeat": "column"}`` can be used to refer + to the repeated field respectively. + spec : dict, :class:`FacetSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetedUnitSpec`, :class:`LayerRepeatSpec`, :class:`NonNormalizedSpec`, :class:`NonLayerRepeatSpec`, :class:`ConcatSpecGenericSpec`, :class:`HConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec` + A specification of the view that gets repeated. + align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none'] + The alignment to apply to grid rows and columns. The supported string values are + ``"all"``, ``"each"``, and ``"none"``. + + * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply + placed one after the other. + * For ``"each"``, subviews will be aligned into a clean grid structure, but each row + or column may be of variable size. + * For ``"all"``, subviews will be aligned and each row or column will be sized + identically based on the maximum observed size. String values for this property + will be applied to both grid rows and columns. + + Alternatively, an object value of the form ``{"row": string, "column": string}`` can + be used to supply different alignments for rows and columns. + + **Default value:** ``"all"``. + bounds : Literal['full', 'flush'] + The bounds calculation method to use for determining the extent of a sub-plot. One + of ``full`` (the default) or ``flush``. + + * If set to ``full``, the entire calculated bounds (including axes, title, and + legend) will be used. + * If set to ``flush``, only the specified width and height values for the sub-view + will be used. The ``flush`` setting can be useful when attempting to place + sub-plots without axes or legends into a uniform grid structure. + + **Default value:** ``"full"`` + center : bool, dict, :class:`RowColboolean` + Boolean flag indicating if subviews should be centered relative to their respective + rows or columns. + + An object value of the form ``{"row": boolean, "column": boolean}`` can be used to + supply different centering values for rows and columns. + + **Default value:** ``false`` + columns : float + The number of columns to include in the view composition layout. + + **Default value**: ``undefined`` -- An infinite number of columns (a single row) + will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the + ``column`` channel (for ``facet`` and ``repeat``). + + **Note**: + + 1) This property is only for: + + * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``) + * the ``facet`` and ``repeat`` operator with one field/repetition definition + (without row/column nesting) + + 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``) + and to using the ``row`` channel (for ``facet`` and ``repeat``). + data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None + An object describing the data source. Set to ``null`` to ignore the parent's data + source. If no data is set, it is derived from the parent. + description : str + Description of this mark for commenting purpose. + name : str + Name of the visualization for later reference. + resolve : dict, :class:`Resolve` + Scale, axis, and legend resolutions for view composition specifications. + spacing : dict, float, :class:`RowColnumber` + The spacing in pixels between sub-views of the composition operator. An object of + the form ``{"row": number, "column": number}`` can be used to set different spacing + values for rows and columns. + + **Default value**: Depends on ``"spacing"`` property of `the view composition + configuration `__ + (``20`` by default) + title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams` + Title for the plot. + transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`] + An array of data transformations such as filter and new field calculation. + """ + + _schema = {"$ref": "#/definitions/NonLayerRepeatSpec"} + + def __init__( + self, + repeat: Optional[SchemaBase | Sequence[str] | Map] = Undefined, + spec: Optional[SchemaBase | Map] = Undefined, + align: Optional[SchemaBase | Map | LayoutAlign_T] = Undefined, + bounds: Optional[Literal["full", "flush"]] = Undefined, + center: Optional[bool | SchemaBase | Map] = Undefined, + columns: Optional[float] = Undefined, + data: Optional[SchemaBase | Map | None] = Undefined, + description: Optional[str] = Undefined, + name: Optional[str] = Undefined, + resolve: Optional[SchemaBase | Map] = Undefined, + spacing: Optional[float | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + transform: Optional[Sequence[SchemaBase | Map]] = Undefined, + **kwds, + ): + super().__init__( + repeat=repeat, + spec=spec, + align=align, + bounds=bounds, + center=center, + columns=columns, + data=data, + description=description, + name=name, + resolve=resolve, + spacing=spacing, + title=title, + transform=transform, + **kwds, + ) + + +class SphereGenerator(Generator): + """ + SphereGenerator schema wrapper. + + Parameters + ---------- + sphere : dict, Literal[True] + Generate sphere GeoJSON data for the full globe. + name : str + Provide a placeholder name and bind data at runtime. + """ + + _schema = {"$ref": "#/definitions/SphereGenerator"} + + def __init__( + self, + sphere: Optional[Literal[True] | Map] = Undefined, + name: Optional[str] = Undefined, + **kwds, + ): + super().__init__(sphere=sphere, name=name, **kwds) + + +class StackOffset(VegaLiteSchema): + """StackOffset schema wrapper.""" + + _schema = {"$ref": "#/definitions/StackOffset"} + + def __init__(self, *args): + super().__init__(*args) + + +class StandardType(VegaLiteSchema): + """StandardType schema wrapper.""" + + _schema = {"$ref": "#/definitions/StandardType"} + + def __init__(self, *args): + super().__init__(*args) + + +class Step(VegaLiteSchema): + """ + Step schema wrapper. + + Parameters + ---------- + step : float + The size (width/height) per discrete step. + for : :class:`StepFor`, Literal['position', 'offset'] + Whether to apply the step to position scale or offset scale when there are both + ``x`` and ``xOffset`` or both ``y`` and ``yOffset`` encodings. + """ + + _schema = {"$ref": "#/definitions/Step"} + + def __init__(self, step: Optional[float] = Undefined, **kwds): + super().__init__(step=step, **kwds) + + +class StepFor(VegaLiteSchema): + """StepFor schema wrapper.""" + + _schema = {"$ref": "#/definitions/StepFor"} + + def __init__(self, *args): + super().__init__(*args) + + +class Stream(VegaLiteSchema): + """Stream schema wrapper.""" + + _schema = {"$ref": "#/definitions/Stream"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class DerivedStream(Stream): + """ + DerivedStream schema wrapper. + + Parameters + ---------- + stream : dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream` + + between : Sequence[dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`] + + consume : bool + + debounce : float + + filter : str, :class:`Expr`, Sequence[str, :class:`Expr`] + + markname : str + + marktype : :class:`MarkType`, Literal['arc', 'area', 'image', 'group', 'line', 'path', 'rect', 'rule', 'shape', 'symbol', 'text', 'trail'] + + throttle : float + + """ + + _schema = {"$ref": "#/definitions/DerivedStream"} + + def __init__( + self, + stream: Optional[SchemaBase | Map] = Undefined, + between: Optional[Sequence[SchemaBase | Map]] = Undefined, + consume: Optional[bool] = Undefined, + debounce: Optional[float] = Undefined, + filter: Optional[str | SchemaBase | Sequence[str | SchemaBase]] = Undefined, + markname: Optional[str] = Undefined, + marktype: Optional[SchemaBase | MarkType_T] = Undefined, + throttle: Optional[float] = Undefined, + **kwds, + ): + super().__init__( + stream=stream, + between=between, + consume=consume, + debounce=debounce, + filter=filter, + markname=markname, + marktype=marktype, + throttle=throttle, + **kwds, + ) + + +class EventStream(Stream): + """EventStream schema wrapper.""" + + _schema = {"$ref": "#/definitions/EventStream"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class MergedStream(Stream): + """ + MergedStream schema wrapper. + + Parameters + ---------- + merge : Sequence[dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`] + + between : Sequence[dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`] + + consume : bool + + debounce : float + + filter : str, :class:`Expr`, Sequence[str, :class:`Expr`] + + markname : str + + marktype : :class:`MarkType`, Literal['arc', 'area', 'image', 'group', 'line', 'path', 'rect', 'rule', 'shape', 'symbol', 'text', 'trail'] + + throttle : float + + """ + + _schema = {"$ref": "#/definitions/MergedStream"} + + def __init__( + self, + merge: Optional[Sequence[SchemaBase | Map]] = Undefined, + between: Optional[Sequence[SchemaBase | Map]] = Undefined, + consume: Optional[bool] = Undefined, + debounce: Optional[float] = Undefined, + filter: Optional[str | SchemaBase | Sequence[str | SchemaBase]] = Undefined, + markname: Optional[str] = Undefined, + marktype: Optional[SchemaBase | MarkType_T] = Undefined, + throttle: Optional[float] = Undefined, + **kwds, + ): + super().__init__( + merge=merge, + between=between, + consume=consume, + debounce=debounce, + filter=filter, + markname=markname, + marktype=marktype, + throttle=throttle, + **kwds, + ) + + +class StringFieldDef(VegaLiteSchema): + r""" + StringFieldDef schema wrapper. + + Parameters + ---------- + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + format : str, dict, :class:`Dict` + When used with the default ``"number"`` and ``"time"`` format type, the text + formatting pattern for labels of guides (axes, legends, headers) and text marks. + + * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's + `number format pattern `__. + * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time + format pattern `__. + + See the `format documentation `__ + for more examples. + + When used with a `custom formatType + `__, this + value will be passed as ``format`` alongside ``datum.value`` to the registered + function. + + **Default value:** Derived from `numberFormat + `__ config for number + format and from `timeFormat + `__ config for time + format. + formatType : str + The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom + format type + `__. + + **Default value:** + + * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``. + * ``"number"`` for quantitative fields as well as ordinal and nominal fields without + ``timeUnit``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/StringFieldDef"} + + def __init__( + self, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + format=format, + formatType=formatType, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +class StringFieldDefWithCondition(VegaLiteSchema): + r""" + StringFieldDefWithCondition schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`, Sequence[dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + format : str, dict, :class:`Dict` + When used with the default ``"number"`` and ``"time"`` format type, the text + formatting pattern for labels of guides (axes, legends, headers) and text marks. + + * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's + `number format pattern `__. + * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time + format pattern `__. + + See the `format documentation `__ + for more examples. + + When used with a `custom formatType + `__, this + value will be passed as ``format`` alongside ``datum.value`` to the registered + function. + + **Default value:** Derived from `numberFormat + `__ config for number + format and from `timeFormat + `__ config for time + format. + formatType : str + The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom + format type + `__. + + **Default value:** + + * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``. + * ``"number"`` for quantitative fields as well as ordinal and nominal fields without + ``timeUnit``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/StringFieldDefWithCondition"} + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + format=format, + formatType=formatType, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +class StringValueDefWithCondition(VegaLiteSchema): + """ + StringValueDefWithCondition schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : str, dict, :class:`ExprRef`, None + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _schema = {"$ref": "#/definitions/StringValueDefWithCondition"} + + def __init__( + self, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + **kwds, + ): + super().__init__(condition=condition, value=value, **kwds) + + +class StrokeCap(VegaLiteSchema): + """StrokeCap schema wrapper.""" + + _schema = {"$ref": "#/definitions/StrokeCap"} + + def __init__(self, *args): + super().__init__(*args) + + +class StrokeJoin(VegaLiteSchema): + """StrokeJoin schema wrapper.""" + + _schema = {"$ref": "#/definitions/StrokeJoin"} + + def __init__(self, *args): + super().__init__(*args) + + +class StyleConfigIndex(VegaLiteSchema): + """ + StyleConfigIndex schema wrapper. + + Parameters + ---------- + arc : dict, :class:`RectConfig` + Arc-specific Config + area : dict, :class:`AreaConfig` + Area-Specific Config + bar : dict, :class:`BarConfig` + Bar-Specific Config + circle : dict, :class:`MarkConfig` + Circle-Specific Config + geoshape : dict, :class:`MarkConfig` + Geoshape-Specific Config + image : dict, :class:`RectConfig` + Image-specific Config + line : dict, :class:`LineConfig` + Line-Specific Config + mark : dict, :class:`MarkConfig` + Mark Config + point : dict, :class:`MarkConfig` + Point-Specific Config + rect : dict, :class:`RectConfig` + Rect-Specific Config + rule : dict, :class:`MarkConfig` + Rule-Specific Config + square : dict, :class:`MarkConfig` + Square-Specific Config + text : dict, :class:`MarkConfig` + Text-Specific Config + tick : dict, :class:`TickConfig` + Tick-Specific Config + trail : dict, :class:`LineConfig` + Trail-Specific Config + group-subtitle : dict, :class:`MarkConfig` + Default style for chart subtitles + group-title : dict, :class:`MarkConfig` + Default style for chart titles + guide-label : dict, :class:`MarkConfig` + Default style for axis, legend, and header labels. + guide-title : dict, :class:`MarkConfig` + Default style for axis, legend, and header titles. + """ + + _schema = {"$ref": "#/definitions/StyleConfigIndex"} + + def __init__( + self, + arc: Optional[SchemaBase | Map] = Undefined, + area: Optional[SchemaBase | Map] = Undefined, + bar: Optional[SchemaBase | Map] = Undefined, + circle: Optional[SchemaBase | Map] = Undefined, + geoshape: Optional[SchemaBase | Map] = Undefined, + image: Optional[SchemaBase | Map] = Undefined, + line: Optional[SchemaBase | Map] = Undefined, + mark: Optional[SchemaBase | Map] = Undefined, + point: Optional[SchemaBase | Map] = Undefined, + rect: Optional[SchemaBase | Map] = Undefined, + rule: Optional[SchemaBase | Map] = Undefined, + square: Optional[SchemaBase | Map] = Undefined, + text: Optional[SchemaBase | Map] = Undefined, + tick: Optional[SchemaBase | Map] = Undefined, + trail: Optional[SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + arc=arc, + area=area, + bar=bar, + circle=circle, + geoshape=geoshape, + image=image, + line=line, + mark=mark, + point=point, + rect=rect, + rule=rule, + square=square, + text=text, + tick=tick, + trail=trail, + **kwds, + ) + + +class SymbolShape(VegaLiteSchema): + """SymbolShape schema wrapper.""" + + _schema = {"$ref": "#/definitions/SymbolShape"} + + def __init__(self, *args): + super().__init__(*args) + + +class Text(VegaLiteSchema): + """Text schema wrapper.""" + + _schema = {"$ref": "#/definitions/Text"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class TextBaseline(VegaLiteSchema): + """TextBaseline schema wrapper.""" + + _schema = {"$ref": "#/definitions/TextBaseline"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class Baseline(TextBaseline): + """Baseline schema wrapper.""" + + _schema = {"$ref": "#/definitions/Baseline"} + + def __init__(self, *args): + super().__init__(*args) + + +class TextDef(VegaLiteSchema): + """TextDef schema wrapper.""" + + _schema = {"$ref": "#/definitions/TextDef"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class FieldOrDatumDefWithConditionStringDatumDefText(TextDef): + """ + FieldOrDatumDefWithConditionStringDatumDefText schema wrapper. + + Parameters + ---------- + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + condition : dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`, Sequence[dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None + A constant value in data domain. + format : str, dict, :class:`Dict` + When used with the default ``"number"`` and ``"time"`` format type, the text + formatting pattern for labels of guides (axes, legends, headers) and text marks. + + * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's + `number format pattern `__. + * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time + format pattern `__. + + See the `format documentation `__ + for more examples. + + When used with a `custom formatType + `__, this + value will be passed as ``format`` alongside ``datum.value`` to the registered + function. + + **Default value:** Derived from `numberFormat + `__ config for number + format and from `timeFormat + `__ config for time + format. + formatType : str + The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom + format type + `__. + + **Default value:** + + * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``. + * ``"number"`` for quantitative fields as well as ordinal and nominal fields without + ``timeUnit``. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = { + "$ref": "#/definitions/FieldOrDatumDefWithCondition" + } + + def __init__( + self, + bandPosition: Optional[float] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + datum: Optional[ + Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T + ] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | Type_T] = Undefined, + **kwds, + ): + super().__init__( + bandPosition=bandPosition, + condition=condition, + datum=datum, + format=format, + formatType=formatType, + title=title, + type=type, + **kwds, + ) + + +class FieldOrDatumDefWithConditionStringFieldDefText(TextDef): + r""" + FieldOrDatumDefWithConditionStringFieldDefText schema wrapper. + + Parameters + ---------- + shorthand : str, dict, Sequence[str], :class:`RepeatRef` + shorthand for field, aggregate, and type + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + condition : dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`, Sequence[dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`] + One or more value definition(s) with `a parameter or a test predicate + `__. + + **Note:** A field definition's ``condition`` property can only contain `conditional + value definitions `__ + since Vega-Lite only allows at most one encoded field per encoding channel. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + format : str, dict, :class:`Dict` + When used with the default ``"number"`` and ``"time"`` format type, the text + formatting pattern for labels of guides (axes, legends, headers) and text marks. + + * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's + `number format pattern `__. + * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time + format pattern `__. + + See the `format documentation `__ + for more examples. + + When used with a `custom formatType + `__, this + value will be passed as ``format`` alongside ``datum.value`` to the registered + function. + + **Default value:** Derived from `numberFormat + `__ config for number + format and from `timeFormat + `__ config for time + format. + formatType : str + The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom + format type + `__. + + **Default value:** + + * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``. + * ``"number"`` for quantitative fields as well as ordinal and nominal fields without + ``timeUnit``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = { + "$ref": "#/definitions/FieldOrDatumDefWithCondition" + } + + def __init__( + self, + shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + format: Optional[str | SchemaBase | Map] = Undefined, + formatType: Optional[str] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + shorthand=shorthand, + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + condition=condition, + field=field, + format=format, + formatType=formatType, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +class TextDirection(VegaLiteSchema): + """TextDirection schema wrapper.""" + + _schema = {"$ref": "#/definitions/TextDirection"} + + def __init__(self, *args): + super().__init__(*args) + + +class TickConfig(AnyMarkConfig): + """ + TickConfig schema wrapper. + + Parameters + ---------- + align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right'] + The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). + One of ``"left"``, ``"right"``, ``"center"``. + + **Note:** Expression reference is *not* supported for range marks. + angle : dict, float, :class:`ExprRef` + The rotation angle of the text, in degrees. + aria : bool, dict, :class:`ExprRef` + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG element, removing the mark item from the ARIA accessibility tree. + ariaRole : str, dict, :class:`ExprRef` + Sets the type of user interface element of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "role" attribute. Warning: this + property is experimental and may be changed in the future. + ariaRoleDescription : str, dict, :class:`ExprRef` + A human-readable, author-localized description for the role of the mark item for + `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "aria-roledescription" attribute. + Warning: this property is experimental and may be changed in the future. + aspect : bool, dict, :class:`ExprRef` + Whether to keep aspect ratio of image marks. + bandSize : float + The width of the ticks. + + **Default value:** 3/4 of step (width step for horizontal ticks and height step for + vertical ticks). + baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + For text marks, the vertical text baseline. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an + expression reference that provides one of the valid values. The ``"line-top"`` and + ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are + calculated relative to the ``lineHeight`` rather than ``fontSize`` alone. + + For range marks, the vertical alignment of the marks. One of ``"top"``, + ``"middle"``, ``"bottom"``. + + **Note:** Expression reference is *not* supported for range marks. + blend : dict, :class:`Blend`, :class:`ExprRef`, Literal[None, 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'] + The color blend mode for drawing an item on its current background. Any valid `CSS + mix-blend-mode `__ + value can be used. + + __Default value:__ ``"source-over"`` + color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + cornerRadius : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles or arcs' corners. + + **Default value:** ``0`` + cornerRadiusBottomLeft : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' bottom left corner. + + **Default value:** ``0`` + cornerRadiusBottomRight : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' bottom right corner. + + **Default value:** ``0`` + cornerRadiusTopLeft : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' top right corner. + + **Default value:** ``0`` + cornerRadiusTopRight : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' top left corner. + + **Default value:** ``0`` + cursor : dict, :class:`Cursor`, :class:`ExprRef`, Literal['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', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing'] + The mouse cursor used over the mark. Any valid `CSS cursor type + `__ can be used. + description : str, dict, :class:`ExprRef` + A text description of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the `"aria-label" attribute + `__. + dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl'] + The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` + (right-to-left). This property determines on which side is truncated in response to + the limit parameter. + + **Default value:** ``"ltr"`` + dx : dict, float, :class:`ExprRef` + The horizontal offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + dy : dict, float, :class:`ExprRef` + The vertical offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + ellipsis : str, dict, :class:`ExprRef` + The ellipsis string for text truncated in response to the limit parameter. + + **Default value:** ``"…"`` + endAngle : dict, float, :class:`ExprRef` + The end angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + fill : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default fill color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove fill. + + **Default value:** (None) + fillOpacity : dict, float, :class:`ExprRef` + The fill opacity (value between [0,1]). + + **Default value:** ``1`` + filled : bool + Whether the mark's color should be used as fill color instead of stroke color. + + **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well + as ``geoshape`` marks for `graticule + `__ data sources; + otherwise, ``true``. + + **Note:** This property cannot be used in a `style config + `__. + font : str, dict, :class:`ExprRef` + The typeface to set the text in (e.g., ``"Helvetica Neue"``). + fontSize : dict, float, :class:`ExprRef` + The font size, in pixels. + + **Default value:** ``11`` + fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + The font style (e.g., ``"italic"``). + fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a + number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and + ``"bold"`` = ``700``). + height : dict, float, :class:`ExprRef` + Height of the marks. + href : str, dict, :class:`URI`, :class:`ExprRef` + A URL to load upon mouse click. If defined, the mark acts as a hyperlink. + innerRadius : dict, float, :class:`ExprRef` + The inner radius in pixels of arc marks. ``innerRadius`` is an alias for + ``radius2``. + + **Default value:** ``0`` + interpolate : dict, :class:`ExprRef`, :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after'] + The line interpolation method to use for line and area marks. One of the following: + + * ``"linear"``: piecewise linear segments, as in a polyline. + * ``"linear-closed"``: close the linear segments to form a polygon. + * ``"step"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"step-before"``: alternate between vertical and horizontal segments, as in a + step function. + * ``"step-after"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"basis"``: a B-spline, with control point duplication on the ends. + * ``"basis-open"``: an open B-spline; may not intersect the start or end. + * ``"basis-closed"``: a closed B-spline, as in a loop. + * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends. + * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end, + but will intersect other control points. + * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop. + * ``"bundle"``: equivalent to basis, except the tension parameter is used to + straighten the spline. + * ``"monotone"``: cubic interpolation that preserves monotonicity in y. + invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None + Invalid data mode, which defines how the marks and corresponding scales should + represent invalid values (``null`` and ``NaN`` in continuous scales *without* + defined output for invalid values). + + * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and + *scales*. For path marks (for line, area, trail), this option will create paths + that connect valid points, as if the data rows with invalid values do not exist. + + * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at + invalid values. For non-path marks, this is equivalent to ``"filter"``. All + *scale* domains will *exclude* these filtered data points. + + * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid + values. Hide invalid values for non-path marks. All *scale* domains will + *include* these filtered data points (for both path and non-path marks). + + * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each + scale will use the output for invalid values defined in ``config.scale.invalid`` + or, if unspecified, by default invalid values will produce the same visual values + as zero (if the scale includes zero) or the minimum value (if the scale does not + include zero). + + * ``"break-paths-show-path-domains"`` (default) — This is equivalent to + ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and + ``"filter"`` for non-path marks. + + **Note**: If any channel's scale has an output for invalid values defined in + ``config.scale.invalid``, all values for the scales will be considered "valid" since + they can produce a reasonable output for the scales. Thus, fields for such channels + will not be filtered and will not cause path breaks. + limit : dict, float, :class:`ExprRef` + The maximum length of the text mark in pixels. The text value will be automatically + truncated if the rendered size exceeds the limit. + + **Default value:** ``0`` -- indicating no limit + lineBreak : str, dict, :class:`ExprRef` + A delimiter, such as a newline character, upon which to break text strings into + multiple lines. This property is ignored if the text is array-valued. + lineHeight : dict, float, :class:`ExprRef` + The line height in pixels (the spacing between subsequent lines of text) for + multi-line text marks. + opacity : dict, float, :class:`ExprRef` + The overall opacity (value between [0,1]). + + **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, + ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. + order : bool, None + For line and trail marks, this ``order`` property can be set to ``null`` or + ``false`` to make the lines use the original order in the data sources. + orient : :class:`Orientation`, Literal['horizontal', 'vertical'] + The orientation of a non-stacked bar, tick, area, and line charts. The value is + either horizontal (default) or vertical. + + * For bar, rule and tick, this determines whether the size of the bar and tick + should be applied to x or y dimension. + * For area, this property determines the orient property of the Vega output. + * For line and trail marks, this property determines the sort order of the points in + the line if ``config.sortLineBy`` is not specified. For stacked charts, this is + always determined by the orientation of the stack; therefore explicitly specified + value will be ignored. + outerRadius : dict, float, :class:`ExprRef` + The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``. + + **Default value:** ``0`` + padAngle : dict, float, :class:`ExprRef` + The angular padding applied to sides of the arc, in radians. + radius : dict, float, :class:`ExprRef` + For arc mark, the primary (outer) radius in pixels. + + For text marks, polar coordinate radial offset, in pixels, of the text from the + origin determined by the ``x`` and ``y`` properties. + + **Default value:** ``min(plot_width, plot_height)/2`` + radius2 : dict, float, :class:`ExprRef` + The secondary (inner) radius in pixels of arc marks. + + **Default value:** ``0`` + shape : str, dict, :class:`ExprRef`, :class:`SymbolShape` + Shape of the point marks. Supported values include: + + * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, + ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or + ``"triangle-left"``. + * the line symbol ``"stroke"`` + * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` + * a custom `SVG path string + `__ (For correct + sizing, custom shape paths should be defined within a square bounding box with + coordinates ranging from -1 to 1 along both the x and y dimensions.) + + **Default value:** ``"circle"`` + size : dict, float, :class:`ExprRef` + Default size for marks. + + * For ``point``/``circle``/``square``, this represents the pixel area of the marks. + Note that this value sets the area of the symbol; the side lengths will increase + with the square root of this value. + * For ``bar``, this represents the band size of the bar, in pixels. + * For ``text``, this represents the font size, in pixels. + + **Default value:** + + * ``30`` for point, circle, square marks; width/height's ``step`` + * ``2`` for bar marks with discrete dimensions; + * ``5`` for bar marks with continuous dimensions; + * ``11`` for text marks. + smooth : bool, dict, :class:`ExprRef` + A boolean flag (default true) indicating if the image should be smoothed when + resized. If false, individual pixels should be scaled directly rather than + interpolated with smoothing. For SVG rendering, this option may not work in some + browsers due to lack of standardization. + startAngle : dict, float, :class:`ExprRef` + The start angle in radians for arc marks. A value of ``0`` indicates up (north), + increasing values proceed clockwise. + stroke : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default stroke color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove stroke. + + **Default value:** (None) + strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square'] + The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or + ``"square"``. + + **Default value:** ``"butt"`` + strokeDash : dict, Sequence[float], :class:`ExprRef` + An array of alternating stroke, space lengths for creating dashed or dotted lines. + strokeDashOffset : dict, float, :class:`ExprRef` + The offset (in pixels) into which to begin drawing with the stroke dash array. + strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel'] + The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. + + **Default value:** ``"miter"`` + strokeMiterLimit : dict, float, :class:`ExprRef` + The miter limit at which to bevel a line join. + strokeOffset : dict, float, :class:`ExprRef` + The offset in pixels at which to draw the group stroke and fill. If unspecified, the + default behavior is to dynamically offset stroked groups such that 1 pixel stroke + widths align with the pixel grid. + strokeOpacity : dict, float, :class:`ExprRef` + The stroke opacity (value between [0,1]). + + **Default value:** ``1`` + strokeWidth : dict, float, :class:`ExprRef` + The stroke width, in pixels. + tension : dict, float, :class:`ExprRef` + Depending on the interpolation type, sets the tension parameter (for line and area + marks). + text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef` + Placeholder text if the ``text`` channel is not specified + theta : dict, float, :class:`ExprRef` + * For arc marks, the arc length in radians if theta2 is not specified, otherwise the + start arc angle. (A value of 0 indicates up or “north”, increasing values proceed + clockwise.) + + * For text marks, polar coordinate angle in radians. + theta2 : dict, float, :class:`ExprRef` + The end angle of arc marks in radians. A value of 0 indicates up or “north”, + increasing values proceed clockwise. + thickness : float + Thickness of the tick mark. + + **Default value:** ``1`` + timeUnitBandPosition : float + Default relative band position for a time unit. If set to ``0``, the marks will be + positioned at the beginning of the time unit band step. If set to ``0.5``, the marks + will be positioned in the middle of the time unit band step. + timeUnitBandSize : float + Default relative band size for a time unit. If set to ``1``, the bandwidth of the + marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the + marks will be half of the time unit band step. + tooltip : str, bool, dict, float, :class:`ExprRef`, :class:`TooltipContent`, None + The tooltip text string to show upon mouse hover or an object defining which fields + should the tooltip be derived from. + + * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from + ``encoding`` will be used. + * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the + highlighted data point will be used. + * If set to ``null`` or ``false``, then no tooltip will be used. + + See the `tooltip `__ + documentation for a detailed discussion about tooltip in Vega-Lite. + + **Default value:** ``null`` + url : str, dict, :class:`URI`, :class:`ExprRef` + The URL of the image file for image marks. + width : dict, float, :class:`ExprRef` + Width of the marks. + x : dict, float, :class:`ExprRef`, Literal['width'] + X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without + specified ``x2`` or ``width``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2 : dict, float, :class:`ExprRef`, Literal['width'] + X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + y : dict, float, :class:`ExprRef`, Literal['height'] + Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without + specified ``y2`` or ``height``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2 : dict, float, :class:`ExprRef`, Literal['height'] + Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + """ + + _schema = {"$ref": "#/definitions/TickConfig"} + + def __init__( + self, + align: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + angle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ariaRole: Optional[str | Parameter | SchemaBase | Map] = Undefined, + ariaRoleDescription: Optional[str | Parameter | SchemaBase | Map] = Undefined, + aspect: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + bandSize: Optional[float] = Undefined, + baseline: Optional[Parameter | SchemaBase | Map | TextBaseline_T] = Undefined, + blend: Optional[Parameter | SchemaBase | Map | Blend_T] = Undefined, + color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadiusBottomLeft: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cornerRadiusBottomRight: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cornerRadiusTopLeft: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadiusTopRight: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cursor: Optional[Parameter | SchemaBase | Map | Cursor_T] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + dir: Optional[Parameter | SchemaBase | Map | TextDirection_T] = Undefined, + dx: Optional[float | Parameter | SchemaBase | Map] = Undefined, + dy: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ellipsis: Optional[str | Parameter | SchemaBase | Map] = Undefined, + endAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + fill: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + filled: Optional[bool] = Undefined, + font: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined, + height: Optional[float | Parameter | SchemaBase | Map] = Undefined, + href: Optional[str | Parameter | SchemaBase | Map] = Undefined, + innerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[Parameter | SchemaBase | Map | Interpolate_T] = Undefined, + invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined, + limit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + lineBreak: Optional[str | Parameter | SchemaBase | Map] = Undefined, + lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + order: Optional[bool | None] = Undefined, + orient: Optional[SchemaBase | Orientation_T] = Undefined, + outerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + padAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radius2: Optional[float | Parameter | SchemaBase | Map] = Undefined, + shape: Optional[str | Parameter | SchemaBase | Map] = Undefined, + size: Optional[float | Parameter | SchemaBase | Map] = Undefined, + smooth: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + startAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + stroke: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + strokeDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined, + strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + tension: Optional[float | Parameter | SchemaBase | Map] = Undefined, + text: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined, + theta: Optional[float | Parameter | SchemaBase | Map] = Undefined, + theta2: Optional[float | Parameter | SchemaBase | Map] = Undefined, + thickness: Optional[float] = Undefined, + timeUnitBandPosition: Optional[float] = Undefined, + timeUnitBandSize: Optional[float] = Undefined, + tooltip: Optional[ + str | bool | float | Parameter | SchemaBase | Map | None + ] = Undefined, + url: Optional[str | Parameter | SchemaBase | Map] = Undefined, + width: Optional[float | Parameter | SchemaBase | Map] = Undefined, + x: Optional[ + float | Parameter | SchemaBase | Literal["width"] | Map + ] = Undefined, + x2: Optional[ + float | Parameter | SchemaBase | Literal["width"] | Map + ] = Undefined, + y: Optional[ + float | Parameter | SchemaBase | Literal["height"] | Map + ] = Undefined, + y2: Optional[ + float | Parameter | SchemaBase | Literal["height"] | Map + ] = Undefined, + **kwds, + ): + super().__init__( + align=align, + angle=angle, + aria=aria, + ariaRole=ariaRole, + ariaRoleDescription=ariaRoleDescription, + aspect=aspect, + bandSize=bandSize, + baseline=baseline, + blend=blend, + color=color, + cornerRadius=cornerRadius, + cornerRadiusBottomLeft=cornerRadiusBottomLeft, + cornerRadiusBottomRight=cornerRadiusBottomRight, + cornerRadiusTopLeft=cornerRadiusTopLeft, + cornerRadiusTopRight=cornerRadiusTopRight, + cursor=cursor, + description=description, + dir=dir, + dx=dx, + dy=dy, + ellipsis=ellipsis, + endAngle=endAngle, + fill=fill, + fillOpacity=fillOpacity, + filled=filled, + font=font, + fontSize=fontSize, + fontStyle=fontStyle, + fontWeight=fontWeight, + height=height, + href=href, + innerRadius=innerRadius, + interpolate=interpolate, + invalid=invalid, + limit=limit, + lineBreak=lineBreak, + lineHeight=lineHeight, + opacity=opacity, + order=order, + orient=orient, + outerRadius=outerRadius, + padAngle=padAngle, + radius=radius, + radius2=radius2, + shape=shape, + size=size, + smooth=smooth, + startAngle=startAngle, + stroke=stroke, + strokeCap=strokeCap, + strokeDash=strokeDash, + strokeDashOffset=strokeDashOffset, + strokeJoin=strokeJoin, + strokeMiterLimit=strokeMiterLimit, + strokeOffset=strokeOffset, + strokeOpacity=strokeOpacity, + strokeWidth=strokeWidth, + tension=tension, + text=text, + theta=theta, + theta2=theta2, + thickness=thickness, + timeUnitBandPosition=timeUnitBandPosition, + timeUnitBandSize=timeUnitBandSize, + tooltip=tooltip, + url=url, + width=width, + x=x, + x2=x2, + y=y, + y2=y2, + **kwds, + ) + + +class TickCount(VegaLiteSchema): + """TickCount schema wrapper.""" + + _schema = {"$ref": "#/definitions/TickCount"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class TimeInterval(TickCount): + """TimeInterval schema wrapper.""" + + _schema = {"$ref": "#/definitions/TimeInterval"} + + def __init__(self, *args): + super().__init__(*args) + + +class TimeIntervalStep(TickCount): + """ + TimeIntervalStep schema wrapper. + + Parameters + ---------- + interval : :class:`TimeInterval`, Literal['millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'year'] + + step : float + + """ + + _schema = {"$ref": "#/definitions/TimeIntervalStep"} + + def __init__( + self, + interval: Optional[SchemaBase | TimeInterval_T] = Undefined, + step: Optional[float] = Undefined, + **kwds, + ): + super().__init__(interval=interval, step=step, **kwds) + + +class TimeLocale(VegaLiteSchema): + """ + TimeLocale schema wrapper. + + Locale definition for formatting dates and times. + + Parameters + ---------- + date : str + The date (%x) format specifier (e.g., "%m/%d/%Y"). + dateTime : str + The date and time (%c) format specifier (e.g., "%a %b %e %X %Y"). + days : Sequence[str], :class:`Vector7string` + The full names of the weekdays, starting with Sunday. + months : Sequence[str], :class:`Vector12string` + The full names of the months (starting with January). + periods : Sequence[str], :class:`Vector2string` + The A.M. and P.M. equivalents (e.g., ["AM", "PM"]). + shortDays : Sequence[str], :class:`Vector7string` + The abbreviated names of the weekdays, starting with Sunday. + shortMonths : Sequence[str], :class:`Vector12string` + The abbreviated names of the months (starting with January). + time : str + The time (%X) format specifier (e.g., "%H:%M:%S"). + """ + + _schema = {"$ref": "#/definitions/TimeLocale"} + + def __init__( + self, + date: Optional[str] = Undefined, + dateTime: Optional[str] = Undefined, + days: Optional[SchemaBase | Sequence[str]] = Undefined, + months: Optional[SchemaBase | Sequence[str]] = Undefined, + periods: Optional[SchemaBase | Sequence[str]] = Undefined, + shortDays: Optional[SchemaBase | Sequence[str]] = Undefined, + shortMonths: Optional[SchemaBase | Sequence[str]] = Undefined, + time: Optional[str] = Undefined, + **kwds, + ): + super().__init__( + date=date, + dateTime=dateTime, + days=days, + months=months, + periods=periods, + shortDays=shortDays, + shortMonths=shortMonths, + time=time, + **kwds, + ) + + +class TimeUnit(VegaLiteSchema): + """TimeUnit schema wrapper.""" + + _schema = {"$ref": "#/definitions/TimeUnit"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class MultiTimeUnit(TimeUnit): + """MultiTimeUnit schema wrapper.""" + + _schema = {"$ref": "#/definitions/MultiTimeUnit"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class LocalMultiTimeUnit(MultiTimeUnit): + """LocalMultiTimeUnit schema wrapper.""" + + _schema = {"$ref": "#/definitions/LocalMultiTimeUnit"} + + def __init__(self, *args): + super().__init__(*args) + + +class SingleTimeUnit(TimeUnit): + """SingleTimeUnit schema wrapper.""" + + _schema = {"$ref": "#/definitions/SingleTimeUnit"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class LocalSingleTimeUnit(SingleTimeUnit): + """LocalSingleTimeUnit schema wrapper.""" + + _schema = {"$ref": "#/definitions/LocalSingleTimeUnit"} + + def __init__(self, *args): + super().__init__(*args) + + +class TimeUnitParams(VegaLiteSchema): + """ + TimeUnitParams schema wrapper. + + Time Unit Params for encoding predicate, which can specified if the data is already + "binned". + + Parameters + ---------- + binned : bool + Whether the data has already been binned to this time unit. If true, Vega-Lite will + only format the data, marks, and guides, without applying the timeUnit transform to + re-bin the data again. + maxbins : float + If no ``unit`` is specified, maxbins is used to infer time units. + step : float + The number of steps between bins, in terms of the least significant unit provided. + unit : :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`SingleTimeUnit`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Defines how date-time values should be binned. + utc : bool + True to use UTC timezone. Equivalent to using a ``utc`` prefixed ``TimeUnit``. + """ + + _schema = {"$ref": "#/definitions/TimeUnitParams"} + + def __init__( + self, + binned: Optional[bool] = Undefined, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + **kwds, + ): + super().__init__( + binned=binned, maxbins=maxbins, step=step, unit=unit, utc=utc, **kwds + ) + + +class TimeUnitTransformParams(VegaLiteSchema): + """ + TimeUnitTransformParams schema wrapper. + + Parameters + ---------- + maxbins : float + If no ``unit`` is specified, maxbins is used to infer time units. + step : float + The number of steps between bins, in terms of the least significant unit provided. + unit : :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`SingleTimeUnit`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Defines how date-time values should be binned. + utc : bool + True to use UTC timezone. Equivalent to using a ``utc`` prefixed ``TimeUnit``. + """ + + _schema = {"$ref": "#/definitions/TimeUnitTransformParams"} + + def __init__( + self, + maxbins: Optional[float] = Undefined, + step: Optional[float] = Undefined, + unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined, + utc: Optional[bool] = Undefined, + **kwds, + ): + super().__init__(maxbins=maxbins, step=step, unit=unit, utc=utc, **kwds) + + +class TitleAnchor(VegaLiteSchema): + """TitleAnchor schema wrapper.""" + + _schema = {"$ref": "#/definitions/TitleAnchor"} + + def __init__(self, *args): + super().__init__(*args) + + +class TitleConfig(VegaLiteSchema): + """ + TitleConfig schema wrapper. + + Parameters + ---------- + align : :class:`Align`, Literal['left', 'center', 'right'] + Horizontal text alignment for title text. One of ``"left"``, ``"center"``, or + ``"right"``. + anchor : dict, :class:`ExprRef`, :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end'] + The anchor position for placing the title and subtitle text. 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. + angle : dict, float, :class:`ExprRef` + Angle in degrees of title and subtitle text. + aria : bool, dict, :class:`ExprRef` + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG group, removing the title from the ARIA accessibility tree. + + **Default value:** ``true`` + baseline : :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + Vertical text baseline for title and subtitle text. One of ``"alphabetic"`` + (default), ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or + ``"line-bottom"``. The ``"line-top"`` and ``"line-bottom"`` values operate similarly + to ``"top"`` and ``"bottom"``, but are calculated relative to the *lineHeight* + rather than *fontSize* alone. + color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Text color for title text. + dx : dict, float, :class:`ExprRef` + Delta offset for title and subtitle text x-coordinate. + dy : dict, float, :class:`ExprRef` + Delta offset for title and subtitle text y-coordinate. + font : str, dict, :class:`ExprRef` + Font name for title text. + fontSize : dict, float, :class:`ExprRef` + Font size in pixels for title text. + fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + Font style for title text. + fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + Font weight for title text. This can be either a string (e.g ``"bold"``, + ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where + ``"normal"`` = ``400`` and ``"bold"`` = ``700``). + frame : str, dict, :class:`ExprRef`, :class:`TitleFrame`, Literal['bounds', 'group'] + The reference frame for the anchor position, one of ``"bounds"`` (to anchor relative + to the full bounding box) or ``"group"`` (to anchor relative to the group width or + height). + limit : dict, float, :class:`ExprRef` + The maximum allowed length in pixels of title and subtitle text. + lineHeight : dict, float, :class:`ExprRef` + Line height in pixels for multi-line title text or title text with ``"line-top"`` or + ``"line-bottom"`` baseline. + offset : dict, float, :class:`ExprRef` + The orthogonal offset in pixels by which to displace the title group from its + position along the edge of the chart. + orient : dict, :class:`ExprRef`, :class:`TitleOrient`, Literal['none', 'left', 'right', 'top', 'bottom'] + Default title orientation (``"top"``, ``"bottom"``, ``"left"``, or ``"right"``) + subtitleColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Text color for subtitle text. + subtitleFont : str, dict, :class:`ExprRef` + Font name for subtitle text. + subtitleFontSize : dict, float, :class:`ExprRef` + Font size in pixels for subtitle text. + subtitleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + Font style for subtitle text. + subtitleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + Font weight for subtitle text. This can be either a string (e.g ``"bold"``, + ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where + ``"normal"`` = ``400`` and ``"bold"`` = ``700``). + subtitleLineHeight : dict, float, :class:`ExprRef` + Line height in pixels for multi-line subtitle text. + subtitlePadding : dict, float, :class:`ExprRef` + The padding in pixels between title and subtitle text. + zindex : dict, float, :class:`ExprRef` + The integer z-index indicating the layering of the title group relative to other + axis, mark, and legend groups. + + **Default value:** ``0``. + """ + + _schema = {"$ref": "#/definitions/TitleConfig"} + + def __init__( + self, + align: Optional[SchemaBase | Align_T] = Undefined, + anchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined, + angle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + baseline: Optional[SchemaBase | TextBaseline_T] = Undefined, + color: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + dx: Optional[float | Parameter | SchemaBase | Map] = Undefined, + dy: Optional[float | Parameter | SchemaBase | Map] = Undefined, + font: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined, + frame: Optional[str | Parameter | SchemaBase | Map | TitleFrame_T] = Undefined, + limit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[Parameter | SchemaBase | Map | TitleOrient_T] = Undefined, + subtitleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + subtitleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + subtitleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + subtitleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + subtitleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + subtitleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + subtitlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + zindex: Optional[float | Parameter | SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + align=align, + anchor=anchor, + angle=angle, + aria=aria, + baseline=baseline, + color=color, + dx=dx, + dy=dy, + font=font, + fontSize=fontSize, + fontStyle=fontStyle, + fontWeight=fontWeight, + frame=frame, + limit=limit, + lineHeight=lineHeight, + offset=offset, + orient=orient, + subtitleColor=subtitleColor, + subtitleFont=subtitleFont, + subtitleFontSize=subtitleFontSize, + subtitleFontStyle=subtitleFontStyle, + subtitleFontWeight=subtitleFontWeight, + subtitleLineHeight=subtitleLineHeight, + subtitlePadding=subtitlePadding, + zindex=zindex, + **kwds, + ) + + +class TitleFrame(VegaLiteSchema): + """TitleFrame schema wrapper.""" + + _schema = {"$ref": "#/definitions/TitleFrame"} + + def __init__(self, *args): + super().__init__(*args) + + +class TitleOrient(VegaLiteSchema): + """TitleOrient schema wrapper.""" + + _schema = {"$ref": "#/definitions/TitleOrient"} + + def __init__(self, *args): + super().__init__(*args) + + +class TitleParams(VegaLiteSchema): + """ + TitleParams schema wrapper. + + Parameters + ---------- + text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef` + The title text. + align : :class:`Align`, Literal['left', 'center', 'right'] + Horizontal text alignment for title text. One of ``"left"``, ``"center"``, or + ``"right"``. + anchor : :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end'] + 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"``. + angle : dict, float, :class:`ExprRef` + Angle in degrees of title and subtitle text. + aria : bool, dict, :class:`ExprRef` + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG group, removing the title from the ARIA accessibility tree. + + **Default value:** ``true`` + baseline : :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + Vertical text baseline for title and subtitle text. One of ``"alphabetic"`` + (default), ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or + ``"line-bottom"``. The ``"line-top"`` and ``"line-bottom"`` values operate similarly + to ``"top"`` and ``"bottom"``, but are calculated relative to the *lineHeight* + rather than *fontSize* alone. + color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Text color for title text. + dx : dict, float, :class:`ExprRef` + Delta offset for title and subtitle text x-coordinate. + dy : dict, float, :class:`ExprRef` + Delta offset for title and subtitle text y-coordinate. + font : str, dict, :class:`ExprRef` + Font name for title text. + fontSize : dict, float, :class:`ExprRef` + Font size in pixels for title text. + fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + Font style for title text. + fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + Font weight for title text. This can be either a string (e.g ``"bold"``, + ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where + ``"normal"`` = ``400`` and ``"bold"`` = ``700``). + frame : str, dict, :class:`ExprRef`, :class:`TitleFrame`, Literal['bounds', 'group'] + The reference frame for the anchor position, one of ``"bounds"`` (to anchor relative + to the full bounding box) or ``"group"`` (to anchor relative to the group width or + height). + limit : dict, float, :class:`ExprRef` + The maximum allowed length in pixels of title and subtitle text. + lineHeight : dict, float, :class:`ExprRef` + Line height in pixels for multi-line title text or title text with ``"line-top"`` or + ``"line-bottom"`` baseline. + offset : dict, float, :class:`ExprRef` + The orthogonal offset in pixels by which to displace the title group from its + position along the edge of the chart. + orient : dict, :class:`ExprRef`, :class:`TitleOrient`, Literal['none', 'left', 'right', 'top', 'bottom'] + Default title orientation (``"top"``, ``"bottom"``, ``"left"``, or ``"right"``) + style : str, Sequence[str] + A `mark style property `__ + to apply to the title text mark. + + **Default value:** ``"group-title"``. + subtitle : str, :class:`Text`, Sequence[str] + The subtitle Text. + subtitleColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Text color for subtitle text. + subtitleFont : str, dict, :class:`ExprRef` + Font name for subtitle text. + subtitleFontSize : dict, float, :class:`ExprRef` + Font size in pixels for subtitle text. + subtitleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + Font style for subtitle text. + subtitleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + Font weight for subtitle text. This can be either a string (e.g ``"bold"``, + ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where + ``"normal"`` = ``400`` and ``"bold"`` = ``700``). + subtitleLineHeight : dict, float, :class:`ExprRef` + Line height in pixels for multi-line subtitle text. + subtitlePadding : dict, float, :class:`ExprRef` + The padding in pixels between title and subtitle text. + zindex : float + The integer z-index indicating the layering of the title group relative to other + axis, mark and legend groups. + + **Default value:** ``0``. + """ + + _schema = {"$ref": "#/definitions/TitleParams"} + + def __init__( + self, + text: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined, + align: Optional[SchemaBase | Align_T] = Undefined, + anchor: Optional[SchemaBase | TitleAnchor_T] = Undefined, + angle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + baseline: Optional[SchemaBase | TextBaseline_T] = Undefined, + color: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + dx: Optional[float | Parameter | SchemaBase | Map] = Undefined, + dy: Optional[float | Parameter | SchemaBase | Map] = Undefined, + font: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined, + frame: Optional[str | Parameter | SchemaBase | Map | TitleFrame_T] = Undefined, + limit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + orient: Optional[Parameter | SchemaBase | Map | TitleOrient_T] = Undefined, + style: Optional[str | Sequence[str]] = Undefined, + subtitle: Optional[str | SchemaBase | Sequence[str]] = Undefined, + subtitleColor: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + subtitleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined, + subtitleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + subtitleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + subtitleFontWeight: Optional[ + Parameter | SchemaBase | Map | FontWeight_T + ] = Undefined, + subtitleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + subtitlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + zindex: Optional[float] = Undefined, + **kwds, + ): + super().__init__( + text=text, + align=align, + anchor=anchor, + angle=angle, + aria=aria, + baseline=baseline, + color=color, + dx=dx, + dy=dy, + font=font, + fontSize=fontSize, + fontStyle=fontStyle, + fontWeight=fontWeight, + frame=frame, + limit=limit, + lineHeight=lineHeight, + offset=offset, + orient=orient, + style=style, + subtitle=subtitle, + subtitleColor=subtitleColor, + subtitleFont=subtitleFont, + subtitleFontSize=subtitleFontSize, + subtitleFontStyle=subtitleFontStyle, + subtitleFontWeight=subtitleFontWeight, + subtitleLineHeight=subtitleLineHeight, + subtitlePadding=subtitlePadding, + zindex=zindex, + **kwds, + ) + + +class TooltipContent(VegaLiteSchema): + """ + TooltipContent schema wrapper. + + Parameters + ---------- + content : Literal['encoding', 'data'] + + """ + + _schema = {"$ref": "#/definitions/TooltipContent"} + + def __init__( + self, content: Optional[Literal["encoding", "data"]] = Undefined, **kwds + ): + super().__init__(content=content, **kwds) + + +class TopLevelParameter(VegaLiteSchema): + """TopLevelParameter schema wrapper.""" + + _schema = {"$ref": "#/definitions/TopLevelParameter"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class TopLevelSelectionParameter(TopLevelParameter): + """ + TopLevelSelectionParameter schema wrapper. + + Parameters + ---------- + name : str, :class:`ParameterName` + Required. A unique name for the selection parameter. Selection names should be valid + JavaScript identifiers: they should contain only alphanumeric characters (or "$", or + "_") and may not start with a digit. Reserved keywords that may not be used as + parameter names are "datum", "event", "item", and "parent". + select : dict, :class:`SelectionType`, :class:`PointSelectionConfig`, :class:`IntervalSelectionConfig`, Literal['point', 'interval'] + Determines the default event processing and data query for the selection. Vega-Lite + currently supports two selection types: + + * ``"point"`` -- to select multiple discrete data values; the first value is + selected on ``click`` and additional values toggled on shift-click. + * ``"interval"`` -- to select a continuous range of data values on ``drag``. + bind : dict, :class:`Binding`, :class:`BindInput`, :class:`BindRange`, :class:`BindDirect`, :class:`BindCheckbox`, :class:`LegendBinding`, :class:`BindRadioSelect`, Literal['legend', 'scales'], :class:`LegendStreamBinding` + When set, a selection is populated by input elements (also known as dynamic query + widgets) or by interacting with the corresponding legend. Direct manipulation + interaction is disabled by default; to re-enable it, set the selection's `on + `__ + property. + + Legend bindings are restricted to selections that only specify a single field or + encoding. + + Query widget binding takes the form of Vega's `input element binding definition + `__ or can be a mapping between + projected field/encodings and binding definitions. + + **See also:** `bind `__ + documentation. + value : str, bool, dict, float, :class:`DateTime`, :class:`SelectionInit`, :class:`PrimitiveValue`, :class:`SelectionInitIntervalMapping`, Sequence[dict, :class:`SelectionInitMapping`], None + Initialize the selection with a mapping between `projected channels or field names + `__ and initial + values. + + **See also:** `init `__ + documentation. + views : Sequence[str] + By default, top-level selections are applied to every view in the visualization. If + this property is specified, selections will only be applied to views with the given + names. + """ + + _schema = {"$ref": "#/definitions/TopLevelSelectionParameter"} + + def __init__( + self, + name: Optional[str | SchemaBase] = Undefined, + select: Optional[SchemaBase | Map | SelectionType_T] = Undefined, + bind: Optional[SchemaBase | Literal["legend", "scales"] | Map] = Undefined, + value: Optional[ + Temporal | SchemaBase | Sequence[SchemaBase | Map] | Map | PrimitiveValue_T + ] = Undefined, + views: Optional[Sequence[str]] = Undefined, + **kwds, + ): + super().__init__( + name=name, select=select, bind=bind, value=value, views=views, **kwds + ) + + +class TopLevelSpec(VegaLiteSchema): + """ + TopLevelSpec schema wrapper. + + A Vega-Lite top-level specification. This is the root class for all Vega-Lite + specifications. (The json schema is generated from this type.) + """ + + _schema = {"$ref": "#/definitions/TopLevelSpec"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class TopLevelConcatSpec(TopLevelSpec): + """ + TopLevelConcatSpec schema wrapper. + + Parameters + ---------- + concat : Sequence[dict, :class:`FacetSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetedUnitSpec`, :class:`LayerRepeatSpec`, :class:`NonNormalizedSpec`, :class:`NonLayerRepeatSpec`, :class:`ConcatSpecGenericSpec`, :class:`HConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec`] + A list of views to be concatenated. + align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none'] + The alignment to apply to grid rows and columns. The supported string values are + ``"all"``, ``"each"``, and ``"none"``. + + * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply + placed one after the other. + * For ``"each"``, subviews will be aligned into a clean grid structure, but each row + or column may be of variable size. + * For ``"all"``, subviews will be aligned and each row or column will be sized + identically based on the maximum observed size. String values for this property + will be applied to both grid rows and columns. + + Alternatively, an object value of the form ``{"row": string, "column": string}`` can + be used to supply different alignments for rows and columns. + + **Default value:** ``"all"``. + autosize : dict, :class:`AutosizeType`, :class:`AutoSizeParams`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y'] + How the visualization size should be determined. If a string, should be one of + ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify + parameters for content sizing and automatic resizing. + + **Default value**: ``pad`` + background : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + CSS color property to use as the background of the entire view. + + **Default value:** ``"white"`` + bounds : Literal['full', 'flush'] + The bounds calculation method to use for determining the extent of a sub-plot. One + of ``full`` (the default) or ``flush``. + + * If set to ``full``, the entire calculated bounds (including axes, title, and + legend) will be used. + * If set to ``flush``, only the specified width and height values for the sub-view + will be used. The ``flush`` setting can be useful when attempting to place + sub-plots without axes or legends into a uniform grid structure. + + **Default value:** ``"full"`` + center : bool, dict, :class:`RowColboolean` + Boolean flag indicating if subviews should be centered relative to their respective + rows or columns. + + An object value of the form ``{"row": boolean, "column": boolean}`` can be used to + supply different centering values for rows and columns. + + **Default value:** ``false`` + columns : float + The number of columns to include in the view composition layout. + + **Default value**: ``undefined`` -- An infinite number of columns (a single row) + will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the + ``column`` channel (for ``facet`` and ``repeat``). + + **Note**: + + 1) This property is only for: + + * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``) + * the ``facet`` and ``repeat`` operator with one field/repetition definition + (without row/column nesting) + + 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``) + and to using the ``row`` channel (for ``facet`` and ``repeat``). + config : dict, :class:`Config` + Vega-Lite configuration object. This property can only be defined at the top-level + of a specification. + data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None + An object describing the data source. Set to ``null`` to ignore the parent's data + source. If no data is set, it is derived from the parent. + datasets : dict, :class:`Datasets` + A global data store for named datasets. This is a mapping from names to inline + datasets. 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. + description : str + Description of this mark for commenting purpose. + name : str + Name of the visualization for later reference. + padding : dict, float, :class:`ExprRef`, :class:`Padding` + The default visualization padding, in pixels, from the edge of the visualization + canvas to the data rectangle. If a number, specifies padding for all sides. If an + object, the value should have the format ``{"left": 5, "top": 5, "right": 5, + "bottom": 5}`` to specify padding for each side of the visualization. + + **Default value**: ``5`` + params : Sequence[dict, :class:`TopLevelParameter`, :class:`VariableParameter`, :class:`TopLevelSelectionParameter`] + Dynamic variables or selections that parameterize a visualization. + resolve : dict, :class:`Resolve` + Scale, axis, and legend resolutions for view composition specifications. + spacing : dict, float, :class:`RowColnumber` + The spacing in pixels between sub-views of the composition operator. An object of + the form ``{"row": number, "column": number}`` can be used to set different spacing + values for rows and columns. + + **Default value**: Depends on ``"spacing"`` property of `the view composition + configuration `__ + (``20`` by default) + title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams` + Title for the plot. + transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`] + An array of data transformations such as filter and new field calculation. + usermeta : dict, :class:`Dict` + Optional metadata that will be passed to Vega. This object is completely ignored by + Vega and Vega-Lite and can be used for custom metadata. + $schema : str + URL to `JSON schema `__ for a Vega-Lite specification. + Unless you have a reason to change this, use + ``https://vega.github.io/schema/vega-lite/v5.json``. Setting the ``$schema`` + property allows automatic validation and autocomplete in editors that support JSON + schema. + """ + + _schema = {"$ref": "#/definitions/TopLevelConcatSpec"} + + def __init__( + self, + concat: Optional[Sequence[SchemaBase | Map]] = Undefined, + align: Optional[SchemaBase | Map | LayoutAlign_T] = Undefined, + autosize: Optional[SchemaBase | Map | AutosizeType_T] = Undefined, + background: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T + ] = Undefined, + bounds: Optional[Literal["full", "flush"]] = Undefined, + center: Optional[bool | SchemaBase | Map] = Undefined, + columns: Optional[float] = Undefined, + config: Optional[SchemaBase | Map] = Undefined, + data: Optional[SchemaBase | Map | None] = Undefined, + datasets: Optional[SchemaBase | Map] = Undefined, + description: Optional[str] = Undefined, + name: Optional[str] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + params: Optional[Sequence[SchemaBase | Map]] = Undefined, + resolve: Optional[SchemaBase | Map] = Undefined, + spacing: Optional[float | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + transform: Optional[Sequence[SchemaBase | Map]] = Undefined, + usermeta: Optional[SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + concat=concat, + align=align, + autosize=autosize, + background=background, + bounds=bounds, + center=center, + columns=columns, + config=config, + data=data, + datasets=datasets, + description=description, + name=name, + padding=padding, + params=params, + resolve=resolve, + spacing=spacing, + title=title, + transform=transform, + usermeta=usermeta, + **kwds, + ) + + +class TopLevelFacetSpec(TopLevelSpec): + """ + TopLevelFacetSpec schema wrapper. + + Parameters + ---------- + data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None + An object describing the data source. Set to ``null`` to ignore the parent's data + source. If no data is set, it is derived from the parent. + facet : dict, :class:`FacetMapping`, :class:`FacetFieldDef` + Definition for how to facet the data. One of: 1) `a field definition for faceting + the plot by one field + `__ 2) `An object that + maps row and column channels to their field definitions + `__ + spec : dict, :class:`LayerSpec`, :class:`UnitSpecWithFrame` + A specification of the view that gets faceted. + align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none'] + The alignment to apply to grid rows and columns. The supported string values are + ``"all"``, ``"each"``, and ``"none"``. + + * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply + placed one after the other. + * For ``"each"``, subviews will be aligned into a clean grid structure, but each row + or column may be of variable size. + * For ``"all"``, subviews will be aligned and each row or column will be sized + identically based on the maximum observed size. String values for this property + will be applied to both grid rows and columns. + + Alternatively, an object value of the form ``{"row": string, "column": string}`` can + be used to supply different alignments for rows and columns. + + **Default value:** ``"all"``. + autosize : dict, :class:`AutosizeType`, :class:`AutoSizeParams`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y'] + How the visualization size should be determined. If a string, should be one of + ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify + parameters for content sizing and automatic resizing. + + **Default value**: ``pad`` + background : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + CSS color property to use as the background of the entire view. + + **Default value:** ``"white"`` + bounds : Literal['full', 'flush'] + The bounds calculation method to use for determining the extent of a sub-plot. One + of ``full`` (the default) or ``flush``. + + * If set to ``full``, the entire calculated bounds (including axes, title, and + legend) will be used. + * If set to ``flush``, only the specified width and height values for the sub-view + will be used. The ``flush`` setting can be useful when attempting to place + sub-plots without axes or legends into a uniform grid structure. + + **Default value:** ``"full"`` + center : bool, dict, :class:`RowColboolean` + Boolean flag indicating if subviews should be centered relative to their respective + rows or columns. + + An object value of the form ``{"row": boolean, "column": boolean}`` can be used to + supply different centering values for rows and columns. + + **Default value:** ``false`` + columns : float + The number of columns to include in the view composition layout. + + **Default value**: ``undefined`` -- An infinite number of columns (a single row) + will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the + ``column`` channel (for ``facet`` and ``repeat``). + + **Note**: + + 1) This property is only for: + + * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``) + * the ``facet`` and ``repeat`` operator with one field/repetition definition + (without row/column nesting) + + 2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``) + and to using the ``row`` channel (for ``facet`` and ``repeat``). + config : dict, :class:`Config` + Vega-Lite configuration object. This property can only be defined at the top-level + of a specification. + datasets : dict, :class:`Datasets` + A global data store for named datasets. This is a mapping from names to inline + datasets. 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. + description : str + Description of this mark for commenting purpose. + name : str + Name of the visualization for later reference. + padding : dict, float, :class:`ExprRef`, :class:`Padding` + The default visualization padding, in pixels, from the edge of the visualization + canvas to the data rectangle. If a number, specifies padding for all sides. If an + object, the value should have the format ``{"left": 5, "top": 5, "right": 5, + "bottom": 5}`` to specify padding for each side of the visualization. + + **Default value**: ``5`` + params : Sequence[dict, :class:`TopLevelParameter`, :class:`VariableParameter`, :class:`TopLevelSelectionParameter`] + Dynamic variables or selections that parameterize a visualization. + resolve : dict, :class:`Resolve` + Scale, axis, and legend resolutions for view composition specifications. + spacing : dict, float, :class:`RowColnumber` + The spacing in pixels between sub-views of the composition operator. An object of + the form ``{"row": number, "column": number}`` can be used to set different spacing + values for rows and columns. + + **Default value**: Depends on ``"spacing"`` property of `the view composition + configuration `__ + (``20`` by default) + title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams` + Title for the plot. + transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`] + An array of data transformations such as filter and new field calculation. + usermeta : dict, :class:`Dict` + Optional metadata that will be passed to Vega. This object is completely ignored by + Vega and Vega-Lite and can be used for custom metadata. + $schema : str + URL to `JSON schema `__ for a Vega-Lite specification. + Unless you have a reason to change this, use + ``https://vega.github.io/schema/vega-lite/v5.json``. Setting the ``$schema`` + property allows automatic validation and autocomplete in editors that support JSON + schema. + """ + + _schema = {"$ref": "#/definitions/TopLevelFacetSpec"} + + def __init__( + self, + data: Optional[SchemaBase | Map | None] = Undefined, + facet: Optional[SchemaBase | Map] = Undefined, + spec: Optional[SchemaBase | Map] = Undefined, + align: Optional[SchemaBase | Map | LayoutAlign_T] = Undefined, + autosize: Optional[SchemaBase | Map | AutosizeType_T] = Undefined, + background: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T + ] = Undefined, + bounds: Optional[Literal["full", "flush"]] = Undefined, + center: Optional[bool | SchemaBase | Map] = Undefined, + columns: Optional[float] = Undefined, + config: Optional[SchemaBase | Map] = Undefined, + datasets: Optional[SchemaBase | Map] = Undefined, + description: Optional[str] = Undefined, + name: Optional[str] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + params: Optional[Sequence[SchemaBase | Map]] = Undefined, + resolve: Optional[SchemaBase | Map] = Undefined, + spacing: Optional[float | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + transform: Optional[Sequence[SchemaBase | Map]] = Undefined, + usermeta: Optional[SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + data=data, + facet=facet, + spec=spec, + align=align, + autosize=autosize, + background=background, + bounds=bounds, + center=center, + columns=columns, + config=config, + datasets=datasets, + description=description, + name=name, + padding=padding, + params=params, + resolve=resolve, + spacing=spacing, + title=title, + transform=transform, + usermeta=usermeta, + **kwds, + ) + + +class TopLevelHConcatSpec(TopLevelSpec): + """ + TopLevelHConcatSpec schema wrapper. + + Parameters + ---------- + hconcat : Sequence[dict, :class:`FacetSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetedUnitSpec`, :class:`LayerRepeatSpec`, :class:`NonNormalizedSpec`, :class:`NonLayerRepeatSpec`, :class:`ConcatSpecGenericSpec`, :class:`HConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec`] + A list of views to be concatenated and put into a row. + autosize : dict, :class:`AutosizeType`, :class:`AutoSizeParams`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y'] + How the visualization size should be determined. If a string, should be one of + ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify + parameters for content sizing and automatic resizing. + + **Default value**: ``pad`` + background : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + CSS color property to use as the background of the entire view. + + **Default value:** ``"white"`` + bounds : Literal['full', 'flush'] + The bounds calculation method to use for determining the extent of a sub-plot. One + of ``full`` (the default) or ``flush``. + + * If set to ``full``, the entire calculated bounds (including axes, title, and + legend) will be used. + * If set to ``flush``, only the specified width and height values for the sub-view + will be used. The ``flush`` setting can be useful when attempting to place + sub-plots without axes or legends into a uniform grid structure. + + **Default value:** ``"full"`` + center : bool + Boolean flag indicating if subviews should be centered relative to their respective + rows or columns. + + **Default value:** ``false`` + config : dict, :class:`Config` + Vega-Lite configuration object. This property can only be defined at the top-level + of a specification. + data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None + An object describing the data source. Set to ``null`` to ignore the parent's data + source. If no data is set, it is derived from the parent. + datasets : dict, :class:`Datasets` + A global data store for named datasets. This is a mapping from names to inline + datasets. 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. + description : str + Description of this mark for commenting purpose. + name : str + Name of the visualization for later reference. + padding : dict, float, :class:`ExprRef`, :class:`Padding` + The default visualization padding, in pixels, from the edge of the visualization + canvas to the data rectangle. If a number, specifies padding for all sides. If an + object, the value should have the format ``{"left": 5, "top": 5, "right": 5, + "bottom": 5}`` to specify padding for each side of the visualization. + + **Default value**: ``5`` + params : Sequence[dict, :class:`TopLevelParameter`, :class:`VariableParameter`, :class:`TopLevelSelectionParameter`] + Dynamic variables or selections that parameterize a visualization. + resolve : dict, :class:`Resolve` + Scale, axis, and legend resolutions for view composition specifications. + spacing : float + The spacing in pixels between sub-views of the concat operator. + + **Default value**: ``10`` + title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams` + Title for the plot. + transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`] + An array of data transformations such as filter and new field calculation. + usermeta : dict, :class:`Dict` + Optional metadata that will be passed to Vega. This object is completely ignored by + Vega and Vega-Lite and can be used for custom metadata. + $schema : str + URL to `JSON schema `__ for a Vega-Lite specification. + Unless you have a reason to change this, use + ``https://vega.github.io/schema/vega-lite/v5.json``. Setting the ``$schema`` + property allows automatic validation and autocomplete in editors that support JSON + schema. + """ + + _schema = {"$ref": "#/definitions/TopLevelHConcatSpec"} + + def __init__( + self, + hconcat: Optional[Sequence[SchemaBase | Map]] = Undefined, + autosize: Optional[SchemaBase | Map | AutosizeType_T] = Undefined, + background: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T + ] = Undefined, + bounds: Optional[Literal["full", "flush"]] = Undefined, + center: Optional[bool] = Undefined, + config: Optional[SchemaBase | Map] = Undefined, + data: Optional[SchemaBase | Map | None] = Undefined, + datasets: Optional[SchemaBase | Map] = Undefined, + description: Optional[str] = Undefined, + name: Optional[str] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + params: Optional[Sequence[SchemaBase | Map]] = Undefined, + resolve: Optional[SchemaBase | Map] = Undefined, + spacing: Optional[float] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + transform: Optional[Sequence[SchemaBase | Map]] = Undefined, + usermeta: Optional[SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + hconcat=hconcat, + autosize=autosize, + background=background, + bounds=bounds, + center=center, + config=config, + data=data, + datasets=datasets, + description=description, + name=name, + padding=padding, + params=params, + resolve=resolve, + spacing=spacing, + title=title, + transform=transform, + usermeta=usermeta, + **kwds, + ) + + +class TopLevelLayerSpec(TopLevelSpec): + """ + TopLevelLayerSpec schema wrapper. + + Parameters + ---------- + layer : Sequence[dict, :class:`UnitSpec`, :class:`LayerSpec`] + Layer or single view specifications to be layered. + + **Note**: Specifications inside ``layer`` cannot use ``row`` and ``column`` channels + as layering facet specifications is not allowed. Instead, use the `facet operator + `__ and place a layer inside a + facet. + autosize : dict, :class:`AutosizeType`, :class:`AutoSizeParams`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y'] + How the visualization size should be determined. If a string, should be one of + ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify + parameters for content sizing and automatic resizing. + + **Default value**: ``pad`` + background : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + CSS color property to use as the background of the entire view. + + **Default value:** ``"white"`` + config : dict, :class:`Config` + Vega-Lite configuration object. This property can only be defined at the top-level + of a specification. + data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None + An object describing the data source. Set to ``null`` to ignore the parent's data + source. If no data is set, it is derived from the parent. + datasets : dict, :class:`Datasets` + A global data store for named datasets. This is a mapping from names to inline + datasets. 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. + description : str + Description of this mark for commenting purpose. + encoding : dict, :class:`SharedEncoding` + A shared key-value mapping between encoding channels and definition of fields in the + underlying layers. + height : dict, float, :class:`Step`, Literal['container'] + The height of a visualization. + + * For a plot with a continuous y-field, height should be a number. + * For a plot with either a discrete y-field or no y-field, height can be either a + number indicating a fixed height or an object in the form of ``{step: number}`` + defining the height per discrete step. (No y-field is equivalent to having one + discrete step.) + * To enable responsive sizing on height, it should be set to ``"container"``. + + **Default value:** Based on ``config.view.continuousHeight`` for a plot with a + continuous y-field and ``config.view.discreteHeight`` otherwise. + + **Note:** For plots with `row and column channels + `__, this represents the + height of a single view and the ``"container"`` option cannot be used. + + **See also:** `height `__ + documentation. + name : str + Name of the visualization for later reference. + padding : dict, float, :class:`ExprRef`, :class:`Padding` + The default visualization padding, in pixels, from the edge of the visualization + canvas to the data rectangle. If a number, specifies padding for all sides. If an + object, the value should have the format ``{"left": 5, "top": 5, "right": 5, + "bottom": 5}`` to specify padding for each side of the visualization. + + **Default value**: ``5`` + params : Sequence[dict, :class:`TopLevelParameter`, :class:`VariableParameter`, :class:`TopLevelSelectionParameter`] + Dynamic variables or selections that parameterize a visualization. + projection : dict, :class:`Projection` + An object defining properties of the geographic projection shared by underlying + layers. + resolve : dict, :class:`Resolve` + Scale, axis, and legend resolutions for view composition specifications. + title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams` + Title for the plot. + transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`] + An array of data transformations such as filter and new field calculation. + usermeta : dict, :class:`Dict` + Optional metadata that will be passed to Vega. This object is completely ignored by + Vega and Vega-Lite and can be used for custom metadata. + view : dict, :class:`ViewBackground` + An object defining the view background's fill and stroke. + + **Default value:** none (transparent) + width : dict, float, :class:`Step`, Literal['container'] + The width of a visualization. + + * For a plot with a continuous x-field, width should be a number. + * For a plot with either a discrete x-field or no x-field, width can be either a + number indicating a fixed width or an object in the form of ``{step: number}`` + defining the width per discrete step. (No x-field is equivalent to having one + discrete step.) + * To enable responsive sizing on width, it should be set to ``"container"``. + + **Default value:** Based on ``config.view.continuousWidth`` for a plot with a + continuous x-field and ``config.view.discreteWidth`` otherwise. + + **Note:** For plots with `row and column channels + `__, this represents the + width of a single view and the ``"container"`` option cannot be used. + + **See also:** `width `__ + documentation. + $schema : str + URL to `JSON schema `__ for a Vega-Lite specification. + Unless you have a reason to change this, use + ``https://vega.github.io/schema/vega-lite/v5.json``. Setting the ``$schema`` + property allows automatic validation and autocomplete in editors that support JSON + schema. + """ + + _schema = {"$ref": "#/definitions/TopLevelLayerSpec"} + + def __init__( + self, + layer: Optional[Sequence[SchemaBase | Map]] = Undefined, + autosize: Optional[SchemaBase | Map | AutosizeType_T] = Undefined, + background: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T + ] = Undefined, + config: Optional[SchemaBase | Map] = Undefined, + data: Optional[SchemaBase | Map | None] = Undefined, + datasets: Optional[SchemaBase | Map] = Undefined, + description: Optional[str] = Undefined, + encoding: Optional[SchemaBase | Map] = Undefined, + height: Optional[float | SchemaBase | Literal["container"] | Map] = Undefined, + name: Optional[str] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + params: Optional[Sequence[SchemaBase | Map]] = Undefined, + projection: Optional[SchemaBase | Map] = Undefined, + resolve: Optional[SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + transform: Optional[Sequence[SchemaBase | Map]] = Undefined, + usermeta: Optional[SchemaBase | Map] = Undefined, + view: Optional[SchemaBase | Map] = Undefined, + width: Optional[float | SchemaBase | Literal["container"] | Map] = Undefined, + **kwds, + ): + super().__init__( + layer=layer, + autosize=autosize, + background=background, + config=config, + data=data, + datasets=datasets, + description=description, + encoding=encoding, + height=height, + name=name, + padding=padding, + params=params, + projection=projection, + resolve=resolve, + title=title, + transform=transform, + usermeta=usermeta, + view=view, + width=width, + **kwds, + ) + + +class TopLevelRepeatSpec(TopLevelSpec): + """TopLevelRepeatSpec schema wrapper.""" + + _schema = {"$ref": "#/definitions/TopLevelRepeatSpec"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class TopLevelUnitSpec(TopLevelSpec): + """ + TopLevelUnitSpec schema wrapper. + + Parameters + ---------- + data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None + An object describing the data source. Set to ``null`` to ignore the parent's data + source. If no data is set, it is derived from the parent. + mark : dict, :class:`Mark`, :class:`AnyMark`, :class:`BoxPlot`, :class:`MarkDef`, :class:`ErrorBar`, :class:`ErrorBand`, :class:`BoxPlotDef`, :class:`ErrorBarDef`, :class:`ErrorBandDef`, :class:`CompositeMark`, :class:`CompositeMarkDef`, Literal['arc', 'area', 'bar', 'image', 'line', 'point', 'rect', 'rule', 'text', 'tick', 'trail', 'circle', 'square', 'geoshape', 'boxplot', 'errorband', 'errorbar'] + A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``, + ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and + ``"text"``) or a `mark definition object + `__. + align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none'] + The alignment to apply to grid rows and columns. The supported string values are + ``"all"``, ``"each"``, and ``"none"``. + + * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply + placed one after the other. + * For ``"each"``, subviews will be aligned into a clean grid structure, but each row + or column may be of variable size. + * For ``"all"``, subviews will be aligned and each row or column will be sized + identically based on the maximum observed size. String values for this property + will be applied to both grid rows and columns. + + Alternatively, an object value of the form ``{"row": string, "column": string}`` can + be used to supply different alignments for rows and columns. + + **Default value:** ``"all"``. + autosize : dict, :class:`AutosizeType`, :class:`AutoSizeParams`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y'] + How the visualization size should be determined. If a string, should be one of + ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify + parameters for content sizing and automatic resizing. + + **Default value**: ``pad`` + background : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + CSS color property to use as the background of the entire view. + + **Default value:** ``"white"`` + bounds : Literal['full', 'flush'] + The bounds calculation method to use for determining the extent of a sub-plot. One + of ``full`` (the default) or ``flush``. + + * If set to ``full``, the entire calculated bounds (including axes, title, and + legend) will be used. + * If set to ``flush``, only the specified width and height values for the sub-view + will be used. The ``flush`` setting can be useful when attempting to place + sub-plots without axes or legends into a uniform grid structure. + + **Default value:** ``"full"`` + center : bool, dict, :class:`RowColboolean` + Boolean flag indicating if subviews should be centered relative to their respective + rows or columns. + + An object value of the form ``{"row": boolean, "column": boolean}`` can be used to + supply different centering values for rows and columns. + + **Default value:** ``false`` + config : dict, :class:`Config` + Vega-Lite configuration object. This property can only be defined at the top-level + of a specification. + datasets : dict, :class:`Datasets` + A global data store for named datasets. This is a mapping from names to inline + datasets. 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. + description : str + Description of this mark for commenting purpose. + encoding : dict, :class:`FacetedEncoding` + A key-value mapping between encoding channels and definition of fields. + height : dict, float, :class:`Step`, Literal['container'] + The height of a visualization. + + * For a plot with a continuous y-field, height should be a number. + * For a plot with either a discrete y-field or no y-field, height can be either a + number indicating a fixed height or an object in the form of ``{step: number}`` + defining the height per discrete step. (No y-field is equivalent to having one + discrete step.) + * To enable responsive sizing on height, it should be set to ``"container"``. + + **Default value:** Based on ``config.view.continuousHeight`` for a plot with a + continuous y-field and ``config.view.discreteHeight`` otherwise. + + **Note:** For plots with `row and column channels + `__, this represents the + height of a single view and the ``"container"`` option cannot be used. + + **See also:** `height `__ + documentation. + name : str + Name of the visualization for later reference. + padding : dict, float, :class:`ExprRef`, :class:`Padding` + The default visualization padding, in pixels, from the edge of the visualization + canvas to the data rectangle. If a number, specifies padding for all sides. If an + object, the value should have the format ``{"left": 5, "top": 5, "right": 5, + "bottom": 5}`` to specify padding for each side of the visualization. + + **Default value**: ``5`` + params : Sequence[dict, :class:`TopLevelParameter`, :class:`VariableParameter`, :class:`TopLevelSelectionParameter`] + An array of parameters that may either be simple variables, or more complex + selections that map user input to data queries. + projection : dict, :class:`Projection` + An object defining properties of geographic projection, which will be applied to + ``shape`` path for ``"geoshape"`` marks and to ``latitude`` and ``"longitude"`` + channels for other marks. + resolve : dict, :class:`Resolve` + Scale, axis, and legend resolutions for view composition specifications. + spacing : dict, float, :class:`RowColnumber` + The spacing in pixels between sub-views of the composition operator. An object of + the form ``{"row": number, "column": number}`` can be used to set different spacing + values for rows and columns. + + **Default value**: Depends on ``"spacing"`` property of `the view composition + configuration `__ + (``20`` by default) + title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams` + Title for the plot. + transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`] + An array of data transformations such as filter and new field calculation. + usermeta : dict, :class:`Dict` + Optional metadata that will be passed to Vega. This object is completely ignored by + Vega and Vega-Lite and can be used for custom metadata. + view : dict, :class:`ViewBackground` + An object defining the view background's fill and stroke. + + **Default value:** none (transparent) + width : dict, float, :class:`Step`, Literal['container'] + The width of a visualization. + + * For a plot with a continuous x-field, width should be a number. + * For a plot with either a discrete x-field or no x-field, width can be either a + number indicating a fixed width or an object in the form of ``{step: number}`` + defining the width per discrete step. (No x-field is equivalent to having one + discrete step.) + * To enable responsive sizing on width, it should be set to ``"container"``. + + **Default value:** Based on ``config.view.continuousWidth`` for a plot with a + continuous x-field and ``config.view.discreteWidth`` otherwise. + + **Note:** For plots with `row and column channels + `__, this represents the + width of a single view and the ``"container"`` option cannot be used. + + **See also:** `width `__ + documentation. + $schema : str + URL to `JSON schema `__ for a Vega-Lite specification. + Unless you have a reason to change this, use + ``https://vega.github.io/schema/vega-lite/v5.json``. Setting the ``$schema`` + property allows automatic validation and autocomplete in editors that support JSON + schema. + """ + + _schema = {"$ref": "#/definitions/TopLevelUnitSpec"} + + def __init__( + self, + data: Optional[SchemaBase | Map | None] = Undefined, + mark: Optional[SchemaBase | Map | Mark_T | CompositeMark_T] = Undefined, + align: Optional[SchemaBase | Map | LayoutAlign_T] = Undefined, + autosize: Optional[SchemaBase | Map | AutosizeType_T] = Undefined, + background: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T + ] = Undefined, + bounds: Optional[Literal["full", "flush"]] = Undefined, + center: Optional[bool | SchemaBase | Map] = Undefined, + config: Optional[SchemaBase | Map] = Undefined, + datasets: Optional[SchemaBase | Map] = Undefined, + description: Optional[str] = Undefined, + encoding: Optional[SchemaBase | Map] = Undefined, + height: Optional[float | SchemaBase | Literal["container"] | Map] = Undefined, + name: Optional[str] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + params: Optional[Sequence[SchemaBase | Map]] = Undefined, + projection: Optional[SchemaBase | Map] = Undefined, + resolve: Optional[SchemaBase | Map] = Undefined, + spacing: Optional[float | SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + transform: Optional[Sequence[SchemaBase | Map]] = Undefined, + usermeta: Optional[SchemaBase | Map] = Undefined, + view: Optional[SchemaBase | Map] = Undefined, + width: Optional[float | SchemaBase | Literal["container"] | Map] = Undefined, + **kwds, + ): + super().__init__( + data=data, + mark=mark, + align=align, + autosize=autosize, + background=background, + bounds=bounds, + center=center, + config=config, + datasets=datasets, + description=description, + encoding=encoding, + height=height, + name=name, + padding=padding, + params=params, + projection=projection, + resolve=resolve, + spacing=spacing, + title=title, + transform=transform, + usermeta=usermeta, + view=view, + width=width, + **kwds, + ) + + +class TopLevelVConcatSpec(TopLevelSpec): + """ + TopLevelVConcatSpec schema wrapper. + + Parameters + ---------- + vconcat : Sequence[dict, :class:`FacetSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetedUnitSpec`, :class:`LayerRepeatSpec`, :class:`NonNormalizedSpec`, :class:`NonLayerRepeatSpec`, :class:`ConcatSpecGenericSpec`, :class:`HConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec`] + A list of views to be concatenated and put into a column. + autosize : dict, :class:`AutosizeType`, :class:`AutoSizeParams`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y'] + How the visualization size should be determined. If a string, should be one of + ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify + parameters for content sizing and automatic resizing. + + **Default value**: ``pad`` + background : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + CSS color property to use as the background of the entire view. + + **Default value:** ``"white"`` + bounds : Literal['full', 'flush'] + The bounds calculation method to use for determining the extent of a sub-plot. One + of ``full`` (the default) or ``flush``. + + * If set to ``full``, the entire calculated bounds (including axes, title, and + legend) will be used. + * If set to ``flush``, only the specified width and height values for the sub-view + will be used. The ``flush`` setting can be useful when attempting to place + sub-plots without axes or legends into a uniform grid structure. + + **Default value:** ``"full"`` + center : bool + Boolean flag indicating if subviews should be centered relative to their respective + rows or columns. + + **Default value:** ``false`` + config : dict, :class:`Config` + Vega-Lite configuration object. This property can only be defined at the top-level + of a specification. + data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None + An object describing the data source. Set to ``null`` to ignore the parent's data + source. If no data is set, it is derived from the parent. + datasets : dict, :class:`Datasets` + A global data store for named datasets. This is a mapping from names to inline + datasets. 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. + description : str + Description of this mark for commenting purpose. + name : str + Name of the visualization for later reference. + padding : dict, float, :class:`ExprRef`, :class:`Padding` + The default visualization padding, in pixels, from the edge of the visualization + canvas to the data rectangle. If a number, specifies padding for all sides. If an + object, the value should have the format ``{"left": 5, "top": 5, "right": 5, + "bottom": 5}`` to specify padding for each side of the visualization. + + **Default value**: ``5`` + params : Sequence[dict, :class:`TopLevelParameter`, :class:`VariableParameter`, :class:`TopLevelSelectionParameter`] + Dynamic variables or selections that parameterize a visualization. + resolve : dict, :class:`Resolve` + Scale, axis, and legend resolutions for view composition specifications. + spacing : float + The spacing in pixels between sub-views of the concat operator. + + **Default value**: ``10`` + title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams` + Title for the plot. + transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`] + An array of data transformations such as filter and new field calculation. + usermeta : dict, :class:`Dict` + Optional metadata that will be passed to Vega. This object is completely ignored by + Vega and Vega-Lite and can be used for custom metadata. + $schema : str + URL to `JSON schema `__ for a Vega-Lite specification. + Unless you have a reason to change this, use + ``https://vega.github.io/schema/vega-lite/v5.json``. Setting the ``$schema`` + property allows automatic validation and autocomplete in editors that support JSON + schema. + """ + + _schema = {"$ref": "#/definitions/TopLevelVConcatSpec"} + + def __init__( + self, + vconcat: Optional[Sequence[SchemaBase | Map]] = Undefined, + autosize: Optional[SchemaBase | Map | AutosizeType_T] = Undefined, + background: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T + ] = Undefined, + bounds: Optional[Literal["full", "flush"]] = Undefined, + center: Optional[bool] = Undefined, + config: Optional[SchemaBase | Map] = Undefined, + data: Optional[SchemaBase | Map | None] = Undefined, + datasets: Optional[SchemaBase | Map] = Undefined, + description: Optional[str] = Undefined, + name: Optional[str] = Undefined, + padding: Optional[float | Parameter | SchemaBase | Map] = Undefined, + params: Optional[Sequence[SchemaBase | Map]] = Undefined, + resolve: Optional[SchemaBase | Map] = Undefined, + spacing: Optional[float] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + transform: Optional[Sequence[SchemaBase | Map]] = Undefined, + usermeta: Optional[SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + vconcat=vconcat, + autosize=autosize, + background=background, + bounds=bounds, + center=center, + config=config, + data=data, + datasets=datasets, + description=description, + name=name, + padding=padding, + params=params, + resolve=resolve, + spacing=spacing, + title=title, + transform=transform, + usermeta=usermeta, + **kwds, + ) + + +class TopoDataFormat(DataFormat): + """ + TopoDataFormat schema wrapper. + + Parameters + ---------- + feature : str + The name of the TopoJSON object set to convert to a GeoJSON feature collection. For + example, in a map of the world, there may be an object set named ``"countries"``. + Using the feature property, we can extract this set and generate a GeoJSON feature + object for each country. + mesh : str + The name of the TopoJSON object set to convert to mesh. Similar to the ``feature`` + option, ``mesh`` extracts a named TopoJSON object set. Unlike the ``feature`` + option, the corresponding geo data is returned as a single, unified mesh instance, + 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 : dict, :class:`Parse`, None + 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 : Literal['topojson'] + Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``. + + **Default value:** 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"} + + def __init__( + self, + feature: Optional[str] = Undefined, + mesh: Optional[str] = Undefined, + parse: Optional[SchemaBase | Map | None] = Undefined, + type: Optional[Literal["topojson"]] = Undefined, + **kwds, + ): + super().__init__(feature=feature, mesh=mesh, parse=parse, type=type, **kwds) + + +class Transform(VegaLiteSchema): + """Transform schema wrapper.""" + + _schema = {"$ref": "#/definitions/Transform"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class AggregateTransform(Transform): + """ + AggregateTransform schema wrapper. + + Parameters + ---------- + aggregate : Sequence[dict, :class:`AggregatedFieldDef`] + Array of objects that define fields to aggregate. + groupby : Sequence[str, :class:`FieldName`] + The data fields to group by. If not specified, a single group containing all data + objects will be used. + """ + + _schema = {"$ref": "#/definitions/AggregateTransform"} + + def __init__( + self, + aggregate: Optional[Sequence[SchemaBase | Map]] = Undefined, + groupby: Optional[Sequence[str | SchemaBase]] = Undefined, + **kwds, + ): + super().__init__(aggregate=aggregate, groupby=groupby, **kwds) + + +class BinTransform(Transform): + """ + BinTransform schema wrapper. + + Parameters + ---------- + bin : dict, Literal[True], :class:`BinParams` + An object indicating bin properties, or simply ``true`` for using default bin + parameters. + field : str, :class:`FieldName` + The data field to bin. + as : str, :class:`FieldName`, Sequence[str, :class:`FieldName`] + The output fields at which to write the start and end bin values. This can be either + a string or an array of strings with two elements denoting the name for the fields + for bin start and bin end respectively. If a single string (e.g., ``"val"``) is + provided, the end field will be ``"val_end"``. + """ + + _schema = {"$ref": "#/definitions/BinTransform"} + + def __init__( + self, + bin: Optional[SchemaBase | Literal[True] | Map] = Undefined, + field: Optional[str | SchemaBase] = Undefined, + **kwds, + ): + super().__init__(bin=bin, field=field, **kwds) + + +class CalculateTransform(Transform): + """ + CalculateTransform schema wrapper. + + Parameters + ---------- + calculate : str + A `expression `__ + string. Use the variable ``datum`` to refer to the current data object. + as : str, :class:`FieldName` + The field for storing the computed formula value. + """ + + _schema = {"$ref": "#/definitions/CalculateTransform"} + + def __init__(self, calculate: Optional[str] = Undefined, **kwds): + super().__init__(calculate=calculate, **kwds) + + +class DensityTransform(Transform): + """ + DensityTransform schema wrapper. + + Parameters + ---------- + density : str, :class:`FieldName` + The data field for which to perform density estimation. + bandwidth : float + The bandwidth (standard deviation) of the Gaussian kernel. If unspecified or set to + zero, the bandwidth value is automatically estimated from the input data using + Scott's rule. + counts : bool + A boolean flag indicating if the output values should be probability estimates + (false) or smoothed counts (true). + + **Default value:** ``false`` + cumulative : bool + A boolean flag indicating whether to produce density estimates (false) or cumulative + density estimates (true). + + **Default value:** ``false`` + extent : Sequence[float] + A [min, max] domain from which to sample the distribution. If unspecified, the + extent will be determined by the observed minimum and maximum values of the density + value field. + groupby : Sequence[str, :class:`FieldName`] + The data fields to group by. If not specified, a single group containing all data + objects will be used. + maxsteps : float + The maximum number of samples to take along the extent domain for plotting the + density. + + **Default value:** ``200`` + minsteps : float + The minimum number of samples to take along the extent domain for plotting the + density. + + **Default value:** ``25`` + resolve : Literal['independent', 'shared'] + Indicates how parameters for multiple densities should be resolved. If + ``"independent"``, each density may have its own domain extent and dynamic number of + curve sample steps. If ``"shared"``, the KDE transform will ensure that all + densities are defined over a shared domain and curve steps, enabling stacking. + + **Default value:** ``"shared"`` + steps : float + The exact number of samples to take along the extent domain for plotting the + density. If specified, overrides both minsteps and maxsteps to set an exact number + of uniform samples. Potentially useful in conjunction with a fixed extent to ensure + consistent sample points for stacked densities. + as : Sequence[str, :class:`FieldName`] + The output fields for the sample value and corresponding density estimate. + + **Default value:** ``["value", "density"]`` + """ + + _schema = {"$ref": "#/definitions/DensityTransform"} + + def __init__( + self, + density: Optional[str | SchemaBase] = Undefined, + bandwidth: Optional[float] = Undefined, + counts: Optional[bool] = Undefined, + cumulative: Optional[bool] = Undefined, + extent: Optional[Sequence[float]] = Undefined, + groupby: Optional[Sequence[str | SchemaBase]] = Undefined, + maxsteps: Optional[float] = Undefined, + minsteps: Optional[float] = Undefined, + resolve: Optional[ResolveMode_T] = Undefined, + steps: Optional[float] = Undefined, + **kwds, + ): + super().__init__( + density=density, + bandwidth=bandwidth, + counts=counts, + cumulative=cumulative, + extent=extent, + groupby=groupby, + maxsteps=maxsteps, + minsteps=minsteps, + resolve=resolve, + steps=steps, + **kwds, + ) + + +class ExtentTransform(Transform): + """ + ExtentTransform schema wrapper. + + Parameters + ---------- + extent : str, :class:`FieldName` + The field of which to get the extent. + param : str, :class:`ParameterName` + The output parameter produced by the extent transform. + """ + + _schema = {"$ref": "#/definitions/ExtentTransform"} + + def __init__( + self, + extent: Optional[str | SchemaBase] = Undefined, + param: Optional[str | SchemaBase] = Undefined, + **kwds, + ): + super().__init__(extent=extent, param=param, **kwds) + + +class FilterTransform(Transform): + """ + FilterTransform schema wrapper. + + Parameters + ---------- + filter : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition` + The ``filter`` property must be a predication definition, which can take one of the + following forms: + + 1) an `expression `__ + string, where ``datum`` can be used to refer to the current data object. For + example, ``{filter: "datum.b2 > 60"}`` would make the output data includes only + items that have values in the field ``b2`` over 60. + + 2) one of the `field predicates + `__: `equal + `__, `lt + `__, `lte + `__, `gt + `__, `gte + `__, `range + `__, `oneOf + `__, or + `valid `__, + + 3) a `selection predicate + `__, which + define the names of a selection that the data point should belong to (or a logical + composition of selections). + + 4) a `logical composition + `__ of (1), (2), + or (3). + """ + + _schema = {"$ref": "#/definitions/FilterTransform"} + + def __init__(self, filter: Optional[str | SchemaBase | Map] = Undefined, **kwds): + super().__init__(filter=filter, **kwds) + + +class FlattenTransform(Transform): + """ + FlattenTransform schema wrapper. + + Parameters + ---------- + flatten : Sequence[str, :class:`FieldName`] + An array of one or more data fields containing arrays to flatten. If multiple fields + are specified, their array values should have a parallel structure, ideally with the + same length. If the lengths of parallel arrays do not match, the longest array will + be used with ``null`` values added for missing entries. + as : Sequence[str, :class:`FieldName`] + The output field names for extracted array values. + + **Default value:** The field name of the corresponding array field + """ + + _schema = {"$ref": "#/definitions/FlattenTransform"} + + def __init__( + self, flatten: Optional[Sequence[str | SchemaBase]] = Undefined, **kwds + ): + super().__init__(flatten=flatten, **kwds) + + +class FoldTransform(Transform): + """ + FoldTransform schema wrapper. + + Parameters + ---------- + fold : Sequence[str, :class:`FieldName`] + An array of data fields indicating the properties to fold. + as : Sequence[str, :class:`FieldName`] + The output field names for the key and value properties produced by the fold + transform. **Default value:** ``["key", "value"]`` + """ + + _schema = {"$ref": "#/definitions/FoldTransform"} + + def __init__(self, fold: Optional[Sequence[str | SchemaBase]] = Undefined, **kwds): + super().__init__(fold=fold, **kwds) + + +class ImputeTransform(Transform): + """ + ImputeTransform schema wrapper. + + Parameters + ---------- + impute : str, :class:`FieldName` + The data field for which the missing values should be imputed. + key : str, :class:`FieldName` + A key field that uniquely identifies data objects within a group. Missing key values + (those occurring in the data but not in the current group) will be imputed. + frame : Sequence[float, None] + A frame specification as a two-element array used to control the window over which + the specified method is applied. The array entries should either be a number + indicating the offset from the current data object, or null to indicate unbounded + rows preceding or following the current data object. For example, the value ``[-5, + 5]`` indicates that the window should include five objects preceding and five + objects following the current object. + + **Default value:**: ``[null, null]`` indicating that the window includes all + objects. + groupby : Sequence[str, :class:`FieldName`] + An optional array of fields by which to group the values. Imputation will then be + performed on a per-group basis. + keyvals : dict, Sequence[Any], :class:`ImputeSequence` + Defines the key values that should be considered for imputation. An array of key + values or an object defining a `number sequence + `__. + + If provided, this will be used in addition to the key values observed within the + input data. If not provided, the values will be derived from all unique values of + the ``key`` field. For ``impute`` in ``encoding``, the key field is the x-field if + the y-field is imputed, or vice versa. + + If there is no impute grouping, this property *must* be specified. + method : :class:`ImputeMethod`, Literal['value', 'median', 'max', 'min', 'mean'] + The imputation method to use for the field value of imputed data objects. One of + ``"value"``, ``"mean"``, ``"median"``, ``"max"`` or ``"min"``. + + **Default value:** ``"value"`` + value : Any + The field value to use when the imputation ``method`` is ``"value"``. + """ + + _schema = {"$ref": "#/definitions/ImputeTransform"} + + def __init__( + self, + impute: Optional[str | SchemaBase] = Undefined, + key: Optional[str | SchemaBase] = Undefined, + frame: Optional[Sequence[float | None]] = Undefined, + groupby: Optional[Sequence[str | SchemaBase]] = Undefined, + keyvals: Optional[SchemaBase | Sequence[Any] | Map] = Undefined, + method: Optional[SchemaBase | ImputeMethod_T] = Undefined, + value: Optional[Any] = Undefined, + **kwds, + ): + super().__init__( + impute=impute, + key=key, + frame=frame, + groupby=groupby, + keyvals=keyvals, + method=method, + value=value, + **kwds, + ) + + +class JoinAggregateTransform(Transform): + """ + JoinAggregateTransform schema wrapper. + + Parameters + ---------- + joinaggregate : Sequence[dict, :class:`JoinAggregateFieldDef`] + The definition of the fields in the join aggregate, and what calculations to use. + groupby : Sequence[str, :class:`FieldName`] + The data fields for partitioning the data objects into separate groups. If + unspecified, all data points will be in a single group. + """ + + _schema = {"$ref": "#/definitions/JoinAggregateTransform"} + + def __init__( + self, + joinaggregate: Optional[Sequence[SchemaBase | Map]] = Undefined, + groupby: Optional[Sequence[str | SchemaBase]] = Undefined, + **kwds, + ): + super().__init__(joinaggregate=joinaggregate, groupby=groupby, **kwds) + + +class LoessTransform(Transform): + """ + LoessTransform schema wrapper. + + Parameters + ---------- + loess : str, :class:`FieldName` + The data field of the dependent variable to smooth. + on : str, :class:`FieldName` + The data field of the independent variable to use a predictor. + bandwidth : float + A bandwidth parameter in the range ``[0, 1]`` that determines the amount of + smoothing. + + **Default value:** ``0.3`` + groupby : Sequence[str, :class:`FieldName`] + The data fields to group by. If not specified, a single group containing all data + objects will be used. + as : Sequence[str, :class:`FieldName`] + The output field names for the smoothed points generated by the loess transform. + + **Default value:** The field names of the input x and y values. + """ + + _schema = {"$ref": "#/definitions/LoessTransform"} + + def __init__( + self, + loess: Optional[str | SchemaBase] = Undefined, + on: Optional[str | SchemaBase] = Undefined, + bandwidth: Optional[float] = Undefined, + groupby: Optional[Sequence[str | SchemaBase]] = Undefined, + **kwds, + ): + super().__init__( + loess=loess, on=on, bandwidth=bandwidth, groupby=groupby, **kwds + ) + + +class LookupTransform(Transform): + """ + LookupTransform schema wrapper. + + Parameters + ---------- + lookup : str + Key in primary data source. + default : Any + The default value to use if lookup fails. + + **Default value:** ``null`` + as : str, :class:`FieldName`, Sequence[str, :class:`FieldName`] + The output fields on which to store the looked up data values. + + For data lookups, this property may be left blank if ``from.fields`` has been + specified (those field names will be used); if ``from.fields`` has not been + specified, ``as`` must be a string. + + For selection lookups, this property is optional: if unspecified, looked up values + will be stored under a property named for the selection; and if specified, it must + correspond to ``from.fields``. + from : dict, :class:`LookupData`, :class:`LookupSelection` + Data source or selection for secondary data reference. + """ + + _schema = {"$ref": "#/definitions/LookupTransform"} + + def __init__( + self, + lookup: Optional[str] = Undefined, + default: Optional[Any] = Undefined, + **kwds, + ): + super().__init__(lookup=lookup, default=default, **kwds) + + +class PivotTransform(Transform): + """ + PivotTransform schema wrapper. + + Parameters + ---------- + pivot : str, :class:`FieldName` + The data field to pivot on. The unique values of this field become new field names + in the output stream. + value : str, :class:`FieldName` + The data field to populate pivoted fields. The aggregate values of this field become + the values of the new pivoted fields. + groupby : Sequence[str, :class:`FieldName`] + The optional data fields to group by. If not specified, a single group containing + all data objects will be used. + limit : float + An optional parameter indicating the maximum number of pivoted fields to generate. + The default (``0``) applies no limit. The pivoted ``pivot`` names are sorted in + ascending order prior to enforcing the limit. **Default value:** ``0`` + op : :class:`AggregateOp`, Literal['argmax', 'argmin', 'average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + The aggregation operation to apply to grouped ``value`` field values. **Default + value:** ``sum`` + """ + + _schema = {"$ref": "#/definitions/PivotTransform"} + + def __init__( + self, + pivot: Optional[str | SchemaBase] = Undefined, + value: Optional[str | SchemaBase] = Undefined, + groupby: Optional[Sequence[str | SchemaBase]] = Undefined, + limit: Optional[float] = Undefined, + op: Optional[SchemaBase | AggregateOp_T] = Undefined, + **kwds, + ): + super().__init__( + pivot=pivot, value=value, groupby=groupby, limit=limit, op=op, **kwds + ) + + +class QuantileTransform(Transform): + """ + QuantileTransform schema wrapper. + + Parameters + ---------- + quantile : str, :class:`FieldName` + The data field for which to perform quantile estimation. + groupby : Sequence[str, :class:`FieldName`] + The data fields to group by. If not specified, a single group containing all data + objects will be used. + probs : Sequence[float] + An array of probabilities in the range (0, 1) for which to compute quantile values. + If not specified, the *step* parameter will be used. + step : float + A probability step size (default 0.01) for sampling quantile values. All values from + one-half the step size up to 1 (exclusive) will be sampled. This parameter is only + used if the *probs* parameter is not provided. + as : Sequence[str, :class:`FieldName`] + The output field names for the probability and quantile values. + + **Default value:** ``["prob", "value"]`` + """ + + _schema = {"$ref": "#/definitions/QuantileTransform"} + + def __init__( + self, + quantile: Optional[str | SchemaBase] = Undefined, + groupby: Optional[Sequence[str | SchemaBase]] = Undefined, + probs: Optional[Sequence[float]] = Undefined, + step: Optional[float] = Undefined, + **kwds, + ): + super().__init__( + quantile=quantile, groupby=groupby, probs=probs, step=step, **kwds + ) + + +class RegressionTransform(Transform): + """ + RegressionTransform schema wrapper. + + Parameters + ---------- + on : str, :class:`FieldName` + The data field of the independent variable to use a predictor. + regression : str, :class:`FieldName` + The data field of the dependent variable to predict. + extent : Sequence[float] + A [min, max] domain over the independent (x) field for the starting and ending + points of the generated trend line. + groupby : Sequence[str, :class:`FieldName`] + The data fields to group by. If not specified, a single group containing all data + objects will be used. + method : Literal['linear', 'log', 'exp', 'pow', 'quad', 'poly'] + The functional form of the regression model. One of ``"linear"``, ``"log"``, + ``"exp"``, ``"pow"``, ``"quad"``, or ``"poly"``. + + **Default value:** ``"linear"`` + order : float + The polynomial order (number of coefficients) for the 'poly' method. + + **Default value:** ``3`` + params : bool + A boolean flag indicating if the transform should return the regression model + parameters (one object per group), rather than trend line points. The resulting + objects include a ``coef`` array of fitted coefficient values (starting with the + intercept term and then including terms of increasing order) and an ``rSquared`` + value (indicating the total variance explained by the model). + + **Default value:** ``false`` + as : Sequence[str, :class:`FieldName`] + The output field names for the smoothed points generated by the regression + transform. + + **Default value:** The field names of the input x and y values. + """ + + _schema = {"$ref": "#/definitions/RegressionTransform"} + + def __init__( + self, + on: Optional[str | SchemaBase] = Undefined, + regression: Optional[str | SchemaBase] = Undefined, + extent: Optional[Sequence[float]] = Undefined, + groupby: Optional[Sequence[str | SchemaBase]] = Undefined, + method: Optional[ + Literal["linear", "log", "exp", "pow", "quad", "poly"] + ] = Undefined, + order: Optional[float] = Undefined, + params: Optional[bool] = Undefined, + **kwds, + ): + super().__init__( + on=on, + regression=regression, + extent=extent, + groupby=groupby, + method=method, + order=order, + params=params, + **kwds, + ) + + +class SampleTransform(Transform): + """ + SampleTransform schema wrapper. + + Parameters + ---------- + sample : float + The maximum number of data objects to include in the sample. + + **Default value:** ``1000`` + """ + + _schema = {"$ref": "#/definitions/SampleTransform"} + + def __init__(self, sample: Optional[float] = Undefined, **kwds): + super().__init__(sample=sample, **kwds) + + +class StackTransform(Transform): + """ + StackTransform schema wrapper. + + Parameters + ---------- + groupby : Sequence[str, :class:`FieldName`] + The data fields to group by. + stack : str, :class:`FieldName` + The field which is stacked. + offset : Literal['zero', 'center', 'normalize'] + Mode for stacking marks. One of ``"zero"`` (default), ``"center"``, or + ``"normalize"``. The ``"zero"`` offset will stack starting at ``0``. The + ``"center"`` offset will center the stacks. The ``"normalize"`` offset will compute + percentage values for each stack point, with output values in the range ``[0,1]``. + + **Default value:** ``"zero"`` + sort : Sequence[dict, :class:`SortField`] + Field that determines the order of leaves in the stacked charts. + as : str, :class:`FieldName`, Sequence[str, :class:`FieldName`] + Output field names. This can be either a string or an array of strings with two + elements denoting the name for the fields for stack start and stack end + respectively. If a single string(e.g., ``"val"``) is provided, the end field will be + ``"val_end"``. + """ + + _schema = {"$ref": "#/definitions/StackTransform"} + + def __init__( + self, + groupby: Optional[Sequence[str | SchemaBase]] = Undefined, + stack: Optional[str | SchemaBase] = Undefined, + offset: Optional[StackOffset_T] = Undefined, + sort: Optional[Sequence[SchemaBase | Map]] = Undefined, + **kwds, + ): + super().__init__(groupby=groupby, stack=stack, offset=offset, sort=sort, **kwds) + + +class TimeUnitTransform(Transform): + """ + TimeUnitTransform schema wrapper. + + Parameters + ---------- + field : str, :class:`FieldName` + The data field to apply time unit. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`SingleTimeUnit`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, :class:`TimeUnitTransformParams`, Literal['utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + The timeUnit. + as : str, :class:`FieldName` + The output field to write the timeUnit value. + """ + + _schema = {"$ref": "#/definitions/TimeUnitTransform"} + + def __init__( + self, + field: Optional[str | SchemaBase] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + **kwds, + ): + super().__init__(field=field, timeUnit=timeUnit, **kwds) + + +class Type(VegaLiteSchema): + """ + Type schema wrapper. + + Data type based on level of measurement + """ + + _schema = {"$ref": "#/definitions/Type"} + + def __init__(self, *args): + super().__init__(*args) + + +class TypeForShape(VegaLiteSchema): + """TypeForShape schema wrapper.""" + + _schema = {"$ref": "#/definitions/TypeForShape"} + + def __init__(self, *args): + super().__init__(*args) + + +class TypedFieldDef(VegaLiteSchema): + r""" + TypedFieldDef schema wrapper. + + Definition object for a data field, its type and transformation of an encoding channel. + + Parameters + ---------- + aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb'] + Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``, + ``"min"``, ``"max"``, ``"count"``). + + **Default value:** ``undefined`` (None) + + **See also:** `aggregate `__ + documentation. + bandPosition : float + Relative position on a band of a stacked, binned, time unit, or band scale. For + example, the marks will be positioned at the beginning of the band if set to ``0``, + and at the middle of the band if set to ``0.5``. + bin : bool, dict, Literal['binned'], :class:`BinParams`, None + A flag for binning a ``quantitative`` field, `an object defining binning parameters + `__, or indicating + that the data for ``x`` or ``y`` channel are binned before they are imported into + Vega-Lite (``"binned"``). + + * If ``true``, default `binning parameters + `__ will be + applied. + + * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are + already binned. You can map the bin-start field to ``x`` (or ``y``) and the + bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar + to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can + also set the axis's `tickMinStep + `__ property. + + **Default value:** ``false`` + + **See also:** `bin `__ + documentation. + field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef` + **Required.** A string defining the name of the field from which to pull a data + value or an object defining iterated values from the `repeat + `__ operator. + + **See also:** `field `__ + documentation. + + **Notes:** 1) Dots (``.``) and brackets (``[`` and ``]``) can be used to access + nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If + field names contain dots or brackets but are not nested, you can use ``\\`` to + escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details + about escaping in the `field documentation + `__. 2) ``field`` is not required + if ``aggregate`` is ``count``. + timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'] + Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal + field. or `a temporal field that gets casted as ordinal + `__. + + **Default value:** ``undefined`` (None) + + **See also:** `timeUnit `__ + documentation. + title : str, :class:`Text`, Sequence[str], None + A title for the field. If ``null``, the title will be removed. + + **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. + + **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. + type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal'] + The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or + ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a + ``"geojson"`` type for encoding `'geoshape' + `__. + + Vega-Lite automatically infers data types in many cases as discussed below. However, + type is required for a field if: (1) the field is not nominal and the field encoding + has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale + type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal + scale for a field with ``bin`` or ``timeUnit``. + + **Default value:** + + 1) For a data ``field``, ``"nominal"`` is the default data type unless the field + encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or + ``timeUnit`` that satisfies the following criteria: + + * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin`` + or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is + ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a + quantitative scale `__. + * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit`` + or (2) the specified scale type is a time or utc scale + * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort + order + `__, + (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding + channel is ``order``. + + 2) For a constant value in data domain (``datum``): + + * ``"quantitative"`` if the datum is a number + * ``"nominal"`` if the datum is a string + * ``"temporal"`` if the datum is `a date time object + `__ + + **Note:** + + * Data ``type`` describes the semantics of the data rather than the primitive data + types (number, string, etc.). The same primitive data type can have different + types of measurement. For example, numeric data can represent quantitative, + ordinal, or nominal data. + * Data values for a temporal field can be either a date-time string (e.g., + ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a + timestamp number (e.g., ``1552199579097``). + * When using with `bin `__, the + ``type`` property can be either ``"quantitative"`` (for using a linear bin scale) + or `"ordinal" (for using an ordinal bin scale) + `__. + * When using with `timeUnit + `__, the ``type`` property + can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal" + (for using an ordinal scale) + `__. + * When using with `aggregate + `__, the ``type`` property + refers to the post-aggregation data type. For example, we can calculate count + ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct", + "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``. + * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have + ``type`` as they must have exactly the same type as their primary channels (e.g., + ``x``, ``y``). + + **See also:** `type `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/TypedFieldDef"} + + def __init__( + self, + aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined, + bandPosition: Optional[float] = Undefined, + bin: Optional[bool | SchemaBase | Literal["binned"] | Map | None] = Undefined, + field: Optional[str | SchemaBase | Map] = Undefined, + timeUnit: Optional[ + SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T + ] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined, + type: Optional[SchemaBase | StandardType_T] = Undefined, + **kwds, + ): + super().__init__( + aggregate=aggregate, + bandPosition=bandPosition, + bin=bin, + field=field, + timeUnit=timeUnit, + title=title, + type=type, + **kwds, + ) + + +class URI(VegaLiteSchema): + """URI schema wrapper.""" + + _schema = {"$ref": "#/definitions/URI"} + + def __init__(self, *args): + super().__init__(*args) + + +class UnitSpec(VegaLiteSchema): + """ + UnitSpec schema wrapper. + + Base interface for a unit (single-view) specification. + + Parameters + ---------- + mark : dict, :class:`Mark`, :class:`AnyMark`, :class:`BoxPlot`, :class:`MarkDef`, :class:`ErrorBar`, :class:`ErrorBand`, :class:`BoxPlotDef`, :class:`ErrorBarDef`, :class:`ErrorBandDef`, :class:`CompositeMark`, :class:`CompositeMarkDef`, Literal['arc', 'area', 'bar', 'image', 'line', 'point', 'rect', 'rule', 'text', 'tick', 'trail', 'circle', 'square', 'geoshape', 'boxplot', 'errorband', 'errorbar'] + A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``, + ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and + ``"text"``) or a `mark definition object + `__. + data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None + An object describing the data source. Set to ``null`` to ignore the parent's data + source. If no data is set, it is derived from the parent. + description : str + Description of this mark for commenting purpose. + encoding : dict, :class:`Encoding` + A key-value mapping between encoding channels and definition of fields. + name : str + Name of the visualization for later reference. + params : Sequence[dict, :class:`SelectionParameter`] + An array of parameters that may either be simple variables, or more complex + selections that map user input to data queries. + projection : dict, :class:`Projection` + An object defining properties of geographic projection, which will be applied to + ``shape`` path for ``"geoshape"`` marks and to ``latitude`` and ``"longitude"`` + channels for other marks. + title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams` + Title for the plot. + transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`] + An array of data transformations such as filter and new field calculation. + """ + + _schema = {"$ref": "#/definitions/UnitSpec"} + + def __init__( + self, + mark: Optional[SchemaBase | Map | Mark_T | CompositeMark_T] = Undefined, + data: Optional[SchemaBase | Map | None] = Undefined, + description: Optional[str] = Undefined, + encoding: Optional[SchemaBase | Map] = Undefined, + name: Optional[str] = Undefined, + params: Optional[Sequence[SchemaBase | Map]] = Undefined, + projection: Optional[SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + transform: Optional[Sequence[SchemaBase | Map]] = Undefined, + **kwds, + ): + super().__init__( + mark=mark, + data=data, + description=description, + encoding=encoding, + name=name, + params=params, + projection=projection, + title=title, + transform=transform, + **kwds, + ) + + +class UnitSpecWithFrame(VegaLiteSchema): + """ + UnitSpecWithFrame schema wrapper. + + Parameters + ---------- + mark : dict, :class:`Mark`, :class:`AnyMark`, :class:`BoxPlot`, :class:`MarkDef`, :class:`ErrorBar`, :class:`ErrorBand`, :class:`BoxPlotDef`, :class:`ErrorBarDef`, :class:`ErrorBandDef`, :class:`CompositeMark`, :class:`CompositeMarkDef`, Literal['arc', 'area', 'bar', 'image', 'line', 'point', 'rect', 'rule', 'text', 'tick', 'trail', 'circle', 'square', 'geoshape', 'boxplot', 'errorband', 'errorbar'] + A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``, + ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and + ``"text"``) or a `mark definition object + `__. + data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None + An object describing the data source. Set to ``null`` to ignore the parent's data + source. If no data is set, it is derived from the parent. + description : str + Description of this mark for commenting purpose. + encoding : dict, :class:`Encoding` + A key-value mapping between encoding channels and definition of fields. + height : dict, float, :class:`Step`, Literal['container'] + The height of a visualization. + + * For a plot with a continuous y-field, height should be a number. + * For a plot with either a discrete y-field or no y-field, height can be either a + number indicating a fixed height or an object in the form of ``{step: number}`` + defining the height per discrete step. (No y-field is equivalent to having one + discrete step.) + * To enable responsive sizing on height, it should be set to ``"container"``. + + **Default value:** Based on ``config.view.continuousHeight`` for a plot with a + continuous y-field and ``config.view.discreteHeight`` otherwise. + + **Note:** For plots with `row and column channels + `__, this represents the + height of a single view and the ``"container"`` option cannot be used. + + **See also:** `height `__ + documentation. + name : str + Name of the visualization for later reference. + params : Sequence[dict, :class:`SelectionParameter`] + An array of parameters that may either be simple variables, or more complex + selections that map user input to data queries. + projection : dict, :class:`Projection` + An object defining properties of geographic projection, which will be applied to + ``shape`` path for ``"geoshape"`` marks and to ``latitude`` and ``"longitude"`` + channels for other marks. + title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams` + Title for the plot. + transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`] + An array of data transformations such as filter and new field calculation. + view : dict, :class:`ViewBackground` + An object defining the view background's fill and stroke. + + **Default value:** none (transparent) + width : dict, float, :class:`Step`, Literal['container'] + The width of a visualization. + + * For a plot with a continuous x-field, width should be a number. + * For a plot with either a discrete x-field or no x-field, width can be either a + number indicating a fixed width or an object in the form of ``{step: number}`` + defining the width per discrete step. (No x-field is equivalent to having one + discrete step.) + * To enable responsive sizing on width, it should be set to ``"container"``. + + **Default value:** Based on ``config.view.continuousWidth`` for a plot with a + continuous x-field and ``config.view.discreteWidth`` otherwise. + + **Note:** For plots with `row and column channels + `__, this represents the + width of a single view and the ``"container"`` option cannot be used. + + **See also:** `width `__ + documentation. + """ + + _schema = {"$ref": "#/definitions/UnitSpecWithFrame"} + + def __init__( + self, + mark: Optional[SchemaBase | Map | Mark_T | CompositeMark_T] = Undefined, + data: Optional[SchemaBase | Map | None] = Undefined, + description: Optional[str] = Undefined, + encoding: Optional[SchemaBase | Map] = Undefined, + height: Optional[float | SchemaBase | Literal["container"] | Map] = Undefined, + name: Optional[str] = Undefined, + params: Optional[Sequence[SchemaBase | Map]] = Undefined, + projection: Optional[SchemaBase | Map] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + transform: Optional[Sequence[SchemaBase | Map]] = Undefined, + view: Optional[SchemaBase | Map] = Undefined, + width: Optional[float | SchemaBase | Literal["container"] | Map] = Undefined, + **kwds, + ): + super().__init__( + mark=mark, + data=data, + description=description, + encoding=encoding, + height=height, + name=name, + params=params, + projection=projection, + title=title, + transform=transform, + view=view, + width=width, + **kwds, + ) + + +class UrlData(DataSource): + """ + UrlData schema wrapper. + + Parameters + ---------- + url : str + An URL from which to load the data set. Use the ``format.type`` property to ensure + the loaded data is correctly parsed. + format : dict, :class:`DataFormat`, :class:`CsvDataFormat`, :class:`DsvDataFormat`, :class:`JsonDataFormat`, :class:`TopoDataFormat` + An object that specifies the format for parsing the data. + name : str + Provide a placeholder name and bind data at runtime. + """ + + _schema = {"$ref": "#/definitions/UrlData"} + + def __init__( + self, + url: Optional[str] = Undefined, + format: Optional[SchemaBase | Map] = Undefined, + name: Optional[str] = Undefined, + **kwds, + ): + super().__init__(url=url, format=format, name=name, **kwds) + + +class UtcMultiTimeUnit(MultiTimeUnit): + """UtcMultiTimeUnit schema wrapper.""" + + _schema = {"$ref": "#/definitions/UtcMultiTimeUnit"} + + def __init__(self, *args): + super().__init__(*args) + + +class UtcSingleTimeUnit(SingleTimeUnit): + """UtcSingleTimeUnit schema wrapper.""" + + _schema = {"$ref": "#/definitions/UtcSingleTimeUnit"} + + def __init__(self, *args): + super().__init__(*args) + + +class VConcatSpecGenericSpec(Spec, NonNormalizedSpec): + """ + VConcatSpecGenericSpec schema wrapper. + + Base interface for a vertical concatenation specification. + + Parameters + ---------- + vconcat : Sequence[dict, :class:`Spec`, :class:`FacetSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetedUnitSpec`, :class:`LayerRepeatSpec`, :class:`NonLayerRepeatSpec`, :class:`ConcatSpecGenericSpec`, :class:`HConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec`] + A list of views to be concatenated and put into a column. + bounds : Literal['full', 'flush'] + The bounds calculation method to use for determining the extent of a sub-plot. One + of ``full`` (the default) or ``flush``. + + * If set to ``full``, the entire calculated bounds (including axes, title, and + legend) will be used. + * If set to ``flush``, only the specified width and height values for the sub-view + will be used. The ``flush`` setting can be useful when attempting to place + sub-plots without axes or legends into a uniform grid structure. + + **Default value:** ``"full"`` + center : bool + Boolean flag indicating if subviews should be centered relative to their respective + rows or columns. + + **Default value:** ``false`` + data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None + An object describing the data source. Set to ``null`` to ignore the parent's data + source. If no data is set, it is derived from the parent. + description : str + Description of this mark for commenting purpose. + name : str + Name of the visualization for later reference. + resolve : dict, :class:`Resolve` + Scale, axis, and legend resolutions for view composition specifications. + spacing : float + The spacing in pixels between sub-views of the concat operator. + + **Default value**: ``10`` + title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams` + Title for the plot. + transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`] + An array of data transformations such as filter and new field calculation. + """ + + _schema = {"$ref": "#/definitions/VConcatSpec"} + + def __init__( + self, + vconcat: Optional[Sequence[SchemaBase | Map]] = Undefined, + bounds: Optional[Literal["full", "flush"]] = Undefined, + center: Optional[bool] = Undefined, + data: Optional[SchemaBase | Map | None] = Undefined, + description: Optional[str] = Undefined, + name: Optional[str] = Undefined, + resolve: Optional[SchemaBase | Map] = Undefined, + spacing: Optional[float] = Undefined, + title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined, + transform: Optional[Sequence[SchemaBase | Map]] = Undefined, + **kwds, + ): + super().__init__( + vconcat=vconcat, + bounds=bounds, + center=center, + data=data, + description=description, + name=name, + resolve=resolve, + spacing=spacing, + title=title, + transform=transform, + **kwds, + ) + + +class ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull( + ColorDef, MarkPropDefGradientstringnull +): + """ + ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : str, dict, :class:`ExprRef`, :class:`Gradient`, :class:`LinearGradient`, :class:`RadialGradient`, None + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _schema = { + "$ref": "#/definitions/ValueDefWithCondition" + } + + def __init__( + self, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + **kwds, + ): + super().__init__(condition=condition, value=value, **kwds) + + +class ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull( + MarkPropDefstringnullTypeForShape, ShapeDef +): + """ + ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, :class:`ConditionalMarkPropFieldOrDatumDefTypeForShape`, :class:`ConditionalParameterMarkPropFieldOrDatumDefTypeForShape`, :class:`ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : str, dict, :class:`ExprRef`, None + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _schema = { + "$ref": "#/definitions/ValueDefWithCondition,(string|null)>" + } + + def __init__( + self, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + **kwds, + ): + super().__init__(condition=condition, value=value, **kwds) + + +class ValueDefWithConditionMarkPropFieldOrDatumDefnumber( + MarkPropDefnumber, NumericMarkPropDef +): + """ + ValueDefWithConditionMarkPropFieldOrDatumDefnumber schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : dict, float, :class:`ExprRef` + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _schema = { + "$ref": "#/definitions/ValueDefWithCondition" + } + + def __init__( + self, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + value: Optional[float | Parameter | SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__(condition=condition, value=value, **kwds) + + +class ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray( + MarkPropDefnumberArray, NumericArrayMarkPropDef +): + """ + ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : dict, Sequence[float], :class:`ExprRef` + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _schema = { + "$ref": "#/definitions/ValueDefWithCondition" + } + + def __init__( + self, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + value: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined, + **kwds, + ): + super().__init__(condition=condition, value=value, **kwds) + + +class ValueDefWithConditionMarkPropFieldOrDatumDefstringnull(VegaLiteSchema): + """ + ValueDefWithConditionMarkPropFieldOrDatumDefstringnull schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : str, dict, :class:`ExprRef`, None + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _schema = { + "$ref": "#/definitions/ValueDefWithCondition" + } + + def __init__( + self, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined, + **kwds, + ): + super().__init__(condition=condition, value=value, **kwds) + + +class ValueDefWithConditionStringFieldDefText(TextDef): + """ + ValueDefWithConditionStringFieldDefText schema wrapper. + + Parameters + ---------- + condition : dict, :class:`ConditionalStringFieldDef`, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterStringFieldDef`, :class:`ConditionalPredicateStringFieldDef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`, Sequence[dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`] + A field definition or one or more value definition(s) with a parameter predicate. + value : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef` + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _schema = {"$ref": "#/definitions/ValueDefWithCondition"} + + def __init__( + self, + condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined, + value: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined, + **kwds, + ): + super().__init__(condition=condition, value=value, **kwds) + + +class ValueDefnumber(OffsetDef): + """ + ValueDefnumber schema wrapper. + + Definition object for a constant value (primitive value or gradient definition) of an + encoding channel. + + Parameters + ---------- + value : float + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _schema = {"$ref": "#/definitions/ValueDef"} + + def __init__(self, value: Optional[float] = Undefined, **kwds): + super().__init__(value=value, **kwds) + + +class ValueDefnumberwidthheightExprRef(VegaLiteSchema): + """ + ValueDefnumberwidthheightExprRef schema wrapper. + + Definition object for a constant value (primitive value or gradient definition) of an + encoding channel. + + Parameters + ---------- + value : dict, float, :class:`ExprRef`, Literal['height', 'width'] + A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient + definition `__ for color, + values between ``0`` to ``1`` for opacity). + """ + + _schema = {"$ref": '#/definitions/ValueDef<(number|"width"|"height"|ExprRef)>'} + + def __init__( + self, + value: Optional[ + float | Parameter | SchemaBase | Literal["height", "width"] | Map + ] = Undefined, + **kwds, + ): + super().__init__(value=value, **kwds) + + +class VariableParameter(TopLevelParameter): + """ + VariableParameter schema wrapper. + + Parameters + ---------- + name : str, :class:`ParameterName` + A unique name for the variable parameter. Parameter names should be valid JavaScript + identifiers: they should contain only alphanumeric characters (or "$", or "_") and + may not start with a digit. Reserved keywords that may not be used as parameter + names are "datum", "event", "item", and "parent". + bind : dict, :class:`Binding`, :class:`BindInput`, :class:`BindRange`, :class:`BindDirect`, :class:`BindCheckbox`, :class:`BindRadioSelect` + Binds the parameter to an external input element such as a slider, selection list or + radio button group. + expr : str, :class:`Expr` + An expression for the value of the parameter. This expression may include other + parameters, in which case the parameter will automatically update in response to + upstream parameter changes. + react : bool + A boolean flag (default ``true``) indicating if the update expression should be + automatically re-evaluated when any upstream signal dependencies update. If + ``false``, the update expression will not register any dependencies on other + signals, even for initialization. + + **Default value:** ``true`` + value : Any + The `initial value `__ of the + parameter. + + **Default value:** ``undefined`` + """ + + _schema = {"$ref": "#/definitions/VariableParameter"} + + def __init__( + self, + name: Optional[str | SchemaBase] = Undefined, + bind: Optional[SchemaBase | Map] = Undefined, + expr: Optional[str | SchemaBase] = Undefined, + react: Optional[bool] = Undefined, + value: Optional[Any] = Undefined, + **kwds, + ): + super().__init__( + name=name, bind=bind, expr=expr, react=react, value=value, **kwds + ) + + +class Vector10string(VegaLiteSchema): + """Vector10string schema wrapper.""" + + _schema = {"$ref": "#/definitions/Vector10"} + + def __init__(self, *args): + super().__init__(*args) + + +class Vector12string(VegaLiteSchema): + """Vector12string schema wrapper.""" + + _schema = {"$ref": "#/definitions/Vector12"} + + def __init__(self, *args): + super().__init__(*args) + + +class Vector2DateTime(SelectionInitInterval): + """Vector2DateTime schema wrapper.""" + + _schema = {"$ref": "#/definitions/Vector2"} + + def __init__(self, *args): + super().__init__(*args) + + +class Vector2Vector2number(VegaLiteSchema): + """Vector2Vector2number schema wrapper.""" + + _schema = {"$ref": "#/definitions/Vector2>"} + + def __init__(self, *args): + super().__init__(*args) + + +class Vector2boolean(SelectionInitInterval): + """Vector2boolean schema wrapper.""" + + _schema = {"$ref": "#/definitions/Vector2"} + + def __init__(self, *args): + super().__init__(*args) + + +class Vector2number(SelectionInitInterval): + """Vector2number schema wrapper.""" + + _schema = {"$ref": "#/definitions/Vector2"} + + def __init__(self, *args): + super().__init__(*args) + + +class Vector2string(SelectionInitInterval): + """Vector2string schema wrapper.""" + + _schema = {"$ref": "#/definitions/Vector2"} + + def __init__(self, *args): + super().__init__(*args) + + +class Vector3number(VegaLiteSchema): + """Vector3number schema wrapper.""" + + _schema = {"$ref": "#/definitions/Vector3"} + + def __init__(self, *args): + super().__init__(*args) + + +class Vector7string(VegaLiteSchema): + """Vector7string schema wrapper.""" + + _schema = {"$ref": "#/definitions/Vector7"} + + def __init__(self, *args): + super().__init__(*args) + + +class ViewBackground(VegaLiteSchema): + """ + ViewBackground schema wrapper. + + Parameters + ---------- + cornerRadius : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles or arcs' corners. + + **Default value:** ``0`` + cursor : :class:`Cursor`, Literal['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', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing'] + The mouse cursor used over the view. Any valid `CSS cursor type + `__ can be used. + fill : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + The fill color. + + **Default value:** ``undefined`` + fillOpacity : dict, float, :class:`ExprRef` + The fill opacity (value between [0,1]). + + **Default value:** ``1`` + opacity : dict, float, :class:`ExprRef` + The overall opacity (value between [0,1]). + + **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, + ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. + stroke : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + The stroke color. + + **Default value:** ``"#ddd"`` + strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square'] + The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or + ``"square"``. + + **Default value:** ``"butt"`` + strokeDash : dict, Sequence[float], :class:`ExprRef` + An array of alternating stroke, space lengths for creating dashed or dotted lines. + strokeDashOffset : dict, float, :class:`ExprRef` + The offset (in pixels) into which to begin drawing with the stroke dash array. + strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel'] + The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. + + **Default value:** ``"miter"`` + strokeMiterLimit : dict, float, :class:`ExprRef` + The miter limit at which to bevel a line join. + strokeOpacity : dict, float, :class:`ExprRef` + The stroke opacity (value between [0,1]). + + **Default value:** ``1`` + strokeWidth : dict, float, :class:`ExprRef` + The stroke width, in pixels. + style : str, Sequence[str] + A string or array of strings indicating the name of custom styles to apply to the + view background. 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. + + **Default value:** ``"cell"`` **Note:** Any specified view background properties + will augment the default style. + """ + + _schema = {"$ref": "#/definitions/ViewBackground"} + + def __init__( + self, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cursor: Optional[SchemaBase | Cursor_T] = Undefined, + fill: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + stroke: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + strokeDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined, + strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + style: Optional[str | Sequence[str]] = Undefined, + **kwds, + ): + super().__init__( + cornerRadius=cornerRadius, + cursor=cursor, + fill=fill, + fillOpacity=fillOpacity, + opacity=opacity, + stroke=stroke, + strokeCap=strokeCap, + strokeDash=strokeDash, + strokeDashOffset=strokeDashOffset, + strokeJoin=strokeJoin, + strokeMiterLimit=strokeMiterLimit, + strokeOpacity=strokeOpacity, + strokeWidth=strokeWidth, + style=style, + **kwds, + ) + + +class ViewConfig(VegaLiteSchema): + """ + ViewConfig schema wrapper. + + Parameters + ---------- + clip : bool + Whether the view should be clipped. + continuousHeight : float + The default height when the plot has a continuous y-field for x or latitude, or has + arc marks. + + **Default value:** ``200`` + continuousWidth : float + The default width when the plot has a continuous field for x or longitude, or has + arc marks. + + **Default value:** ``200`` + cornerRadius : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles or arcs' corners. + + **Default value:** ``0`` + cursor : :class:`Cursor`, Literal['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', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing'] + The mouse cursor used over the view. Any valid `CSS cursor type + `__ can be used. + discreteHeight : dict, float + The default height when the plot has non arc marks and either a discrete y-field or + no y-field. The height can be either a number indicating a fixed height or an object + in the form of ``{step: number}`` defining the height per discrete step. + + **Default value:** a step size based on ``config.view.step``. + discreteWidth : dict, float + The default width when the plot has non-arc marks and either a discrete x-field or + no x-field. The width can be either a number indicating a fixed width or an object + in the form of ``{step: number}`` defining the width per discrete step. + + **Default value:** a step size based on ``config.view.step``. + fill : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + The fill color. + + **Default value:** ``undefined`` + fillOpacity : dict, float, :class:`ExprRef` + The fill opacity (value between [0,1]). + + **Default value:** ``1`` + opacity : dict, float, :class:`ExprRef` + The overall opacity (value between [0,1]). + + **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, + ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. + step : float + Default step size for x-/y- discrete fields. + stroke : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + The stroke color. + + **Default value:** ``"#ddd"`` + strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square'] + The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or + ``"square"``. + + **Default value:** ``"butt"`` + strokeDash : dict, Sequence[float], :class:`ExprRef` + An array of alternating stroke, space lengths for creating dashed or dotted lines. + strokeDashOffset : dict, float, :class:`ExprRef` + The offset (in pixels) into which to begin drawing with the stroke dash array. + strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel'] + The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. + + **Default value:** ``"miter"`` + strokeMiterLimit : dict, float, :class:`ExprRef` + The miter limit at which to bevel a line join. + strokeOpacity : dict, float, :class:`ExprRef` + The stroke opacity (value between [0,1]). + + **Default value:** ``1`` + strokeWidth : dict, float, :class:`ExprRef` + The stroke width, in pixels. + """ + + _schema = {"$ref": "#/definitions/ViewConfig"} + + def __init__( + self, + clip: Optional[bool] = Undefined, + continuousHeight: Optional[float] = Undefined, + continuousWidth: Optional[float] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cursor: Optional[SchemaBase | Cursor_T] = Undefined, + discreteHeight: Optional[float | Map] = Undefined, + discreteWidth: Optional[float | Map] = Undefined, + fill: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + step: Optional[float] = Undefined, + stroke: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + strokeDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined, + strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + clip=clip, + continuousHeight=continuousHeight, + continuousWidth=continuousWidth, + cornerRadius=cornerRadius, + cursor=cursor, + discreteHeight=discreteHeight, + discreteWidth=discreteWidth, + fill=fill, + fillOpacity=fillOpacity, + opacity=opacity, + step=step, + stroke=stroke, + strokeCap=strokeCap, + strokeDash=strokeDash, + strokeDashOffset=strokeDashOffset, + strokeJoin=strokeJoin, + strokeMiterLimit=strokeMiterLimit, + strokeOpacity=strokeOpacity, + strokeWidth=strokeWidth, + **kwds, + ) + + +class WindowEventType(VegaLiteSchema): + """WindowEventType schema wrapper.""" + + _schema = {"$ref": "#/definitions/WindowEventType"} + + def __init__(self, *args, **kwds): + super().__init__(*args, **kwds) + + +class EventType(WindowEventType): + """EventType schema wrapper.""" + + _schema = {"$ref": "#/definitions/EventType"} + + def __init__(self, *args): + super().__init__(*args) + + +class WindowFieldDef(VegaLiteSchema): + """ + WindowFieldDef schema wrapper. + + Parameters + ---------- + op : :class:`AggregateOp`, :class:`WindowOnlyOp`, Literal['argmax', 'argmin', 'average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb', 'row_number', 'rank', 'dense_rank', 'percent_rank', 'cume_dist', 'ntile', 'lag', 'lead', 'first_value', 'last_value', 'nth_value'] + The window or aggregation operation to apply within a window (e.g., ``"rank"``, + ``"lead"``, ``"sum"``, ``"average"`` or ``"count"``). See the list of all supported + operations `here `__. + field : str, :class:`FieldName` + The data field for which to compute the aggregate or window function. This can be + omitted for window functions that do not operate over a field such as ``"count"``, + ``"rank"``, ``"dense_rank"``. + param : float + Parameter values for the window functions. Parameter values can be omitted for + operations that do not accept a parameter. + + See the list of all supported operations and their parameters `here + `__. + as : str, :class:`FieldName` + The output name for the window operation. + """ + + _schema = {"$ref": "#/definitions/WindowFieldDef"} + + def __init__( + self, + op: Optional[SchemaBase | AggregateOp_T | WindowOnlyOp_T] = Undefined, + field: Optional[str | SchemaBase] = Undefined, + param: Optional[float] = Undefined, + **kwds, + ): + super().__init__(op=op, field=field, param=param, **kwds) + + +class WindowOnlyOp(VegaLiteSchema): + """WindowOnlyOp schema wrapper.""" + + _schema = {"$ref": "#/definitions/WindowOnlyOp"} + + def __init__(self, *args): + super().__init__(*args) + + +class WindowTransform(Transform): + """ + WindowTransform schema wrapper. + + Parameters + ---------- + window : Sequence[dict, :class:`WindowFieldDef`] + The definition of the fields in the window, and what calculations to use. + frame : Sequence[float, None] + A frame specification as a two-element array indicating how the sliding window + should proceed. The array entries should either be a number indicating the offset + from the current data object, or null to indicate unbounded rows preceding or + following the current data object. The default value is ``[null, 0]``, indicating + that the sliding window includes the current object and all preceding objects. The + value ``[-5, 5]`` indicates that the window should include five objects preceding + and five objects following the current object. Finally, ``[null, null]`` indicates + that the window frame should always include all data objects. If you this frame and + want to assign the same value to add objects, you can use the simpler `join + aggregate transform `__. + The only operators affected are the aggregation operations and the ``first_value``, + ``last_value``, and ``nth_value`` window operations. The other window operations are + not affected by this. + + **Default value:**: ``[null, 0]`` (includes the current object and all preceding + objects) + groupby : Sequence[str, :class:`FieldName`] + The data fields for partitioning the data objects into separate windows. If + unspecified, all data points will be in a single window. + ignorePeers : bool + Indicates if the sliding window frame should ignore peer values (data that are + considered identical by the sort criteria). The default is false, causing the window + frame to expand to include all peer values. If set to true, the window frame 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 : Sequence[dict, :class:`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 + ignorePeers parameter is ignored and treated as if set to ``true``). + """ + + _schema = {"$ref": "#/definitions/WindowTransform"} + + def __init__( + self, + window: Optional[Sequence[SchemaBase | Map]] = Undefined, + frame: Optional[Sequence[float | None]] = Undefined, + groupby: Optional[Sequence[str | SchemaBase]] = Undefined, + ignorePeers: Optional[bool] = Undefined, + sort: Optional[Sequence[SchemaBase | Map]] = Undefined, + **kwds, + ): + super().__init__( + window=window, + frame=frame, + groupby=groupby, + ignorePeers=ignorePeers, + sort=sort, + **kwds, + ) diff --git a/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/mixins.py b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/mixins.py new file mode 100644 index 0000000000000000000000000000000000000000..f156a2aae311fbc8aa461c38c80851066179d856 --- /dev/null +++ b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/mixins.py @@ -0,0 +1,1600 @@ +# The contents of this file are automatically written by +# tools/generate_schema_wrapper.py. Do not modify directly. + +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Literal + +from altair.utils import SchemaBase, Undefined, use_signature + +from . import core + +if TYPE_CHECKING: + from collections.abc import Sequence + +if TYPE_CHECKING: + # ruff: noqa: F405 + import sys + + if sys.version_info >= (3, 11): + from typing import Self + else: + from typing_extensions import Self + from altair import Parameter + from altair.typing import Optional + + from ._typing import * # noqa: F403 + + +class _MarkDef(SchemaBase): + """ + MarkDef schema wrapper. + + Parameters + ---------- + align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right'] + The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). + One of ``"left"``, ``"right"``, ``"center"``. + + **Note:** Expression reference is *not* supported for range marks. + angle : dict, float, :class:`ExprRef` + The rotation angle of the text, in degrees. + aria : bool, dict, :class:`ExprRef` + A boolean flag indicating if `ARIA attributes + `__ should be + included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on + the output SVG element, removing the mark item from the ARIA accessibility tree. + ariaRole : str, dict, :class:`ExprRef` + Sets the type of user interface element of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "role" attribute. Warning: this + property is experimental and may be changed in the future. + ariaRoleDescription : str, dict, :class:`ExprRef` + A human-readable, author-localized description for the role of the mark item for + `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the "aria-roledescription" attribute. + Warning: this property is experimental and may be changed in the future. + aspect : bool, dict, :class:`ExprRef` + Whether to keep aspect ratio of image marks. + bandSize : float + The width of the ticks. + + **Default value:** 3/4 of step (width step for horizontal ticks and height step for + vertical ticks). + baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom'] + For text marks, the vertical text baseline. One of ``"alphabetic"`` (default), + ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an + expression reference that provides one of the valid values. The ``"line-top"`` and + ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are + calculated relative to the ``lineHeight`` rather than ``fontSize`` alone. + + For range marks, the vertical alignment of the marks. One of ``"top"``, + ``"middle"``, ``"bottom"``. + + **Note:** Expression reference is *not* supported for range marks. + binSpacing : float + Offset between bars for binned field. The ideal value for this is either 0 + (preferred by statisticians) or 1 (Vega-Lite default, D3 example style). + + **Default value:** ``1`` + blend : dict, :class:`Blend`, :class:`ExprRef`, Literal[None, 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'] + The color blend mode for drawing an item on its current background. Any valid `CSS + mix-blend-mode `__ + value can be used. + + __Default value:__ ``"source-over"`` + clip : bool, dict, :class:`ExprRef` + Whether a mark be clipped to the enclosing group's width and height. + color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + continuousBandSize : float + The default size of the bars on continuous scales. + + **Default value:** ``5`` + cornerRadius : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles or arcs' corners. + + **Default value:** ``0`` + cornerRadiusBottomLeft : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' bottom left corner. + + **Default value:** ``0`` + cornerRadiusBottomRight : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' bottom right corner. + + **Default value:** ``0`` + cornerRadiusEnd : dict, float, :class:`ExprRef` + * For vertical bars, top-left and top-right corner radius. + + * For horizontal bars, top-right and bottom-right corner radius. + cornerRadiusTopLeft : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' top right corner. + + **Default value:** ``0`` + cornerRadiusTopRight : dict, float, :class:`ExprRef` + The radius in pixels of rounded rectangles' top left corner. + + **Default value:** ``0`` + cursor : dict, :class:`Cursor`, :class:`ExprRef`, Literal['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', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing'] + The mouse cursor used over the mark. Any valid `CSS cursor type + `__ can be used. + description : str, dict, :class:`ExprRef` + A text description of the mark item for `ARIA accessibility + `__ (SVG output + only). If specified, this property determines the `"aria-label" attribute + `__. + dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl'] + The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"`` + (right-to-left). This property determines on which side is truncated in response to + the limit parameter. + + **Default value:** ``"ltr"`` + discreteBandSize : dict, float, :class:`RelativeBandSize` + The default size of the bars with discrete dimensions. If unspecified, the default + size is ``step-2``, which provides 2 pixel offset between bars. + dx : dict, float, :class:`ExprRef` + The horizontal offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + dy : dict, float, :class:`ExprRef` + The vertical offset, in pixels, between the text label and its anchor point. The + offset is applied after rotation by the *angle* property. + ellipsis : str, dict, :class:`ExprRef` + The ellipsis string for text truncated in response to the limit parameter. + + **Default value:** ``"…"`` + fill : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default fill color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove fill. + + **Default value:** (None) + fillOpacity : dict, float, :class:`ExprRef` + The fill opacity (value between [0,1]). + + **Default value:** ``1`` + filled : bool + Whether the mark's color should be used as fill color instead of stroke color. + + **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well + as ``geoshape`` marks for `graticule + `__ data sources; + otherwise, ``true``. + + **Note:** This property cannot be used in a `style config + `__. + font : str, dict, :class:`ExprRef` + The typeface to set the text in (e.g., ``"Helvetica Neue"``). + fontSize : dict, float, :class:`ExprRef` + The font size, in pixels. + + **Default value:** ``11`` + fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle` + The font style (e.g., ``"italic"``). + fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900] + The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a + number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and + ``"bold"`` = ``700``). + height : dict, float, :class:`ExprRef`, :class:`RelativeBandSize` + Height of the marks. One of: + + * A number representing a fixed pixel height. + + * A relative band size definition. For example, ``{band: 0.5}`` represents half of + the band + href : str, dict, :class:`URI`, :class:`ExprRef` + A URL to load upon mouse click. If defined, the mark acts as a hyperlink. + innerRadius : dict, float, :class:`ExprRef` + The inner radius in pixels of arc marks. ``innerRadius`` is an alias for + ``radius2``. + + **Default value:** ``0`` + interpolate : dict, :class:`ExprRef`, :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after'] + The line interpolation method to use for line and area marks. One of the following: + + * ``"linear"``: piecewise linear segments, as in a polyline. + * ``"linear-closed"``: close the linear segments to form a polygon. + * ``"step"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"step-before"``: alternate between vertical and horizontal segments, as in a + step function. + * ``"step-after"``: alternate between horizontal and vertical segments, as in a step + function. + * ``"basis"``: a B-spline, with control point duplication on the ends. + * ``"basis-open"``: an open B-spline; may not intersect the start or end. + * ``"basis-closed"``: a closed B-spline, as in a loop. + * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends. + * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end, + but will intersect other control points. + * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop. + * ``"bundle"``: equivalent to basis, except the tension parameter is used to + straighten the spline. + * ``"monotone"``: cubic interpolation that preserves monotonicity in y. + invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None + Invalid data mode, which defines how the marks and corresponding scales should + represent invalid values (``null`` and ``NaN`` in continuous scales *without* + defined output for invalid values). + + * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and + *scales*. For path marks (for line, area, trail), this option will create paths + that connect valid points, as if the data rows with invalid values do not exist. + + * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at + invalid values. For non-path marks, this is equivalent to ``"filter"``. All + *scale* domains will *exclude* these filtered data points. + + * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid + values. Hide invalid values for non-path marks. All *scale* domains will + *include* these filtered data points (for both path and non-path marks). + + * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each + scale will use the output for invalid values defined in ``config.scale.invalid`` + or, if unspecified, by default invalid values will produce the same visual values + as zero (if the scale includes zero) or the minimum value (if the scale does not + include zero). + + * ``"break-paths-show-path-domains"`` (default) — This is equivalent to + ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and + ``"filter"`` for non-path marks. + + **Note**: If any channel's scale has an output for invalid values defined in + ``config.scale.invalid``, all values for the scales will be considered "valid" since + they can produce a reasonable output for the scales. Thus, fields for such channels + will not be filtered and will not cause path breaks. + limit : dict, float, :class:`ExprRef` + The maximum length of the text mark in pixels. The text value will be automatically + truncated if the rendered size exceeds the limit. + + **Default value:** ``0`` -- indicating no limit + line : bool, dict, :class:`OverlayMarkDef` + A flag for overlaying line on top of area marks, or an object defining the + properties of the overlayed lines. + + * If this value is an empty object (``{}``) or ``true``, lines with default + properties will be used. + + * If this value is ``false``, no lines would be automatically added to area marks. + + **Default value:** ``false``. + lineBreak : str, dict, :class:`ExprRef` + A delimiter, such as a newline character, upon which to break text strings into + multiple lines. This property is ignored if the text is array-valued. + lineHeight : dict, float, :class:`ExprRef` + The line height in pixels (the spacing between subsequent lines of text) for + multi-line text marks. + minBandSize : dict, float, :class:`ExprRef` + The minimum band size for bar and rectangle marks. **Default value:** ``0.25`` + opacity : dict, float, :class:`ExprRef` + The overall opacity (value between [0,1]). + + **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``, + ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise. + order : bool, None + For line and trail marks, this ``order`` property can be set to ``null`` or + ``false`` to make the lines use the original order in the data sources. + orient : :class:`Orientation`, Literal['horizontal', 'vertical'] + The orientation of a non-stacked bar, tick, area, and line charts. The value is + either horizontal (default) or vertical. + + * For bar, rule and tick, this determines whether the size of the bar and tick + should be applied to x or y dimension. + * For area, this property determines the orient property of the Vega output. + * For line and trail marks, this property determines the sort order of the points in + the line if ``config.sortLineBy`` is not specified. For stacked charts, this is + always determined by the orientation of the stack; therefore explicitly specified + value will be ignored. + outerRadius : dict, float, :class:`ExprRef` + The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``. + + **Default value:** ``0`` + padAngle : dict, float, :class:`ExprRef` + The angular padding applied to sides of the arc, in radians. + point : bool, dict, Literal['transparent'], :class:`OverlayMarkDef` + A flag for overlaying points on top of line or area marks, or an object defining the + properties of the overlayed points. + + * If this property is ``"transparent"``, transparent points will be used (for + enhancing tooltips and selections). + + * If this property is an empty object (``{}``) or ``true``, filled points with + default properties will be used. + + * If this property is ``false``, no points would be automatically added to line or + area marks. + + **Default value:** ``false``. + radius : dict, float, :class:`ExprRef` + For arc mark, the primary (outer) radius in pixels. + + For text marks, polar coordinate radial offset, in pixels, of the text from the + origin determined by the ``x`` and ``y`` properties. + + **Default value:** ``min(plot_width, plot_height)/2`` + radius2 : dict, float, :class:`ExprRef` + The secondary (inner) radius in pixels of arc marks. + + **Default value:** ``0`` + radius2Offset : dict, float, :class:`ExprRef` + Offset for radius2. + radiusOffset : dict, float, :class:`ExprRef` + Offset for radius. + shape : str, dict, :class:`ExprRef`, :class:`SymbolShape` + Shape of the point marks. Supported values include: + + * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, + ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or + ``"triangle-left"``. + * the line symbol ``"stroke"`` + * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"`` + * a custom `SVG path string + `__ (For correct + sizing, custom shape paths should be defined within a square bounding box with + coordinates ranging from -1 to 1 along both the x and y dimensions.) + + **Default value:** ``"circle"`` + size : dict, float, :class:`ExprRef` + Default size for marks. + + * For ``point``/``circle``/``square``, this represents the pixel area of the marks. + Note that this value sets the area of the symbol; the side lengths will increase + with the square root of this value. + * For ``bar``, this represents the band size of the bar, in pixels. + * For ``text``, this represents the font size, in pixels. + + **Default value:** + + * ``30`` for point, circle, square marks; width/height's ``step`` + * ``2`` for bar marks with discrete dimensions; + * ``5`` for bar marks with continuous dimensions; + * ``11`` for text marks. + smooth : bool, dict, :class:`ExprRef` + A boolean flag (default true) indicating if the image should be smoothed when + resized. If false, individual pixels should be scaled directly rather than + interpolated with smoothing. For SVG rendering, this option may not work in some + browsers due to lack of standardization. + stroke : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None + Default stroke color. This property has higher precedence than ``config.color``. Set + to ``null`` to remove stroke. + + **Default value:** (None) + strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square'] + The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or + ``"square"``. + + **Default value:** ``"butt"`` + strokeDash : dict, Sequence[float], :class:`ExprRef` + An array of alternating stroke, space lengths for creating dashed or dotted lines. + strokeDashOffset : dict, float, :class:`ExprRef` + The offset (in pixels) into which to begin drawing with the stroke dash array. + strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel'] + The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``. + + **Default value:** ``"miter"`` + strokeMiterLimit : dict, float, :class:`ExprRef` + The miter limit at which to bevel a line join. + strokeOffset : dict, float, :class:`ExprRef` + The offset in pixels at which to draw the group stroke and fill. If unspecified, the + default behavior is to dynamically offset stroked groups such that 1 pixel stroke + widths align with the pixel grid. + strokeOpacity : dict, float, :class:`ExprRef` + The stroke opacity (value between [0,1]). + + **Default value:** ``1`` + strokeWidth : dict, float, :class:`ExprRef` + The stroke width, in pixels. + style : str, Sequence[str] + 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 ``config.style.foo`` (the specified style ``"foo"`` has + higher precedence). + tension : dict, float, :class:`ExprRef` + Depending on the interpolation type, sets the tension parameter (for line and area + marks). + text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef` + Placeholder text if the ``text`` channel is not specified + theta : dict, float, :class:`ExprRef` + * For arc marks, the arc length in radians if theta2 is not specified, otherwise the + start arc angle. (A value of 0 indicates up or “north”, increasing values proceed + clockwise.) + + * For text marks, polar coordinate angle in radians. + theta2 : dict, float, :class:`ExprRef` + The end angle of arc marks in radians. A value of 0 indicates up or “north”, + increasing values proceed clockwise. + theta2Offset : dict, float, :class:`ExprRef` + Offset for theta2. + thetaOffset : dict, float, :class:`ExprRef` + Offset for theta. + thickness : float + Thickness of the tick mark. + + **Default value:** ``1`` + timeUnitBandPosition : float + Default relative band position for a time unit. If set to ``0``, the marks will be + positioned at the beginning of the time unit band step. If set to ``0.5``, the marks + will be positioned in the middle of the time unit band step. + timeUnitBandSize : float + Default relative band size for a time unit. If set to ``1``, the bandwidth of the + marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the + marks will be half of the time unit band step. + tooltip : str, bool, dict, float, :class:`ExprRef`, :class:`TooltipContent`, None + The tooltip text string to show upon mouse hover or an object defining which fields + should the tooltip be derived from. + + * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from + ``encoding`` will be used. + * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the + highlighted data point will be used. + * If set to ``null`` or ``false``, then no tooltip will be used. + + See the `tooltip `__ + documentation for a detailed discussion about tooltip in Vega-Lite. + + **Default value:** ``null`` + url : str, dict, :class:`URI`, :class:`ExprRef` + The URL of the image file for image marks. + width : dict, float, :class:`ExprRef`, :class:`RelativeBandSize` + Width of the marks. One of: + + * A number representing a fixed pixel width. + + * A relative band size definition. For example, ``{band: 0.5}`` represents half of + the band. + x : dict, float, :class:`ExprRef`, Literal['width'] + X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without + specified ``x2`` or ``width``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2 : dict, float, :class:`ExprRef`, Literal['width'] + X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"width"`` for the width + of the plot. + x2Offset : dict, float, :class:`ExprRef` + Offset for x2-position. + xOffset : dict, float, :class:`ExprRef` + Offset for x-position. + y : dict, float, :class:`ExprRef`, Literal['height'] + Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without + specified ``y2`` or ``height``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2 : dict, float, :class:`ExprRef`, Literal['height'] + Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and ``"rule"``. + + The ``value`` of this channel can be a number or a string ``"height"`` for the + height of the plot. + y2Offset : dict, float, :class:`ExprRef` + Offset for y2-position. + yOffset : dict, float, :class:`ExprRef` + Offset for y-position. + """ + + _schema = {"$ref": "#/definitions/MarkDef"} + + def __init__( + self, + align: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined, + angle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + ariaRole: Optional[str | Parameter | SchemaBase | Map] = Undefined, + ariaRoleDescription: Optional[str | Parameter | SchemaBase | Map] = Undefined, + aspect: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + bandSize: Optional[float] = Undefined, + baseline: Optional[Parameter | SchemaBase | Map | TextBaseline_T] = Undefined, + binSpacing: Optional[float] = Undefined, + blend: Optional[Parameter | SchemaBase | Map | Blend_T] = Undefined, + clip: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined, + continuousBandSize: Optional[float] = Undefined, + cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadiusBottomLeft: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cornerRadiusBottomRight: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cornerRadiusEnd: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadiusTopLeft: Optional[float | Parameter | SchemaBase | Map] = Undefined, + cornerRadiusTopRight: Optional[ + float | Parameter | SchemaBase | Map + ] = Undefined, + cursor: Optional[Parameter | SchemaBase | Map | Cursor_T] = Undefined, + description: Optional[str | Parameter | SchemaBase | Map] = Undefined, + dir: Optional[Parameter | SchemaBase | Map | TextDirection_T] = Undefined, + discreteBandSize: Optional[float | SchemaBase | Map] = Undefined, + dx: Optional[float | Parameter | SchemaBase | Map] = Undefined, + dy: Optional[float | Parameter | SchemaBase | Map] = Undefined, + ellipsis: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fill: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + filled: Optional[bool] = Undefined, + font: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined, + fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined, + height: Optional[float | Parameter | SchemaBase | Map] = Undefined, + href: Optional[str | Parameter | SchemaBase | Map] = Undefined, + innerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + interpolate: Optional[Parameter | SchemaBase | Map | Interpolate_T] = Undefined, + invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined, + limit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + line: Optional[bool | SchemaBase | Map] = Undefined, + lineBreak: Optional[str | Parameter | SchemaBase | Map] = Undefined, + lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined, + minBandSize: Optional[float | Parameter | SchemaBase | Map] = Undefined, + opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + order: Optional[bool | None] = Undefined, + orient: Optional[SchemaBase | Orientation_T] = Undefined, + outerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + padAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined, + point: Optional[bool | SchemaBase | Literal["transparent"] | Map] = Undefined, + radius: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radius2: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radius2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + radiusOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + shape: Optional[str | Parameter | SchemaBase | Map] = Undefined, + size: Optional[float | Parameter | SchemaBase | Map] = Undefined, + smooth: Optional[bool | Parameter | SchemaBase | Map] = Undefined, + stroke: Optional[ + str | Parameter | SchemaBase | Map | ColorName_T | None + ] = Undefined, + strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined, + strokeDash: Optional[ + Parameter | SchemaBase | Sequence[float] | Map + ] = Undefined, + strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined, + strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined, + strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined, + style: Optional[str | Sequence[str]] = Undefined, + tension: Optional[float | Parameter | SchemaBase | Map] = Undefined, + text: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined, + theta: Optional[float | Parameter | SchemaBase | Map] = Undefined, + theta2: Optional[float | Parameter | SchemaBase | Map] = Undefined, + theta2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + thetaOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + thickness: Optional[float] = Undefined, + timeUnitBandPosition: Optional[float] = Undefined, + timeUnitBandSize: Optional[float] = Undefined, + tooltip: Optional[ + str | bool | float | Parameter | SchemaBase | Map | None + ] = Undefined, + url: Optional[str | Parameter | SchemaBase | Map] = Undefined, + width: Optional[float | Parameter | SchemaBase | Map] = Undefined, + x: Optional[ + float | Parameter | SchemaBase | Literal["width"] | Map + ] = Undefined, + x2: Optional[ + float | Parameter | SchemaBase | Literal["width"] | Map + ] = Undefined, + x2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + xOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + y: Optional[ + float | Parameter | SchemaBase | Literal["height"] | Map + ] = Undefined, + y2: Optional[ + float | Parameter | SchemaBase | Literal["height"] | Map + ] = Undefined, + y2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + yOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + align=align, + angle=angle, + aria=aria, + ariaRole=ariaRole, + ariaRoleDescription=ariaRoleDescription, + aspect=aspect, + bandSize=bandSize, + baseline=baseline, + binSpacing=binSpacing, + blend=blend, + clip=clip, + color=color, + continuousBandSize=continuousBandSize, + cornerRadius=cornerRadius, + cornerRadiusBottomLeft=cornerRadiusBottomLeft, + cornerRadiusBottomRight=cornerRadiusBottomRight, + cornerRadiusEnd=cornerRadiusEnd, + cornerRadiusTopLeft=cornerRadiusTopLeft, + cornerRadiusTopRight=cornerRadiusTopRight, + cursor=cursor, + description=description, + dir=dir, + discreteBandSize=discreteBandSize, + dx=dx, + dy=dy, + ellipsis=ellipsis, + fill=fill, + fillOpacity=fillOpacity, + filled=filled, + font=font, + fontSize=fontSize, + fontStyle=fontStyle, + fontWeight=fontWeight, + height=height, + href=href, + innerRadius=innerRadius, + interpolate=interpolate, + invalid=invalid, + limit=limit, + line=line, + lineBreak=lineBreak, + lineHeight=lineHeight, + minBandSize=minBandSize, + opacity=opacity, + order=order, + orient=orient, + outerRadius=outerRadius, + padAngle=padAngle, + point=point, + radius=radius, + radius2=radius2, + radius2Offset=radius2Offset, + radiusOffset=radiusOffset, + shape=shape, + size=size, + smooth=smooth, + stroke=stroke, + strokeCap=strokeCap, + strokeDash=strokeDash, + strokeDashOffset=strokeDashOffset, + strokeJoin=strokeJoin, + strokeMiterLimit=strokeMiterLimit, + strokeOffset=strokeOffset, + strokeOpacity=strokeOpacity, + strokeWidth=strokeWidth, + style=style, + tension=tension, + text=text, + theta=theta, + theta2=theta2, + theta2Offset=theta2Offset, + thetaOffset=thetaOffset, + thickness=thickness, + timeUnitBandPosition=timeUnitBandPosition, + timeUnitBandSize=timeUnitBandSize, + tooltip=tooltip, + url=url, + width=width, + x=x, + x2=x2, + x2Offset=x2Offset, + xOffset=xOffset, + y=y, + y2=y2, + y2Offset=y2Offset, + yOffset=yOffset, + **kwds, + ) + + +class _BoxPlotDef(SchemaBase): + """ + BoxPlotDef schema wrapper. + + Parameters + ---------- + box : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + clip : bool + Whether a composite mark be clipped to the enclosing group's width and height. + color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + extent : float, Literal['min-max'] + The extent of the whiskers. Available options include: + + * ``"min-max"``: min and max are the lower and upper whiskers respectively. + * A number representing multiple of the interquartile range. This number will be + multiplied by the IQR to determine whisker boundary, which spans from the smallest + data to the largest data within the range *[Q1 - k * IQR, Q3 + k * IQR]* where + *Q1* and *Q3* are the first and third quartiles while *IQR* is the interquartile + range (*Q3-Q1*). + + **Default value:** ``1.5``. + invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None + Invalid data mode, which defines how the marks and corresponding scales should + represent invalid values (``null`` and ``NaN`` in continuous scales *without* + defined output for invalid values). + + * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and + *scales*. For path marks (for line, area, trail), this option will create paths + that connect valid points, as if the data rows with invalid values do not exist. + + * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at + invalid values. For non-path marks, this is equivalent to ``"filter"``. All + *scale* domains will *exclude* these filtered data points. + + * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid + values. Hide invalid values for non-path marks. All *scale* domains will + *include* these filtered data points (for both path and non-path marks). + + * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each + scale will use the output for invalid values defined in ``config.scale.invalid`` + or, if unspecified, by default invalid values will produce the same visual values + as zero (if the scale includes zero) or the minimum value (if the scale does not + include zero). + + * ``"break-paths-show-path-domains"`` (default) — This is equivalent to + ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and + ``"filter"`` for non-path marks. + + **Note**: If any channel's scale has an output for invalid values defined in + ``config.scale.invalid``, all values for the scales will be considered "valid" since + they can produce a reasonable output for the scales. Thus, fields for such channels + will not be filtered and will not cause path breaks. + median : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + opacity : float + The opacity (value between [0,1]) of the mark. + orient : :class:`Orientation`, Literal['horizontal', 'vertical'] + Orientation of the box plot. This is normally automatically determined based on + types of fields on x and y channels. However, an explicit ``orient`` be specified + when the orientation is ambiguous. + + **Default value:** ``"vertical"``. + outliers : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + rule : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + size : float + Size of the box and median tick of a box plot + ticks : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + """ + + _schema = {"$ref": "#/definitions/BoxPlotDef"} + + def __init__( + self, + box: Optional[bool | SchemaBase | Map] = Undefined, + clip: Optional[bool] = Undefined, + color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined, + extent: Optional[float | Literal["min-max"]] = Undefined, + invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined, + median: Optional[bool | SchemaBase | Map] = Undefined, + opacity: Optional[float] = Undefined, + orient: Optional[SchemaBase | Orientation_T] = Undefined, + outliers: Optional[bool | SchemaBase | Map] = Undefined, + rule: Optional[bool | SchemaBase | Map] = Undefined, + size: Optional[float] = Undefined, + ticks: Optional[bool | SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + box=box, + clip=clip, + color=color, + extent=extent, + invalid=invalid, + median=median, + opacity=opacity, + orient=orient, + outliers=outliers, + rule=rule, + size=size, + ticks=ticks, + **kwds, + ) + + +class _ErrorBarDef(SchemaBase): + """ + ErrorBarDef schema wrapper. + + Parameters + ---------- + clip : bool + Whether a composite mark be clipped to the enclosing group's width and height. + color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + extent : :class:`ErrorBarExtent`, Literal['ci', 'iqr', 'stderr', 'stdev'] + The extent of the rule. Available options include: + + * ``"ci"``: Extend the rule to the confidence interval of the mean. + * ``"stderr"``: The size of rule are set to the value of standard error, extending + from the mean. + * ``"stdev"``: The size of rule are set to the value of standard deviation, + extending from the mean. + * ``"iqr"``: Extend the rule to the q1 and q3. + + **Default value:** ``"stderr"``. + opacity : float + The opacity (value between [0,1]) of the mark. + orient : :class:`Orientation`, Literal['horizontal', 'vertical'] + Orientation of the error bar. This is normally automatically determined, but can be + specified when the orientation is ambiguous and cannot be automatically determined. + rule : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + size : float + Size of the ticks of an error bar + thickness : float + Thickness of the ticks and the bar of an error bar + ticks : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + """ + + _schema = {"$ref": "#/definitions/ErrorBarDef"} + + def __init__( + self, + clip: Optional[bool] = Undefined, + color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined, + extent: Optional[SchemaBase | ErrorBarExtent_T] = Undefined, + opacity: Optional[float] = Undefined, + orient: Optional[SchemaBase | Orientation_T] = Undefined, + rule: Optional[bool | SchemaBase | Map] = Undefined, + size: Optional[float] = Undefined, + thickness: Optional[float] = Undefined, + ticks: Optional[bool | SchemaBase | Map] = Undefined, + **kwds, + ): + super().__init__( + clip=clip, + color=color, + extent=extent, + opacity=opacity, + orient=orient, + rule=rule, + size=size, + thickness=thickness, + ticks=ticks, + **kwds, + ) + + +class _ErrorBandDef(SchemaBase): + """ + ErrorBandDef schema wrapper. + + Parameters + ---------- + band : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + borders : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig` + + clip : bool + Whether a composite mark be clipped to the enclosing group's width and height. + color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'] + Default color. + + **Default value:** :raw-html:`` ■ :raw-html:`` + ``"#4682b4"`` + + **Note:** + + * This property cannot be used in a `style config + `__. + * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and + will override ``color``. + extent : :class:`ErrorBarExtent`, Literal['ci', 'iqr', 'stderr', 'stdev'] + The extent of the band. Available options include: + + * ``"ci"``: Extend the band to the confidence interval of the mean. + * ``"stderr"``: The size of band are set to the value of standard error, extending + from the mean. + * ``"stdev"``: The size of band are set to the value of standard deviation, + extending from the mean. + * ``"iqr"``: Extend the band to the q1 and q3. + + **Default value:** ``"stderr"``. + interpolate : :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after'] + The line interpolation method for the error band. One of the following: + + * ``"linear"``: piecewise linear segments, as in a polyline. + * ``"linear-closed"``: close the linear segments to form a polygon. + * ``"step"``: a piecewise constant function (a step function) consisting of + alternating horizontal and vertical lines. The y-value changes at the midpoint of + each pair of adjacent x-values. + * ``"step-before"``: a piecewise constant function (a step function) consisting of + alternating horizontal and vertical lines. The y-value changes before the x-value. + * ``"step-after"``: a piecewise constant function (a step function) consisting of + alternating horizontal and vertical lines. The y-value changes after the x-value. + * ``"basis"``: a B-spline, with control point duplication on the ends. + * ``"basis-open"``: an open B-spline; may not intersect the start or end. + * ``"basis-closed"``: a closed B-spline, as in a loop. + * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends. + * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end, + but will intersect other control points. + * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop. + * ``"bundle"``: equivalent to basis, except the tension parameter is used to + straighten the spline. + * ``"monotone"``: cubic interpolation that preserves monotonicity in y. + opacity : float + The opacity (value between [0,1]) of the mark. + orient : :class:`Orientation`, Literal['horizontal', 'vertical'] + Orientation of the error band. This is normally automatically determined, but can be + specified when the orientation is ambiguous and cannot be automatically determined. + tension : float + The tension parameter for the interpolation type of the error band. + """ + + _schema = {"$ref": "#/definitions/ErrorBandDef"} + + def __init__( + self, + band: Optional[bool | SchemaBase | Map] = Undefined, + borders: Optional[bool | SchemaBase | Map] = Undefined, + clip: Optional[bool] = Undefined, + color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined, + extent: Optional[SchemaBase | ErrorBarExtent_T] = Undefined, + interpolate: Optional[SchemaBase | Interpolate_T] = Undefined, + opacity: Optional[float] = Undefined, + orient: Optional[SchemaBase | Orientation_T] = Undefined, + tension: Optional[float] = Undefined, + **kwds, + ): + super().__init__( + band=band, + borders=borders, + clip=clip, + color=color, + extent=extent, + interpolate=interpolate, + opacity=opacity, + orient=orient, + tension=tension, + **kwds, + ) + + +class MarkMethodMixin: + """A mixin class that defines mark methods.""" + + @use_signature(_MarkDef) + def mark_arc(self, **kwds: Any) -> Self: + """Set the chart's mark to 'arc' (see :class:`MarkDef`).""" + copy = self.copy(deep=False) # type: ignore[attr-defined] + if any(val is not Undefined for val in kwds.values()): + copy.mark = core.MarkDef(type="arc", **kwds) + else: + copy.mark = "arc" + return copy + + @use_signature(_MarkDef) + def mark_area(self, **kwds: Any) -> Self: + """Set the chart's mark to 'area' (see :class:`MarkDef`).""" + copy = self.copy(deep=False) # type: ignore[attr-defined] + if any(val is not Undefined for val in kwds.values()): + copy.mark = core.MarkDef(type="area", **kwds) + else: + copy.mark = "area" + return copy + + @use_signature(_MarkDef) + def mark_bar(self, **kwds: Any) -> Self: + """Set the chart's mark to 'bar' (see :class:`MarkDef`).""" + copy = self.copy(deep=False) # type: ignore[attr-defined] + if any(val is not Undefined for val in kwds.values()): + copy.mark = core.MarkDef(type="bar", **kwds) + else: + copy.mark = "bar" + return copy + + @use_signature(_MarkDef) + def mark_image(self, **kwds: Any) -> Self: + """Set the chart's mark to 'image' (see :class:`MarkDef`).""" + copy = self.copy(deep=False) # type: ignore[attr-defined] + if any(val is not Undefined for val in kwds.values()): + copy.mark = core.MarkDef(type="image", **kwds) + else: + copy.mark = "image" + return copy + + @use_signature(_MarkDef) + def mark_line(self, **kwds: Any) -> Self: + """Set the chart's mark to 'line' (see :class:`MarkDef`).""" + copy = self.copy(deep=False) # type: ignore[attr-defined] + if any(val is not Undefined for val in kwds.values()): + copy.mark = core.MarkDef(type="line", **kwds) + else: + copy.mark = "line" + return copy + + @use_signature(_MarkDef) + def mark_point(self, **kwds: Any) -> Self: + """Set the chart's mark to 'point' (see :class:`MarkDef`).""" + copy = self.copy(deep=False) # type: ignore[attr-defined] + if any(val is not Undefined for val in kwds.values()): + copy.mark = core.MarkDef(type="point", **kwds) + else: + copy.mark = "point" + return copy + + @use_signature(_MarkDef) + def mark_rect(self, **kwds: Any) -> Self: + """Set the chart's mark to 'rect' (see :class:`MarkDef`).""" + copy = self.copy(deep=False) # type: ignore[attr-defined] + if any(val is not Undefined for val in kwds.values()): + copy.mark = core.MarkDef(type="rect", **kwds) + else: + copy.mark = "rect" + return copy + + @use_signature(_MarkDef) + def mark_rule(self, **kwds: Any) -> Self: + """Set the chart's mark to 'rule' (see :class:`MarkDef`).""" + copy = self.copy(deep=False) # type: ignore[attr-defined] + if any(val is not Undefined for val in kwds.values()): + copy.mark = core.MarkDef(type="rule", **kwds) + else: + copy.mark = "rule" + return copy + + @use_signature(_MarkDef) + def mark_text(self, **kwds: Any) -> Self: + """Set the chart's mark to 'text' (see :class:`MarkDef`).""" + copy = self.copy(deep=False) # type: ignore[attr-defined] + if any(val is not Undefined for val in kwds.values()): + copy.mark = core.MarkDef(type="text", **kwds) + else: + copy.mark = "text" + return copy + + @use_signature(_MarkDef) + def mark_tick(self, **kwds: Any) -> Self: + """Set the chart's mark to 'tick' (see :class:`MarkDef`).""" + copy = self.copy(deep=False) # type: ignore[attr-defined] + if any(val is not Undefined for val in kwds.values()): + copy.mark = core.MarkDef(type="tick", **kwds) + else: + copy.mark = "tick" + return copy + + @use_signature(_MarkDef) + def mark_trail(self, **kwds: Any) -> Self: + """Set the chart's mark to 'trail' (see :class:`MarkDef`).""" + copy = self.copy(deep=False) # type: ignore[attr-defined] + if any(val is not Undefined for val in kwds.values()): + copy.mark = core.MarkDef(type="trail", **kwds) + else: + copy.mark = "trail" + return copy + + @use_signature(_MarkDef) + def mark_circle(self, **kwds: Any) -> Self: + """Set the chart's mark to 'circle' (see :class:`MarkDef`).""" + copy = self.copy(deep=False) # type: ignore[attr-defined] + if any(val is not Undefined for val in kwds.values()): + copy.mark = core.MarkDef(type="circle", **kwds) + else: + copy.mark = "circle" + return copy + + @use_signature(_MarkDef) + def mark_square(self, **kwds: Any) -> Self: + """Set the chart's mark to 'square' (see :class:`MarkDef`).""" + copy = self.copy(deep=False) # type: ignore[attr-defined] + if any(val is not Undefined for val in kwds.values()): + copy.mark = core.MarkDef(type="square", **kwds) + else: + copy.mark = "square" + return copy + + @use_signature(_MarkDef) + def mark_geoshape(self, **kwds: Any) -> Self: + """Set the chart's mark to 'geoshape' (see :class:`MarkDef`).""" + copy = self.copy(deep=False) # type: ignore[attr-defined] + if any(val is not Undefined for val in kwds.values()): + copy.mark = core.MarkDef(type="geoshape", **kwds) + else: + copy.mark = "geoshape" + return copy + + @use_signature(_BoxPlotDef) + def mark_boxplot(self, **kwds: Any) -> Self: + """Set the chart's mark to 'boxplot' (see :class:`BoxPlotDef`).""" + copy = self.copy(deep=False) # type: ignore[attr-defined] + if any(val is not Undefined for val in kwds.values()): + copy.mark = core.BoxPlotDef(type="boxplot", **kwds) + else: + copy.mark = "boxplot" + return copy + + @use_signature(_ErrorBarDef) + def mark_errorbar(self, **kwds: Any) -> Self: + """Set the chart's mark to 'errorbar' (see :class:`ErrorBarDef`).""" + copy = self.copy(deep=False) # type: ignore[attr-defined] + if any(val is not Undefined for val in kwds.values()): + copy.mark = core.ErrorBarDef(type="errorbar", **kwds) + else: + copy.mark = "errorbar" + return copy + + @use_signature(_ErrorBandDef) + def mark_errorband(self, **kwds: Any) -> Self: + """Set the chart's mark to 'errorband' (see :class:`ErrorBandDef`).""" + copy = self.copy(deep=False) # type: ignore[attr-defined] + if any(val is not Undefined for val in kwds.values()): + copy.mark = core.ErrorBandDef(type="errorband", **kwds) + else: + copy.mark = "errorband" + return copy + + +class ConfigMethodMixin: + """A mixin class that defines config methods.""" + + @use_signature(core.Config) + def configure(self, *args, **kwargs) -> Self: + copy = self.copy(deep=False) # type: ignore[attr-defined] + copy.config = core.Config(*args, **kwargs) + return copy + + @use_signature(core.RectConfig) + def configure_arc(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["arc"] = core.RectConfig(*args, **kwargs) + return copy + + @use_signature(core.AreaConfig) + def configure_area(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["area"] = core.AreaConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axis(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axis"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axisBand(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axisBand"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axisBottom(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axisBottom"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axisDiscrete(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axisDiscrete"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axisLeft(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axisLeft"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axisPoint(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axisPoint"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axisQuantitative(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axisQuantitative"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axisRight(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axisRight"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axisTemporal(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axisTemporal"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axisTop(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axisTop"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axisX(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axisX"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axisXBand(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axisXBand"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axisXDiscrete(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axisXDiscrete"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axisXPoint(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axisXPoint"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axisXQuantitative(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axisXQuantitative"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axisXTemporal(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axisXTemporal"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axisY(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axisY"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axisYBand(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axisYBand"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axisYDiscrete(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axisYDiscrete"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axisYPoint(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axisYPoint"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axisYQuantitative(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axisYQuantitative"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.AxisConfig) + def configure_axisYTemporal(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["axisYTemporal"] = core.AxisConfig(*args, **kwargs) + return copy + + @use_signature(core.BarConfig) + def configure_bar(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["bar"] = core.BarConfig(*args, **kwargs) + return copy + + @use_signature(core.BoxPlotConfig) + def configure_boxplot(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["boxplot"] = core.BoxPlotConfig(*args, **kwargs) + return copy + + @use_signature(core.MarkConfig) + def configure_circle(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["circle"] = core.MarkConfig(*args, **kwargs) + return copy + + @use_signature(core.CompositionConfig) + def configure_concat(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["concat"] = core.CompositionConfig(*args, **kwargs) + return copy + + @use_signature(core.ErrorBandConfig) + def configure_errorband(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["errorband"] = core.ErrorBandConfig(*args, **kwargs) + return copy + + @use_signature(core.ErrorBarConfig) + def configure_errorbar(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["errorbar"] = core.ErrorBarConfig(*args, **kwargs) + return copy + + @use_signature(core.CompositionConfig) + def configure_facet(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["facet"] = core.CompositionConfig(*args, **kwargs) + return copy + + @use_signature(core.MarkConfig) + def configure_geoshape(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["geoshape"] = core.MarkConfig(*args, **kwargs) + return copy + + @use_signature(core.HeaderConfig) + def configure_header(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["header"] = core.HeaderConfig(*args, **kwargs) + return copy + + @use_signature(core.HeaderConfig) + def configure_headerColumn(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["headerColumn"] = core.HeaderConfig(*args, **kwargs) + return copy + + @use_signature(core.HeaderConfig) + def configure_headerFacet(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["headerFacet"] = core.HeaderConfig(*args, **kwargs) + return copy + + @use_signature(core.HeaderConfig) + def configure_headerRow(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["headerRow"] = core.HeaderConfig(*args, **kwargs) + return copy + + @use_signature(core.RectConfig) + def configure_image(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["image"] = core.RectConfig(*args, **kwargs) + return copy + + @use_signature(core.LegendConfig) + def configure_legend(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["legend"] = core.LegendConfig(*args, **kwargs) + return copy + + @use_signature(core.LineConfig) + def configure_line(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["line"] = core.LineConfig(*args, **kwargs) + return copy + + @use_signature(core.MarkConfig) + def configure_mark(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["mark"] = core.MarkConfig(*args, **kwargs) + return copy + + @use_signature(core.MarkConfig) + def configure_point(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["point"] = core.MarkConfig(*args, **kwargs) + return copy + + @use_signature(core.ProjectionConfig) + def configure_projection(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["projection"] = core.ProjectionConfig(*args, **kwargs) + return copy + + @use_signature(core.RangeConfig) + def configure_range(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["range"] = core.RangeConfig(*args, **kwargs) + return copy + + @use_signature(core.RectConfig) + def configure_rect(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["rect"] = core.RectConfig(*args, **kwargs) + return copy + + @use_signature(core.MarkConfig) + def configure_rule(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["rule"] = core.MarkConfig(*args, **kwargs) + return copy + + @use_signature(core.ScaleConfig) + def configure_scale(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["scale"] = core.ScaleConfig(*args, **kwargs) + return copy + + @use_signature(core.SelectionConfig) + def configure_selection(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["selection"] = core.SelectionConfig(*args, **kwargs) + return copy + + @use_signature(core.MarkConfig) + def configure_square(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["square"] = core.MarkConfig(*args, **kwargs) + return copy + + @use_signature(core.MarkConfig) + def configure_text(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["text"] = core.MarkConfig(*args, **kwargs) + return copy + + @use_signature(core.TickConfig) + def configure_tick(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["tick"] = core.TickConfig(*args, **kwargs) + return copy + + @use_signature(core.TitleConfig) + def configure_title(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["title"] = core.TitleConfig(*args, **kwargs) + return copy + + @use_signature(core.FormatConfig) + def configure_tooltipFormat(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["tooltipFormat"] = core.FormatConfig(*args, **kwargs) + return copy + + @use_signature(core.LineConfig) + def configure_trail(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["trail"] = core.LineConfig(*args, **kwargs) + return copy + + @use_signature(core.ViewConfig) + def configure_view(self, *args, **kwargs) -> Self: + copy = self.copy(deep=["config"]) # type: ignore[attr-defined] + if copy.config is Undefined: + copy.config = core.Config() + copy.config["view"] = core.ViewConfig(*args, **kwargs) + return copy diff --git a/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/vega-lite-schema.json b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/vega-lite-schema.json new file mode 100644 index 0000000000000000000000000000000000000000..b6c6b5a1f134dd96cfe7a96ea6de8caa0a112d8f --- /dev/null +++ b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/vega-lite-schema.json @@ -0,0 +1,32222 @@ +{ + "$ref": "#/definitions/TopLevelSpec", + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "Aggregate": { + "anyOf": [ + { + "$ref": "#/definitions/NonArgAggregateOp" + }, + { + "$ref": "#/definitions/ArgmaxDef" + }, + { + "$ref": "#/definitions/ArgminDef" + } + ] + }, + "AggregateOp": { + "enum": [ + "argmax", + "argmin", + "average", + "count", + "distinct", + "max", + "mean", + "median", + "min", + "missing", + "product", + "q1", + "q3", + "ci0", + "ci1", + "stderr", + "stdev", + "stdevp", + "sum", + "valid", + "values", + "variance", + "variancep", + "exponential", + "exponentialb" + ], + "type": "string" + }, + "AggregateTransform": { + "additionalProperties": false, + "properties": { + "aggregate": { + "description": "Array of objects that define fields to aggregate.", + "items": { + "$ref": "#/definitions/AggregatedFieldDef" + }, + "type": "array" + }, + "groupby": { + "description": "The data fields to group by. If not specified, a single group containing all data objects will be used.", + "items": { + "$ref": "#/definitions/FieldName" + }, + "type": "array" + } + }, + "required": [ + "aggregate" + ], + "type": "object" + }, + "AggregatedFieldDef": { + "additionalProperties": false, + "properties": { + "as": { + "$ref": "#/definitions/FieldName", + "description": "The output field names to use for each aggregated field." + }, + "field": { + "$ref": "#/definitions/FieldName", + "description": "The data field for which to compute aggregate function. This is required for all aggregation operations except `\"count\"`." + }, + "op": { + "$ref": "#/definitions/AggregateOp", + "description": "The aggregation operation to apply to the fields (e.g., `\"sum\"`, `\"average\"`, or `\"count\"`). See the [full list of supported aggregation operations](https://vega.github.io/vega-lite/docs/aggregate.html#ops) for more information." + } + }, + "required": [ + "op", + "as" + ], + "type": "object" + }, + "Align": { + "enum": [ + "left", + "center", + "right" + ], + "type": "string" + }, + "AllSortString": { + "anyOf": [ + { + "$ref": "#/definitions/SortOrder" + }, + { + "$ref": "#/definitions/SortByChannel" + }, + { + "$ref": "#/definitions/SortByChannelDesc" + } + ] + }, + "AnyMark": { + "anyOf": [ + { + "$ref": "#/definitions/CompositeMark" + }, + { + "$ref": "#/definitions/CompositeMarkDef" + }, + { + "$ref": "#/definitions/Mark" + }, + { + "$ref": "#/definitions/MarkDef" + } + ] + }, + "AnyMarkConfig": { + "anyOf": [ + { + "$ref": "#/definitions/MarkConfig" + }, + { + "$ref": "#/definitions/AreaConfig" + }, + { + "$ref": "#/definitions/BarConfig" + }, + { + "$ref": "#/definitions/RectConfig" + }, + { + "$ref": "#/definitions/LineConfig" + }, + { + "$ref": "#/definitions/TickConfig" + } + ] + }, + "AreaConfig": { + "additionalProperties": false, + "properties": { + "align": { + "anyOf": [ + { + "$ref": "#/definitions/Align" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\"left\"`, `\"right\"`, `\"center\"`.\n\n__Note:__ Expression reference is *not* supported for range marks." + }, + "angle": { + "anyOf": [ + { + "description": "The rotation angle of the text, in degrees.", + "maximum": 360, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "aria": { + "anyOf": [ + { + "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ariaRole": { + "anyOf": [ + { + "description": "Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"role\" attribute. Warning: this property is experimental and may be changed in the future.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ariaRoleDescription": { + "anyOf": [ + { + "description": "A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"aria-roledescription\" attribute. Warning: this property is experimental and may be changed in the future.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "aspect": { + "anyOf": [ + { + "description": "Whether to keep aspect ratio of image marks.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "baseline": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "For text marks, the vertical text baseline. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, `\"line-bottom\"`, or an expression reference that provides one of the valid values. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Note:__ Expression reference is *not* supported for range marks." + }, + "blend": { + "anyOf": [ + { + "$ref": "#/definitions/Blend", + "description": "The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `\"source-over\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "color": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default color.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`." + }, + "cornerRadius": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusBottomLeft": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusBottomRight": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusTopLeft": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusTopRight": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cursor": { + "anyOf": [ + { + "$ref": "#/definitions/Cursor", + "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "description": { + "anyOf": [ + { + "description": "A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dir": { + "anyOf": [ + { + "$ref": "#/definitions/TextDirection", + "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dx": { + "anyOf": [ + { + "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dy": { + "anyOf": [ + { + "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ellipsis": { + "anyOf": [ + { + "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "endAngle": { + "anyOf": [ + { + "description": "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fill": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)" + }, + "fillOpacity": { + "anyOf": [ + { + "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "filled": { + "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\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": { + "anyOf": [ + { + "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontSize": { + "anyOf": [ + { + "description": "The font size, in pixels.\n\n__Default value:__ `11`", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle", + "description": "The font style (e.g., `\"italic\"`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight", + "description": "The font weight. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "height": { + "anyOf": [ + { + "description": "Height of the marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "href": { + "anyOf": [ + { + "$ref": "#/definitions/URI", + "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "innerRadius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "interpolate": { + "anyOf": [ + { + "$ref": "#/definitions/Interpolate", + "description": "The line interpolation method to use for line and area marks. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function.\n- `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "invalid": { + "anyOf": [ + { + "$ref": "#/definitions/MarkInvalidDataMode" + }, + { + "type": "null" + } + ], + "description": "Invalid data mode, which defines how the marks and corresponding scales should represent invalid values (`null` and `NaN` in continuous scales *without* defined output for invalid values).\n\n- `\"filter\"` — *Exclude* all invalid values from the visualization's *marks* and *scales*. For path marks (for line, area, trail), this option will create paths that connect valid points, as if the data rows with invalid values do not exist.\n\n- `\"break-paths-filter-domains\"` — Break path marks (for line, area, trail) at invalid values. For non-path marks, this is equivalent to `\"filter\"`. All *scale* domains will *exclude* these filtered data points.\n\n- `\"break-paths-show-domains\"` — Break paths (for line, area, trail) at invalid values. Hide invalid values for non-path marks. All *scale* domains will *include* these filtered data points (for both path and non-path marks).\n\n- `\"show\"` or `null` — Show all data points in the marks and scale domains. Each scale will use the output for invalid values defined in `config.scale.invalid` or, if unspecified, by default invalid values will produce the same visual values as zero (if the scale includes zero) or the minimum value (if the scale does not include zero).\n\n- `\"break-paths-show-path-domains\"` (default) — This is equivalent to `\"break-paths-show-domains\"` for path-based marks (line/area/trail) and `\"filter\"` for non-path marks.\n\n__Note__: If any channel's scale has an output for invalid values defined in `config.scale.invalid`, all values for the scales will be considered \"valid\" since they can produce a reasonable output for the scales. Thus, fields for such channels will not be filtered and will not cause path breaks." + }, + "limit": { + "anyOf": [ + { + "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "line": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/OverlayMarkDef" + } + ], + "description": "A flag for overlaying line on top of area marks, or an object defining the properties of the overlayed lines.\n\n- If this value is an empty object (`{}`) or `true`, lines with default properties will be used.\n\n- If this value is `false`, no lines would be automatically added to area marks.\n\n__Default value:__ `false`." + }, + "lineBreak": { + "anyOf": [ + { + "description": "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "lineHeight": { + "anyOf": [ + { + "description": "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "opacity": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.", + "maximum": 1, + "minimum": 0 + }, + "order": { + "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.", + "type": [ + "null", + "boolean" + ] + }, + "orient": { + "$ref": "#/definitions/Orientation", + "description": "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.\n- For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension.\n- For area, this property determines the orient property of the Vega output.\n- For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored." + }, + "outerRadius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "padAngle": { + "anyOf": [ + { + "description": "The angular padding applied to sides of the arc, in radians.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "point": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/OverlayMarkDef" + }, + { + "const": "transparent", + "type": "string" + } + ], + "description": "A flag for overlaying points on top of line or area marks, or an object defining the properties of the overlayed points.\n\n- If this property is `\"transparent\"`, transparent points will be used (for enhancing tooltips and selections).\n\n- If this property is an empty object (`{}`) or `true`, filled points with default properties will be used.\n\n- If this property is `false`, no points would be automatically added to line or area marks.\n\n__Default value:__ `false`." + }, + "radius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties.\n\n__Default value:__ `min(plot_width, plot_height)/2`", + "minimum": 0 + }, + "radius2": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The secondary (inner) radius in pixels of arc marks.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "shape": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/SymbolShape" + }, + { + "type": "string" + } + ], + "description": "Shape of the point marks. Supported values include:\n- plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`.\n- the line symbol `\"stroke\"`\n- centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"`\n- a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "size": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default size for marks.\n- For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.\n- For `bar`, this represents the band size of the bar, in pixels.\n- For `text`, this represents the font size, in pixels.\n\n__Default value:__\n- `30` for point, circle, square marks; width/height's `step`\n- `2` for bar marks with discrete dimensions;\n- `5` for bar marks with continuous dimensions;\n- `11` for text marks.", + "minimum": 0 + }, + "smooth": { + "anyOf": [ + { + "description": "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "startAngle": { + "anyOf": [ + { + "description": "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "stroke": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)" + }, + "strokeCap": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeCap", + "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeDash": { + "anyOf": [ + { + "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeDashOffset": { + "anyOf": [ + { + "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeJoin": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeJoin", + "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeMiterLimit": { + "anyOf": [ + { + "description": "The miter limit at which to bevel a line join.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeOffset": { + "anyOf": [ + { + "description": "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeOpacity": { + "anyOf": [ + { + "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeWidth": { + "anyOf": [ + { + "description": "The stroke width, in pixels.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "tension": { + "anyOf": [ + { + "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "text": { + "anyOf": [ + { + "$ref": "#/definitions/Text", + "description": "Placeholder text if the `text` channel is not specified" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "theta": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians.", + "maximum": 360, + "minimum": 0 + }, + "theta2": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise." + }, + "timeUnitBandPosition": { + "description": "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.", + "type": "number" + }, + "timeUnitBandSize": { + "description": "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.", + "type": "number" + }, + "tooltip": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "$ref": "#/definitions/TooltipContent" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "type": "null" + } + ], + "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used.\n- If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used.\n- If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite.\n\n__Default value:__ `null`" + }, + "url": { + "anyOf": [ + { + "$ref": "#/definitions/URI", + "description": "The URL of the image file for image marks." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "width": { + "anyOf": [ + { + "description": "Width of the marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "x": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot." + }, + "x2": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot." + }, + "y": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot." + }, + "y2": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot." + } + }, + "type": "object" + }, + "ArgmaxDef": { + "additionalProperties": false, + "properties": { + "argmax": { + "$ref": "#/definitions/FieldName" + } + }, + "required": [ + "argmax" + ], + "type": "object" + }, + "ArgminDef": { + "additionalProperties": false, + "properties": { + "argmin": { + "$ref": "#/definitions/FieldName" + } + }, + "required": [ + "argmin" + ], + "type": "object" + }, + "AutoSizeParams": { + "additionalProperties": false, + "properties": { + "contains": { + "description": "Determines how size calculation should be performed, one of `\"content\"` or `\"padding\"`. The default setting (`\"content\"`) interprets the width and height settings as the data rectangle (plotting) dimensions, to which padding is then added. In contrast, the `\"padding\"` setting includes the padding within the view size calculations, such that the width and height settings indicate the **total** intended size of the view.\n\n__Default value__: `\"content\"`", + "enum": [ + "content", + "padding" + ], + "type": "string" + }, + "resize": { + "description": "A boolean flag indicating if autosize layout should be re-calculated on every view update.\n\n__Default value__: `false`", + "type": "boolean" + }, + "type": { + "$ref": "#/definitions/AutosizeType", + "description": "The sizing format type. One of `\"pad\"`, `\"fit\"`, `\"fit-x\"`, `\"fit-y\"`, or `\"none\"`. See the [autosize type](https://vega.github.io/vega-lite/docs/size.html#autosize) documentation for descriptions of each.\n\n__Default value__: `\"pad\"`" + } + }, + "type": "object" + }, + "AutosizeType": { + "enum": [ + "pad", + "none", + "fit", + "fit-x", + "fit-y" + ], + "type": "string" + }, + "Axis": { + "additionalProperties": false, + "properties": { + "aria": { + "anyOf": [ + { + "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG group, removing the axis from the ARIA accessibility tree.\n\n__Default value:__ `true`", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "bandPosition": { + "anyOf": [ + { + "description": "An interpolation fraction indicating where, for `band` scales, axis ticks should be positioned. A value of `0` places ticks at the left edge of their bands. A value of `0.5` places ticks in the middle of their bands.\n\n __Default value:__ `0.5`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "description": { + "anyOf": [ + { + "description": "A text description of this axis for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If the `aria` property is true, for SVG output the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute) will be set to this description. If the description is unspecified it will be automatically generated.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "domain": { + "description": "A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.\n\n__Default value:__ `true`", + "type": "boolean" + }, + "domainCap": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeCap", + "description": "The stroke cap for the domain line's ending style. One of `\"butt\"`, `\"round\"` or `\"square\"`.\n\n__Default value:__ `\"butt\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "domainColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "Color of axis domain line.\n\n__Default value:__ `\"gray\"`." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "domainDash": { + "anyOf": [ + { + "description": "An array of alternating [stroke, space] lengths for dashed domain lines.", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "domainDashOffset": { + "anyOf": [ + { + "description": "The pixel offset at which to start drawing with the domain dash array.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "domainOpacity": { + "anyOf": [ + { + "description": "Opacity of the axis domain line.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "domainWidth": { + "anyOf": [ + { + "description": "Stroke width of axis domain line\n\n__Default value:__ `1`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "format": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/Dict" + } + ], + "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format." + }, + "formatType": { + "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.", + "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](https://vega.github.io/vega-lite/docs/scale.html#continuous) that are not binned; otherwise, `false`.", + "type": "boolean" + }, + "gridCap": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeCap", + "description": "The stroke cap for grid lines' ending style. One of `\"butt\"`, `\"round\"` or `\"square\"`.\n\n__Default value:__ `\"butt\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "gridColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "Color of gridlines.\n\n__Default value:__ `\"lightGray\"`." + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisColor" + } + ] + }, + "gridDash": { + "anyOf": [ + { + "description": "An array of alternating [stroke, space] lengths for dashed grid lines.", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumberArray" + } + ] + }, + "gridDashOffset": { + "anyOf": [ + { + "description": "The pixel offset at which to start drawing with the grid dash array.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "gridOpacity": { + "anyOf": [ + { + "description": "The stroke opacity of grid (value between [0,1])\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "gridWidth": { + "anyOf": [ + { + "description": "The grid width, in pixels.\n\n__Default value:__ `1`", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "labelAlign": { + "anyOf": [ + { + "$ref": "#/definitions/Align", + "description": "Horizontal text alignment of axis tick labels, overriding the default setting for the current axis orientation." + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisLabelAlign" + } + ] + }, + "labelAngle": { + "anyOf": [ + { + "description": "The rotation angle of the axis labels.\n\n__Default value:__ `-90` for nominal and ordinal fields; `0` otherwise.", + "maximum": 360, + "minimum": -360, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelBaseline": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline", + "description": "Vertical text baseline of axis tick labels, overriding the default setting for the current axis orientation. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone." + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisLabelBaseline" + } + ] + }, + "labelBound": { + "anyOf": [ + { + "description": "Indicates if labels should be hidden if they exceed the axis range. If `false` (the default) no bounds overlap analysis is performed. If `true`, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.\n\n__Default value:__ `false`.", + "type": [ + "number", + "boolean" + ] + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "The color of the tick label, can be in hex color code or regular color name." + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisColor" + } + ] + }, + "labelExpr": { + "description": "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.", + "type": "string" + }, + "labelFlush": { + "description": "Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.\n\n__Default value:__ `true` for axis of a continuous x-scale. Otherwise, `false`.", + "type": [ + "boolean", + "number" + ] + }, + "labelFlushOffset": { + "anyOf": [ + { + "description": "Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of `2` will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.\n\n__Default value:__ `0`.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelFont": { + "anyOf": [ + { + "description": "The font of the tick label.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisString" + } + ] + }, + "labelFontSize": { + "anyOf": [ + { + "description": "The font size of the label, in pixels.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "labelFontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle", + "description": "Font style of the title." + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisLabelFontStyle" + } + ] + }, + "labelFontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight", + "description": "Font weight of axis tick labels." + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisLabelFontWeight" + } + ] + }, + "labelLimit": { + "anyOf": [ + { + "description": "Maximum allowed pixel width of axis tick labels.\n\n__Default value:__ `180`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelLineHeight": { + "anyOf": [ + { + "description": "Line height in pixels for multi-line label text or label text with `\"line-top\"` or `\"line-bottom\"` baseline.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelOffset": { + "anyOf": [ + { + "description": "Position offset in pixels to apply to labels, in addition to tickOffset.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "labelOpacity": { + "anyOf": [ + { + "description": "The opacity of the labels.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "labelOverlap": { + "anyOf": [ + { + "$ref": "#/definitions/LabelOverlap" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The strategy to use for resolving overlap of axis labels. If `false` (the default), no overlap reduction is attempted. If set to `true` or `\"parity\"`, a strategy of removing every other label is used (this works well for standard linear axes). If set to `\"greedy\"`, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).\n\n__Default value:__ `true` for non-nominal fields with non-log scales; `\"greedy\"` for log scales; otherwise `false`." + }, + "labelPadding": { + "anyOf": [ + { + "description": "The padding in pixels between labels and ticks.\n\n__Default value:__ `2`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "labelSeparation": { + "anyOf": [ + { + "description": "The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default `0`). This property is ignored if *labelOverlap* resolution is not enabled.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labels": { + "description": "A boolean flag indicating if labels should be included as part of the axis.\n\n__Default value:__ `true`.", + "type": "boolean" + }, + "maxExtent": { + "anyOf": [ + { + "description": "The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.\n\n__Default value:__ `undefined`.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "minExtent": { + "anyOf": [ + { + "description": "The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.\n\n__Default value:__ `30` for y-axis; `undefined` for x-axis.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "offset": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "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)" + }, + "orient": { + "anyOf": [ + { + "$ref": "#/definitions/AxisOrient" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "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., a y-axis oriented towards the right edge of the chart).\n\n__Default value:__ `\"bottom\"` for x-axes and `\"left\"` for y-axes." + }, + "position": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The anchor position of the axis in pixels. For x-axes with top or bottom orientation, this sets the axis group x coordinate. For y-axes with left or right orientation, this sets the axis group y coordinate.\n\n__Default value__: `0`" + }, + "style": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "description": "A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property 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.\n\n__Default value:__ (none) __Note:__ Any specified style will augment the default style. For example, an x-axis mark with `\"style\": \"foo\"` will use `config.axisX` and `config.style.foo` (the specified style `\"foo\"` has higher precedence)." + }, + "tickBand": { + "anyOf": [ + { + "description": "For band scales, indicates if ticks and grid lines should be placed at the `\"center\"` of a band (default) or at the band `\"extent\"`s to indicate intervals", + "enum": [ + "center", + "extent" + ], + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "tickCap": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeCap", + "description": "The stroke cap for the tick lines' ending style. One of `\"butt\"`, `\"round\"` or `\"square\"`.\n\n__Default value:__ `\"butt\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "tickColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "The color of the axis's tick.\n\n__Default value:__ `\"gray\"`" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisColor" + } + ] + }, + "tickCount": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/TimeInterval" + }, + { + "$ref": "#/definitions/TimeIntervalStep" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are \"nice\" (multiples of 2, 5, 10) and lie within the underlying scale's range.\n\nFor scales of type `\"time\"` or `\"utc\"`, the tick count can instead be a time interval specifier. Legal string values are `\"millisecond\"`, `\"second\"`, `\"minute\"`, `\"hour\"`, `\"day\"`, `\"week\"`, `\"month\"`, and `\"year\"`. Alternatively, an object-valued interval specifier of the form `{\"interval\": \"month\", \"step\": 3}` includes a desired number of interval steps. Here, ticks are generated for each quarter (Jan, Apr, Jul, Oct) boundary.\n\n__Default value__: Determine using a formula `ceil(width/40)` for x and `ceil(height/40)` for y.", + "minimum": 0 + }, + "tickDash": { + "anyOf": [ + { + "description": "An array of alternating [stroke, space] lengths for dashed tick mark lines.", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumberArray" + } + ] + }, + "tickDashOffset": { + "anyOf": [ + { + "description": "The pixel offset at which to start drawing with the tick mark dash array.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "tickExtra": { + "description": "Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for `band` scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with `\"bandPosition\": 1` and an axis `\"padding\"` value of `0`.", + "type": "boolean" + }, + "tickMinStep": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The minimum desired step between axis ticks, in terms of scale domain values. For example, a value of `1` indicates that ticks should not be less than 1 unit apart. If `tickMinStep` is specified, the `tickCount` value will be adjusted, if necessary, to enforce the minimum step value." + }, + "tickOffset": { + "anyOf": [ + { + "description": "Position offset in pixels to apply to ticks, labels, and gridlines.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "tickOpacity": { + "anyOf": [ + { + "description": "Opacity of the ticks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "tickRound": { + "description": "Boolean flag indicating if pixel position values should be rounded to the nearest integer.\n\n__Default value:__ `true`", + "type": "boolean" + }, + "tickSize": { + "anyOf": [ + { + "description": "The size in pixels of axis ticks.\n\n__Default value:__ `5`", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "tickWidth": { + "anyOf": [ + { + "description": "The width, in pixels, of ticks.\n\n__Default value:__ `1`", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "ticks": { + "description": "Boolean value that determines whether the axis should include ticks.\n\n__Default value:__ `true`", + "type": "boolean" + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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." + }, + "titleAlign": { + "anyOf": [ + { + "$ref": "#/definitions/Align", + "description": "Horizontal text alignment of axis titles." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleAnchor": { + "anyOf": [ + { + "$ref": "#/definitions/TitleAnchor", + "description": "Text anchor position for placing axis titles." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleAngle": { + "anyOf": [ + { + "description": "Angle in degrees of axis titles.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleBaseline": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline", + "description": "Vertical text baseline for axis titles. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "Color of the title, can be in hex color code or regular color name." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleFont": { + "anyOf": [ + { + "description": "Font of the title. (e.g., `\"Helvetica Neue\"`).", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleFontSize": { + "anyOf": [ + { + "description": "Font size of the title.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleFontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle", + "description": "Font style of the title." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleFontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight", + "description": "Font weight of the title. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleLimit": { + "anyOf": [ + { + "description": "Maximum allowed pixel width of axis titles.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleLineHeight": { + "anyOf": [ + { + "description": "Line height in pixels for multi-line title text or title text with `\"line-top\"` or `\"line-bottom\"` baseline.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleOpacity": { + "anyOf": [ + { + "description": "Opacity of the axis title.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titlePadding": { + "anyOf": [ + { + "description": "The padding, in pixels, between title and axis.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleX": { + "anyOf": [ + { + "description": "X-coordinate of the axis title relative to the axis group.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleY": { + "anyOf": [ + { + "description": "Y-coordinate of the axis title relative to the axis group.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "translate": { + "anyOf": [ + { + "description": "Coordinate space translation offset for axis layout. By default, axes are translated by a 0.5 pixel offset for both the x and y coordinates in order to align stroked lines with the pixel grid. However, for vector graphics output these pixel-specific adjustments may be undesirable, in which case translate can be changed (for example, to zero).\n\n__Default value:__ `0.5`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "values": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "items": { + "type": "boolean" + }, + "type": "array" + }, + { + "items": { + "$ref": "#/definitions/DateTime" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Explicitly set the visible axis tick values." + }, + "zindex": { + "description": "A non-negative integer indicating the z-index of the axis. If zindex is 0, axes should be drawn behind all chart elements. To put them in front, set `zindex` to `1` or more.\n\n__Default value:__ `0` (behind the marks).", + "minimum": 0, + "type": "number" + } + }, + "type": "object" + }, + "AxisConfig": { + "additionalProperties": false, + "properties": { + "aria": { + "anyOf": [ + { + "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG group, removing the axis from the ARIA accessibility tree.\n\n__Default value:__ `true`", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "bandPosition": { + "anyOf": [ + { + "description": "An interpolation fraction indicating where, for `band` scales, axis ticks should be positioned. A value of `0` places ticks at the left edge of their bands. A value of `0.5` places ticks in the middle of their bands.\n\n __Default value:__ `0.5`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "description": { + "anyOf": [ + { + "description": "A text description of this axis for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If the `aria` property is true, for SVG output the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute) will be set to this description. If the description is unspecified it will be automatically generated.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "disable": { + "description": "Disable axis by default.", + "type": "boolean" + }, + "domain": { + "description": "A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.\n\n__Default value:__ `true`", + "type": "boolean" + }, + "domainCap": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeCap", + "description": "The stroke cap for the domain line's ending style. One of `\"butt\"`, `\"round\"` or `\"square\"`.\n\n__Default value:__ `\"butt\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "domainColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "Color of axis domain line.\n\n__Default value:__ `\"gray\"`." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "domainDash": { + "anyOf": [ + { + "description": "An array of alternating [stroke, space] lengths for dashed domain lines.", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "domainDashOffset": { + "anyOf": [ + { + "description": "The pixel offset at which to start drawing with the domain dash array.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "domainOpacity": { + "anyOf": [ + { + "description": "Opacity of the axis domain line.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "domainWidth": { + "anyOf": [ + { + "description": "Stroke width of axis domain line\n\n__Default value:__ `1`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "format": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/Dict" + } + ], + "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format." + }, + "formatType": { + "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.", + "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](https://vega.github.io/vega-lite/docs/scale.html#continuous) that are not binned; otherwise, `false`.", + "type": "boolean" + }, + "gridCap": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeCap", + "description": "The stroke cap for grid lines' ending style. One of `\"butt\"`, `\"round\"` or `\"square\"`.\n\n__Default value:__ `\"butt\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "gridColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "Color of gridlines.\n\n__Default value:__ `\"lightGray\"`." + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisColor" + } + ] + }, + "gridDash": { + "anyOf": [ + { + "description": "An array of alternating [stroke, space] lengths for dashed grid lines.", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumberArray" + } + ] + }, + "gridDashOffset": { + "anyOf": [ + { + "description": "The pixel offset at which to start drawing with the grid dash array.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "gridOpacity": { + "anyOf": [ + { + "description": "The stroke opacity of grid (value between [0,1])\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "gridWidth": { + "anyOf": [ + { + "description": "The grid width, in pixels.\n\n__Default value:__ `1`", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "labelAlign": { + "anyOf": [ + { + "$ref": "#/definitions/Align", + "description": "Horizontal text alignment of axis tick labels, overriding the default setting for the current axis orientation." + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisLabelAlign" + } + ] + }, + "labelAngle": { + "anyOf": [ + { + "description": "The rotation angle of the axis labels.\n\n__Default value:__ `-90` for nominal and ordinal fields; `0` otherwise.", + "maximum": 360, + "minimum": -360, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelBaseline": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline", + "description": "Vertical text baseline of axis tick labels, overriding the default setting for the current axis orientation. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone." + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisLabelBaseline" + } + ] + }, + "labelBound": { + "anyOf": [ + { + "description": "Indicates if labels should be hidden if they exceed the axis range. If `false` (the default) no bounds overlap analysis is performed. If `true`, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.\n\n__Default value:__ `false`.", + "type": [ + "number", + "boolean" + ] + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "The color of the tick label, can be in hex color code or regular color name." + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisColor" + } + ] + }, + "labelExpr": { + "description": "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.", + "type": "string" + }, + "labelFlush": { + "description": "Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.\n\n__Default value:__ `true` for axis of a continuous x-scale. Otherwise, `false`.", + "type": [ + "boolean", + "number" + ] + }, + "labelFlushOffset": { + "anyOf": [ + { + "description": "Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of `2` will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.\n\n__Default value:__ `0`.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelFont": { + "anyOf": [ + { + "description": "The font of the tick label.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisString" + } + ] + }, + "labelFontSize": { + "anyOf": [ + { + "description": "The font size of the label, in pixels.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "labelFontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle", + "description": "Font style of the title." + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisLabelFontStyle" + } + ] + }, + "labelFontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight", + "description": "Font weight of axis tick labels." + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisLabelFontWeight" + } + ] + }, + "labelLimit": { + "anyOf": [ + { + "description": "Maximum allowed pixel width of axis tick labels.\n\n__Default value:__ `180`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelLineHeight": { + "anyOf": [ + { + "description": "Line height in pixels for multi-line label text or label text with `\"line-top\"` or `\"line-bottom\"` baseline.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelOffset": { + "anyOf": [ + { + "description": "Position offset in pixels to apply to labels, in addition to tickOffset.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "labelOpacity": { + "anyOf": [ + { + "description": "The opacity of the labels.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "labelOverlap": { + "anyOf": [ + { + "$ref": "#/definitions/LabelOverlap" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The strategy to use for resolving overlap of axis labels. If `false` (the default), no overlap reduction is attempted. If set to `true` or `\"parity\"`, a strategy of removing every other label is used (this works well for standard linear axes). If set to `\"greedy\"`, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).\n\n__Default value:__ `true` for non-nominal fields with non-log scales; `\"greedy\"` for log scales; otherwise `false`." + }, + "labelPadding": { + "anyOf": [ + { + "description": "The padding in pixels between labels and ticks.\n\n__Default value:__ `2`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "labelSeparation": { + "anyOf": [ + { + "description": "The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default `0`). This property is ignored if *labelOverlap* resolution is not enabled.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labels": { + "description": "A boolean flag indicating if labels should be included as part of the axis.\n\n__Default value:__ `true`.", + "type": "boolean" + }, + "maxExtent": { + "anyOf": [ + { + "description": "The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.\n\n__Default value:__ `undefined`.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "minExtent": { + "anyOf": [ + { + "description": "The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.\n\n__Default value:__ `30` for y-axis; `undefined` for x-axis.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "offset": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "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)" + }, + "orient": { + "anyOf": [ + { + "$ref": "#/definitions/AxisOrient" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "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., a y-axis oriented towards the right edge of the chart).\n\n__Default value:__ `\"bottom\"` for x-axes and `\"left\"` for y-axes." + }, + "position": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The anchor position of the axis in pixels. For x-axes with top or bottom orientation, this sets the axis group x coordinate. For y-axes with left or right orientation, this sets the axis group y coordinate.\n\n__Default value__: `0`" + }, + "style": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "description": "A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property 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.\n\n__Default value:__ (none) __Note:__ Any specified style will augment the default style. For example, an x-axis mark with `\"style\": \"foo\"` will use `config.axisX` and `config.style.foo` (the specified style `\"foo\"` has higher precedence)." + }, + "tickBand": { + "anyOf": [ + { + "description": "For band scales, indicates if ticks and grid lines should be placed at the `\"center\"` of a band (default) or at the band `\"extent\"`s to indicate intervals", + "enum": [ + "center", + "extent" + ], + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "tickCap": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeCap", + "description": "The stroke cap for the tick lines' ending style. One of `\"butt\"`, `\"round\"` or `\"square\"`.\n\n__Default value:__ `\"butt\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "tickColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "The color of the axis's tick.\n\n__Default value:__ `\"gray\"`" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisColor" + } + ] + }, + "tickCount": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/TimeInterval" + }, + { + "$ref": "#/definitions/TimeIntervalStep" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are \"nice\" (multiples of 2, 5, 10) and lie within the underlying scale's range.\n\nFor scales of type `\"time\"` or `\"utc\"`, the tick count can instead be a time interval specifier. Legal string values are `\"millisecond\"`, `\"second\"`, `\"minute\"`, `\"hour\"`, `\"day\"`, `\"week\"`, `\"month\"`, and `\"year\"`. Alternatively, an object-valued interval specifier of the form `{\"interval\": \"month\", \"step\": 3}` includes a desired number of interval steps. Here, ticks are generated for each quarter (Jan, Apr, Jul, Oct) boundary.\n\n__Default value__: Determine using a formula `ceil(width/40)` for x and `ceil(height/40)` for y.", + "minimum": 0 + }, + "tickDash": { + "anyOf": [ + { + "description": "An array of alternating [stroke, space] lengths for dashed tick mark lines.", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumberArray" + } + ] + }, + "tickDashOffset": { + "anyOf": [ + { + "description": "The pixel offset at which to start drawing with the tick mark dash array.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "tickExtra": { + "description": "Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for `band` scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with `\"bandPosition\": 1` and an axis `\"padding\"` value of `0`.", + "type": "boolean" + }, + "tickMinStep": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The minimum desired step between axis ticks, in terms of scale domain values. For example, a value of `1` indicates that ticks should not be less than 1 unit apart. If `tickMinStep` is specified, the `tickCount` value will be adjusted, if necessary, to enforce the minimum step value." + }, + "tickOffset": { + "anyOf": [ + { + "description": "Position offset in pixels to apply to ticks, labels, and gridlines.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "tickOpacity": { + "anyOf": [ + { + "description": "Opacity of the ticks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "tickRound": { + "description": "Boolean flag indicating if pixel position values should be rounded to the nearest integer.\n\n__Default value:__ `true`", + "type": "boolean" + }, + "tickSize": { + "anyOf": [ + { + "description": "The size in pixels of axis ticks.\n\n__Default value:__ `5`", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "tickWidth": { + "anyOf": [ + { + "description": "The width, in pixels, of ticks.\n\n__Default value:__ `1`", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ConditionalAxisNumber" + } + ] + }, + "ticks": { + "description": "Boolean value that determines whether the axis should include ticks.\n\n__Default value:__ `true`", + "type": "boolean" + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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." + }, + "titleAlign": { + "anyOf": [ + { + "$ref": "#/definitions/Align", + "description": "Horizontal text alignment of axis titles." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleAnchor": { + "anyOf": [ + { + "$ref": "#/definitions/TitleAnchor", + "description": "Text anchor position for placing axis titles." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleAngle": { + "anyOf": [ + { + "description": "Angle in degrees of axis titles.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleBaseline": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline", + "description": "Vertical text baseline for axis titles. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "Color of the title, can be in hex color code or regular color name." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleFont": { + "anyOf": [ + { + "description": "Font of the title. (e.g., `\"Helvetica Neue\"`).", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleFontSize": { + "anyOf": [ + { + "description": "Font size of the title.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleFontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle", + "description": "Font style of the title." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleFontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight", + "description": "Font weight of the title. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleLimit": { + "anyOf": [ + { + "description": "Maximum allowed pixel width of axis titles.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleLineHeight": { + "anyOf": [ + { + "description": "Line height in pixels for multi-line title text or title text with `\"line-top\"` or `\"line-bottom\"` baseline.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleOpacity": { + "anyOf": [ + { + "description": "Opacity of the axis title.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titlePadding": { + "anyOf": [ + { + "description": "The padding, in pixels, between title and axis.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleX": { + "anyOf": [ + { + "description": "X-coordinate of the axis title relative to the axis group.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleY": { + "anyOf": [ + { + "description": "Y-coordinate of the axis title relative to the axis group.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "translate": { + "anyOf": [ + { + "description": "Coordinate space translation offset for axis layout. By default, axes are translated by a 0.5 pixel offset for both the x and y coordinates in order to align stroked lines with the pixel grid. However, for vector graphics output these pixel-specific adjustments may be undesirable, in which case translate can be changed (for example, to zero).\n\n__Default value:__ `0.5`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "values": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "items": { + "type": "boolean" + }, + "type": "array" + }, + { + "items": { + "$ref": "#/definitions/DateTime" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Explicitly set the visible axis tick values." + }, + "zindex": { + "description": "A non-negative integer indicating the z-index of the axis. If zindex is 0, axes should be drawn behind all chart elements. To put them in front, set `zindex` to `1` or more.\n\n__Default value:__ `0` (behind the marks).", + "minimum": 0, + "type": "number" + } + }, + "type": "object" + }, + "AxisOrient": { + "enum": [ + "top", + "bottom", + "left", + "right" + ], + "type": "string" + }, + "AxisResolveMap": { + "additionalProperties": false, + "properties": { + "x": { + "$ref": "#/definitions/ResolveMode" + }, + "y": { + "$ref": "#/definitions/ResolveMode" + } + }, + "type": "object" + }, + "BBox": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "maxItems": 4, + "minItems": 4, + "type": "array" + }, + { + "items": { + "type": "number" + }, + "maxItems": 6, + "minItems": 6, + "type": "array" + } + ], + "description": "Bounding box https://tools.ietf.org/html/rfc7946#section-5" + }, + "BarConfig": { + "additionalProperties": false, + "properties": { + "align": { + "anyOf": [ + { + "$ref": "#/definitions/Align" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\"left\"`, `\"right\"`, `\"center\"`.\n\n__Note:__ Expression reference is *not* supported for range marks." + }, + "angle": { + "anyOf": [ + { + "description": "The rotation angle of the text, in degrees.", + "maximum": 360, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "aria": { + "anyOf": [ + { + "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ariaRole": { + "anyOf": [ + { + "description": "Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"role\" attribute. Warning: this property is experimental and may be changed in the future.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ariaRoleDescription": { + "anyOf": [ + { + "description": "A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"aria-roledescription\" attribute. Warning: this property is experimental and may be changed in the future.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "aspect": { + "anyOf": [ + { + "description": "Whether to keep aspect ratio of image marks.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "baseline": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "For text marks, the vertical text baseline. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, `\"line-bottom\"`, or an expression reference that provides one of the valid values. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Note:__ Expression reference is *not* supported for range marks." + }, + "binSpacing": { + "description": "Offset between bars for binned field. The ideal value for this is either 0 (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).\n\n__Default value:__ `1`", + "minimum": 0, + "type": "number" + }, + "blend": { + "anyOf": [ + { + "$ref": "#/definitions/Blend", + "description": "The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `\"source-over\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "color": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default color.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`." + }, + "continuousBandSize": { + "description": "The default size of the bars on continuous scales.\n\n__Default value:__ `5`", + "minimum": 0, + "type": "number" + }, + "cornerRadius": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusBottomLeft": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusBottomRight": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusEnd": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "- For vertical bars, top-left and top-right corner radius.\n\n- For horizontal bars, top-right and bottom-right corner radius." + }, + "cornerRadiusTopLeft": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusTopRight": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cursor": { + "anyOf": [ + { + "$ref": "#/definitions/Cursor", + "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "description": { + "anyOf": [ + { + "description": "A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dir": { + "anyOf": [ + { + "$ref": "#/definitions/TextDirection", + "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "discreteBandSize": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/RelativeBandSize" + } + ], + "description": "The default size of the bars with discrete dimensions. If unspecified, the default size is `step-2`, which provides 2 pixel offset between bars.", + "minimum": 0 + }, + "dx": { + "anyOf": [ + { + "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dy": { + "anyOf": [ + { + "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ellipsis": { + "anyOf": [ + { + "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "endAngle": { + "anyOf": [ + { + "description": "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fill": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)" + }, + "fillOpacity": { + "anyOf": [ + { + "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "filled": { + "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\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": { + "anyOf": [ + { + "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontSize": { + "anyOf": [ + { + "description": "The font size, in pixels.\n\n__Default value:__ `11`", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle", + "description": "The font style (e.g., `\"italic\"`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight", + "description": "The font weight. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "height": { + "anyOf": [ + { + "description": "Height of the marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "href": { + "anyOf": [ + { + "$ref": "#/definitions/URI", + "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "innerRadius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "interpolate": { + "anyOf": [ + { + "$ref": "#/definitions/Interpolate", + "description": "The line interpolation method to use for line and area marks. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function.\n- `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "invalid": { + "anyOf": [ + { + "$ref": "#/definitions/MarkInvalidDataMode" + }, + { + "type": "null" + } + ], + "description": "Invalid data mode, which defines how the marks and corresponding scales should represent invalid values (`null` and `NaN` in continuous scales *without* defined output for invalid values).\n\n- `\"filter\"` — *Exclude* all invalid values from the visualization's *marks* and *scales*. For path marks (for line, area, trail), this option will create paths that connect valid points, as if the data rows with invalid values do not exist.\n\n- `\"break-paths-filter-domains\"` — Break path marks (for line, area, trail) at invalid values. For non-path marks, this is equivalent to `\"filter\"`. All *scale* domains will *exclude* these filtered data points.\n\n- `\"break-paths-show-domains\"` — Break paths (for line, area, trail) at invalid values. Hide invalid values for non-path marks. All *scale* domains will *include* these filtered data points (for both path and non-path marks).\n\n- `\"show\"` or `null` — Show all data points in the marks and scale domains. Each scale will use the output for invalid values defined in `config.scale.invalid` or, if unspecified, by default invalid values will produce the same visual values as zero (if the scale includes zero) or the minimum value (if the scale does not include zero).\n\n- `\"break-paths-show-path-domains\"` (default) — This is equivalent to `\"break-paths-show-domains\"` for path-based marks (line/area/trail) and `\"filter\"` for non-path marks.\n\n__Note__: If any channel's scale has an output for invalid values defined in `config.scale.invalid`, all values for the scales will be considered \"valid\" since they can produce a reasonable output for the scales. Thus, fields for such channels will not be filtered and will not cause path breaks." + }, + "limit": { + "anyOf": [ + { + "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "lineBreak": { + "anyOf": [ + { + "description": "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "lineHeight": { + "anyOf": [ + { + "description": "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "minBandSize": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The minimum band size for bar and rectangle marks. __Default value:__ `0.25`" + }, + "opacity": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.", + "maximum": 1, + "minimum": 0 + }, + "order": { + "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.", + "type": [ + "null", + "boolean" + ] + }, + "orient": { + "$ref": "#/definitions/Orientation", + "description": "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.\n- For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension.\n- For area, this property determines the orient property of the Vega output.\n- For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored." + }, + "outerRadius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "padAngle": { + "anyOf": [ + { + "description": "The angular padding applied to sides of the arc, in radians.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "radius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties.\n\n__Default value:__ `min(plot_width, plot_height)/2`", + "minimum": 0 + }, + "radius2": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The secondary (inner) radius in pixels of arc marks.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "shape": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/SymbolShape" + }, + { + "type": "string" + } + ], + "description": "Shape of the point marks. Supported values include:\n- plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`.\n- the line symbol `\"stroke\"`\n- centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"`\n- a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "size": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default size for marks.\n- For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.\n- For `bar`, this represents the band size of the bar, in pixels.\n- For `text`, this represents the font size, in pixels.\n\n__Default value:__\n- `30` for point, circle, square marks; width/height's `step`\n- `2` for bar marks with discrete dimensions;\n- `5` for bar marks with continuous dimensions;\n- `11` for text marks.", + "minimum": 0 + }, + "smooth": { + "anyOf": [ + { + "description": "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "startAngle": { + "anyOf": [ + { + "description": "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "stroke": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)" + }, + "strokeCap": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeCap", + "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeDash": { + "anyOf": [ + { + "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeDashOffset": { + "anyOf": [ + { + "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeJoin": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeJoin", + "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeMiterLimit": { + "anyOf": [ + { + "description": "The miter limit at which to bevel a line join.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeOffset": { + "anyOf": [ + { + "description": "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeOpacity": { + "anyOf": [ + { + "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeWidth": { + "anyOf": [ + { + "description": "The stroke width, in pixels.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "tension": { + "anyOf": [ + { + "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "text": { + "anyOf": [ + { + "$ref": "#/definitions/Text", + "description": "Placeholder text if the `text` channel is not specified" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "theta": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians.", + "maximum": 360, + "minimum": 0 + }, + "theta2": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise." + }, + "timeUnitBandPosition": { + "description": "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.", + "type": "number" + }, + "timeUnitBandSize": { + "description": "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.", + "type": "number" + }, + "tooltip": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "$ref": "#/definitions/TooltipContent" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "type": "null" + } + ], + "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used.\n- If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used.\n- If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite.\n\n__Default value:__ `null`" + }, + "url": { + "anyOf": [ + { + "$ref": "#/definitions/URI", + "description": "The URL of the image file for image marks." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "width": { + "anyOf": [ + { + "description": "Width of the marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "x": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot." + }, + "x2": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot." + }, + "y": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot." + }, + "y2": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot." + } + }, + "type": "object" + }, + "BaseTitleNoValueRefs": { + "additionalProperties": false, + "properties": { + "align": { + "$ref": "#/definitions/Align", + "description": "Horizontal text alignment for title text. One of `\"left\"`, `\"center\"`, or `\"right\"`." + }, + "anchor": { + "anyOf": [ + { + "$ref": "#/definitions/TitleAnchor", + "description": "The anchor position for placing the title and subtitle text. 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." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "angle": { + "anyOf": [ + { + "description": "Angle in degrees of title and subtitle text.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "aria": { + "anyOf": [ + { + "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG group, removing the title from the ARIA accessibility tree.\n\n__Default value:__ `true`", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "baseline": { + "$ref": "#/definitions/TextBaseline", + "description": "Vertical text baseline for title and subtitle text. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone." + }, + "color": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "Text color for title text." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dx": { + "anyOf": [ + { + "description": "Delta offset for title and subtitle text x-coordinate.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dy": { + "anyOf": [ + { + "description": "Delta offset for title and subtitle text y-coordinate.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "font": { + "anyOf": [ + { + "description": "Font name for title text.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontSize": { + "anyOf": [ + { + "description": "Font size in pixels for title text.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle", + "description": "Font style for title text." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight", + "description": "Font weight for title text. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "frame": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/TitleFrame" + }, + { + "type": "string" + } + ], + "description": "The reference frame for the anchor position, one of `\"bounds\"` (to anchor relative to the full bounding box) or `\"group\"` (to anchor relative to the group width or height)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "limit": { + "anyOf": [ + { + "description": "The maximum allowed length in pixels of title and subtitle text.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "lineHeight": { + "anyOf": [ + { + "description": "Line height in pixels for multi-line title text or title text with `\"line-top\"` or `\"line-bottom\"` baseline.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "offset": { + "anyOf": [ + { + "description": "The orthogonal offset in pixels by which to displace the title group from its position along the edge of the chart.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "orient": { + "anyOf": [ + { + "$ref": "#/definitions/TitleOrient", + "description": "Default title orientation (`\"top\"`, `\"bottom\"`, `\"left\"`, or `\"right\"`)" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "subtitleColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "Text color for subtitle text." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "subtitleFont": { + "anyOf": [ + { + "description": "Font name for subtitle text.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "subtitleFontSize": { + "anyOf": [ + { + "description": "Font size in pixels for subtitle text.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "subtitleFontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle", + "description": "Font style for subtitle text." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "subtitleFontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight", + "description": "Font weight for subtitle text. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "subtitleLineHeight": { + "anyOf": [ + { + "description": "Line height in pixels for multi-line subtitle text.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "subtitlePadding": { + "anyOf": [ + { + "description": "The padding in pixels between title and subtitle text.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "zindex": { + "anyOf": [ + { + "description": "The integer z-index indicating the layering of the title group relative to other axis, mark, and legend groups.\n\n__Default value:__ `0`.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + } + }, + "type": "object" + }, + "Baseline": { + "enum": [ + "top", + "middle", + "bottom" + ], + "type": "string" + }, + "BinExtent": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + { + "$ref": "#/definitions/ParameterExtent" + } + ] + }, + "BinParams": { + "additionalProperties": false, + "description": "Binning properties or boolean flag for determining whether to bin data or not.", + "properties": { + "anchor": { + "description": "A value in the binned domain at which to anchor the bins, shifting the bin boundaries if necessary to ensure that a boundary aligns with the anchor value.\n\n__Default value:__ the minimum bin extent value", + "type": "number" + }, + "base": { + "description": "The number base to use for automatic bin determination (default is base 10).\n\n__Default value:__ `10`", + "type": "number" + }, + "binned": { + "description": "When set to `true`, Vega-Lite treats the input data as already binned.", + "type": "boolean" + }, + "divide": { + "description": "Scale factors indicating allowable subdivisions. The default value is [5, 2], which indicates that for base 10 numbers (the default base), the method may consider dividing bin sizes by 5 and/or 2. For example, for an initial step size of 10, the method can check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might also satisfy the given constraints.\n\n__Default value:__ `[5, 2]`", + "items": { + "type": "number" + }, + "maxItems": 2, + "minItems": 1, + "type": "array" + }, + "extent": { + "$ref": "#/definitions/BinExtent", + "description": "A two-element (`[min, max]`) array indicating the range of desired bin values." + }, + "maxbins": { + "description": "Maximum number of bins.\n\n__Default value:__ `6` for `row`, `column` and `shape` channels; `10` for other channels", + "minimum": 2, + "type": "number" + }, + "minstep": { + "description": "A minimum allowable step size (particularly useful for integer values).", + "type": "number" + }, + "nice": { + "description": "If true, attempts to make the bin boundaries use human-friendly boundaries, such as multiples of ten.\n\n__Default value:__ `true`", + "type": "boolean" + }, + "step": { + "description": "An exact step size to use between bins.\n\n__Note:__ If provided, options such as maxbins will be ignored.", + "type": "number" + }, + "steps": { + "description": "An array of allowable step sizes to choose from.", + "items": { + "type": "number" + }, + "minItems": 1, + "type": "array" + } + }, + "type": "object" + }, + "BinTransform": { + "additionalProperties": false, + "properties": { + "as": { + "anyOf": [ + { + "$ref": "#/definitions/FieldName" + }, + { + "items": { + "$ref": "#/definitions/FieldName" + }, + "type": "array" + } + ], + "description": "The output fields at which to write the start and end bin values. This can be either a string or an array of strings with two elements denoting the name for the fields for bin start and bin end respectively. If a single string (e.g., `\"val\"`) is provided, the end field will be `\"val_end\"`." + }, + "bin": { + "anyOf": [ + { + "const": true, + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + } + ], + "description": "An object indicating bin properties, or simply `true` for using default bin parameters." + }, + "field": { + "$ref": "#/definitions/FieldName", + "description": "The data field to bin." + } + }, + "required": [ + "bin", + "field", + "as" + ], + "type": "object" + }, + "BindCheckbox": { + "additionalProperties": false, + "properties": { + "debounce": { + "description": "If defined, delays event handling until the specified milliseconds have elapsed since the last event was fired.", + "type": "number" + }, + "element": { + "$ref": "#/definitions/Element", + "description": "An optional CSS selector string indicating the parent element to which the input element should be added. By default, all input elements are added within the parent container of the Vega view." + }, + "input": { + "const": "checkbox", + "type": "string" + }, + "name": { + "description": "By default, the signal name is used to label input elements. This `name` property can be used instead to specify a custom label for the bound signal.", + "type": "string" + } + }, + "required": [ + "input" + ], + "type": "object" + }, + "BindDirect": { + "additionalProperties": false, + "properties": { + "debounce": { + "description": "If defined, delays event handling until the specified milliseconds have elapsed since the last event was fired.", + "type": "number" + }, + "element": { + "anyOf": [ + { + "$ref": "#/definitions/Element" + }, + { + "additionalProperties": false, + "type": "object" + } + ], + "description": "An input element that exposes a _value_ property and supports the [EventTarget](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget) interface, or a CSS selector string to such an element. When the element updates and dispatches an event, the _value_ property will be used as the new, bound signal value. When the signal updates independent of the element, the _value_ property will be set to the signal value and a new event will be dispatched on the element." + }, + "event": { + "description": "The event (default `\"input\"`) to listen for to track changes on the external element.", + "type": "string" + } + }, + "required": [ + "element" + ], + "type": "object" + }, + "BindInput": { + "additionalProperties": false, + "properties": { + "autocomplete": { + "description": "A hint for form autofill. See the [HTML autocomplete attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for additional information.", + "type": "string" + }, + "debounce": { + "description": "If defined, delays event handling until the specified milliseconds have elapsed since the last event was fired.", + "type": "number" + }, + "element": { + "$ref": "#/definitions/Element", + "description": "An optional CSS selector string indicating the parent element to which the input element should be added. By default, all input elements are added within the parent container of the Vega view." + }, + "input": { + "description": "The type of input element to use. The valid values are `\"checkbox\"`, `\"radio\"`, `\"range\"`, `\"select\"`, and any other legal [HTML form input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input).", + "type": "string" + }, + "name": { + "description": "By default, the signal name is used to label input elements. This `name` property can be used instead to specify a custom label for the bound signal.", + "type": "string" + }, + "placeholder": { + "description": "Text that appears in the form control when it has no value set.", + "type": "string" + } + }, + "type": "object" + }, + "BindRadioSelect": { + "additionalProperties": false, + "properties": { + "debounce": { + "description": "If defined, delays event handling until the specified milliseconds have elapsed since the last event was fired.", + "type": "number" + }, + "element": { + "$ref": "#/definitions/Element", + "description": "An optional CSS selector string indicating the parent element to which the input element should be added. By default, all input elements are added within the parent container of the Vega view." + }, + "input": { + "enum": [ + "radio", + "select" + ], + "type": "string" + }, + "labels": { + "description": "An array of label strings to represent the `options` values. If unspecified, the `options` value will be coerced to a string and used as the label.", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "By default, the signal name is used to label input elements. This `name` property can be used instead to specify a custom label for the bound signal.", + "type": "string" + }, + "options": { + "description": "An array of options to select from.", + "items": {}, + "type": "array" + } + }, + "required": [ + "input", + "options" + ], + "type": "object" + }, + "BindRange": { + "additionalProperties": false, + "properties": { + "debounce": { + "description": "If defined, delays event handling until the specified milliseconds have elapsed since the last event was fired.", + "type": "number" + }, + "element": { + "$ref": "#/definitions/Element", + "description": "An optional CSS selector string indicating the parent element to which the input element should be added. By default, all input elements are added within the parent container of the Vega view." + }, + "input": { + "const": "range", + "type": "string" + }, + "max": { + "description": "Sets the maximum slider value. Defaults to the larger of the signal value and `100`.", + "type": "number" + }, + "min": { + "description": "Sets the minimum slider value. Defaults to the smaller of the signal value and `0`.", + "type": "number" + }, + "name": { + "description": "By default, the signal name is used to label input elements. This `name` property can be used instead to specify a custom label for the bound signal.", + "type": "string" + }, + "step": { + "description": "Sets the minimum slider increment. If undefined, the step size will be automatically determined based on the `min` and `max` values.", + "type": "number" + } + }, + "required": [ + "input" + ], + "type": "object" + }, + "Binding": { + "anyOf": [ + { + "$ref": "#/definitions/BindCheckbox" + }, + { + "$ref": "#/definitions/BindRadioSelect" + }, + { + "$ref": "#/definitions/BindRange" + }, + { + "$ref": "#/definitions/BindInput" + }, + { + "$ref": "#/definitions/BindDirect" + } + ] + }, + "BinnedTimeUnit": { + "anyOf": [ + { + "enum": [ + "binnedyear", + "binnedyearquarter", + "binnedyearquartermonth", + "binnedyearmonth", + "binnedyearmonthdate", + "binnedyearmonthdatehours", + "binnedyearmonthdatehoursminutes", + "binnedyearmonthdatehoursminutesseconds", + "binnedyearweek", + "binnedyearweekday", + "binnedyearweekdayhours", + "binnedyearweekdayhoursminutes", + "binnedyearweekdayhoursminutesseconds", + "binnedyeardayofyear" + ], + "type": "string" + }, + { + "enum": [ + "binnedutcyear", + "binnedutcyearquarter", + "binnedutcyearquartermonth", + "binnedutcyearmonth", + "binnedutcyearmonthdate", + "binnedutcyearmonthdatehours", + "binnedutcyearmonthdatehoursminutes", + "binnedutcyearmonthdatehoursminutesseconds", + "binnedutcyearweek", + "binnedutcyearweekday", + "binnedutcyearweekdayhours", + "binnedutcyearweekdayhoursminutes", + "binnedutcyearweekdayhoursminutesseconds", + "binnedutcyeardayofyear" + ], + "type": "string" + } + ] + }, + "Blend": { + "enum": [ + null, + "multiply", + "screen", + "overlay", + "darken", + "lighten", + "color-dodge", + "color-burn", + "hard-light", + "soft-light", + "difference", + "exclusion", + "hue", + "saturation", + "color", + "luminosity" + ], + "type": [ + "null", + "string" + ] + }, + "BoxPlot": { + "const": "boxplot", + "type": "string" + }, + "BoxPlotConfig": { + "additionalProperties": false, + "properties": { + "box": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/AnyMarkConfig" + } + ] + }, + "extent": { + "anyOf": [ + { + "const": "min-max", + "type": "string" + }, + { + "type": "number" + } + ], + "description": "The extent of the whiskers. Available options include:\n- `\"min-max\"`: min and max are the lower and upper whiskers respectively.\n- A number representing multiple of the interquartile range. This number will be multiplied by the IQR to determine whisker boundary, which spans from the smallest data to the largest data within the range _[Q1 - k * IQR, Q3 + k * IQR]_ where _Q1_ and _Q3_ are the first and third quartiles while _IQR_ is the interquartile range (_Q3-Q1_).\n\n__Default value:__ `1.5`." + }, + "median": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/AnyMarkConfig" + } + ] + }, + "outliers": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/AnyMarkConfig" + } + ] + }, + "rule": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/AnyMarkConfig" + } + ] + }, + "size": { + "description": "Size of the box and median tick of a box plot", + "type": "number" + }, + "ticks": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/AnyMarkConfig" + } + ] + } + }, + "type": "object" + }, + "BoxPlotDef": { + "additionalProperties": false, + "properties": { + "box": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/AnyMarkConfig" + } + ] + }, + "clip": { + "description": "Whether a composite mark be clipped to the enclosing group’s width and height.", + "type": "boolean" + }, + "color": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default color.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`." + }, + "extent": { + "anyOf": [ + { + "const": "min-max", + "type": "string" + }, + { + "type": "number" + } + ], + "description": "The extent of the whiskers. Available options include:\n- `\"min-max\"`: min and max are the lower and upper whiskers respectively.\n- A number representing multiple of the interquartile range. This number will be multiplied by the IQR to determine whisker boundary, which spans from the smallest data to the largest data within the range _[Q1 - k * IQR, Q3 + k * IQR]_ where _Q1_ and _Q3_ are the first and third quartiles while _IQR_ is the interquartile range (_Q3-Q1_).\n\n__Default value:__ `1.5`." + }, + "invalid": { + "anyOf": [ + { + "$ref": "#/definitions/MarkInvalidDataMode" + }, + { + "type": "null" + } + ], + "description": "Invalid data mode, which defines how the marks and corresponding scales should represent invalid values (`null` and `NaN` in continuous scales *without* defined output for invalid values).\n\n- `\"filter\"` — *Exclude* all invalid values from the visualization's *marks* and *scales*. For path marks (for line, area, trail), this option will create paths that connect valid points, as if the data rows with invalid values do not exist.\n\n- `\"break-paths-filter-domains\"` — Break path marks (for line, area, trail) at invalid values. For non-path marks, this is equivalent to `\"filter\"`. All *scale* domains will *exclude* these filtered data points.\n\n- `\"break-paths-show-domains\"` — Break paths (for line, area, trail) at invalid values. Hide invalid values for non-path marks. All *scale* domains will *include* these filtered data points (for both path and non-path marks).\n\n- `\"show\"` or `null` — Show all data points in the marks and scale domains. Each scale will use the output for invalid values defined in `config.scale.invalid` or, if unspecified, by default invalid values will produce the same visual values as zero (if the scale includes zero) or the minimum value (if the scale does not include zero).\n\n- `\"break-paths-show-path-domains\"` (default) — This is equivalent to `\"break-paths-show-domains\"` for path-based marks (line/area/trail) and `\"filter\"` for non-path marks.\n\n__Note__: If any channel's scale has an output for invalid values defined in `config.scale.invalid`, all values for the scales will be considered \"valid\" since they can produce a reasonable output for the scales. Thus, fields for such channels will not be filtered and will not cause path breaks." + }, + "median": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/AnyMarkConfig" + } + ] + }, + "opacity": { + "description": "The opacity (value between [0,1]) of the mark.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "orient": { + "$ref": "#/definitions/Orientation", + "description": "Orientation of the box plot. This is normally automatically determined based on types of fields on x and y channels. However, an explicit `orient` be specified when the orientation is ambiguous.\n\n__Default value:__ `\"vertical\"`." + }, + "outliers": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/AnyMarkConfig" + } + ] + }, + "rule": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/AnyMarkConfig" + } + ] + }, + "size": { + "description": "Size of the box and median tick of a box plot", + "type": "number" + }, + "ticks": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/AnyMarkConfig" + } + ] + }, + "type": { + "$ref": "#/definitions/BoxPlot", + "description": "The mark type. This could a primitive mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`, `\"area\"`, `\"point\"`, `\"geoshape\"`, `\"rule\"`, and `\"text\"`) or a composite mark type (`\"boxplot\"`, `\"errorband\"`, `\"errorbar\"`)." + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "BrushConfig": { + "additionalProperties": false, + "properties": { + "cursor": { + "$ref": "#/definitions/Cursor", + "description": "The mouse cursor used over the interval mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used." + }, + "fill": { + "$ref": "#/definitions/Color", + "description": "The fill color of the interval mark.\n\n__Default value:__ `\"#333333\"`" + }, + "fillOpacity": { + "description": "The fill opacity of the interval mark (a value between `0` and `1`).\n\n__Default value:__ `0.125`", + "type": "number" + }, + "stroke": { + "$ref": "#/definitions/Color", + "description": "The stroke color of the interval mark.\n\n__Default value:__ `\"#ffffff\"`" + }, + "strokeDash": { + "description": "An array of alternating stroke and space lengths, for creating dashed or dotted lines.", + "items": { + "type": "number" + }, + "type": "array" + }, + "strokeDashOffset": { + "description": "The offset (in pixels) with which to begin drawing the stroke dash array.", + "type": "number" + }, + "strokeOpacity": { + "description": "The stroke opacity of the interval mark (a value between `0` and `1`).", + "type": "number" + }, + "strokeWidth": { + "description": "The stroke width of the interval mark.", + "type": "number" + } + }, + "type": "object" + }, + "CalculateTransform": { + "additionalProperties": false, + "properties": { + "as": { + "$ref": "#/definitions/FieldName", + "description": "The field for storing the computed formula value." + }, + "calculate": { + "description": "A [expression](https://vega.github.io/vega-lite/docs/types.html#expression) string. Use the variable `datum` to refer to the current data object.", + "type": "string" + } + }, + "required": [ + "calculate", + "as" + ], + "type": "object" + }, + "Categorical": { + "enum": [ + "accent", + "category10", + "category20", + "category20b", + "category20c", + "dark2", + "paired", + "pastel1", + "pastel2", + "set1", + "set2", + "set3", + "tableau10", + "tableau20" + ], + "type": "string" + }, + "Color": { + "anyOf": [ + { + "$ref": "#/definitions/ColorName" + }, + { + "$ref": "#/definitions/HexColor" + }, + { + "type": "string" + } + ] + }, + "ColorDef": { + "$ref": "#/definitions/MarkPropDef<(Gradient|string|null)>" + }, + "ColorName": { + "enum": [ + "black", + "silver", + "gray", + "white", + "maroon", + "red", + "purple", + "fuchsia", + "green", + "lime", + "olive", + "yellow", + "navy", + "blue", + "teal", + "aqua", + "orange", + "aliceblue", + "antiquewhite", + "aquamarine", + "azure", + "beige", + "bisque", + "blanchedalmond", + "blueviolet", + "brown", + "burlywood", + "cadetblue", + "chartreuse", + "chocolate", + "coral", + "cornflowerblue", + "cornsilk", + "crimson", + "cyan", + "darkblue", + "darkcyan", + "darkgoldenrod", + "darkgray", + "darkgreen", + "darkgrey", + "darkkhaki", + "darkmagenta", + "darkolivegreen", + "darkorange", + "darkorchid", + "darkred", + "darksalmon", + "darkseagreen", + "darkslateblue", + "darkslategray", + "darkslategrey", + "darkturquoise", + "darkviolet", + "deeppink", + "deepskyblue", + "dimgray", + "dimgrey", + "dodgerblue", + "firebrick", + "floralwhite", + "forestgreen", + "gainsboro", + "ghostwhite", + "gold", + "goldenrod", + "greenyellow", + "grey", + "honeydew", + "hotpink", + "indianred", + "indigo", + "ivory", + "khaki", + "lavender", + "lavenderblush", + "lawngreen", + "lemonchiffon", + "lightblue", + "lightcoral", + "lightcyan", + "lightgoldenrodyellow", + "lightgray", + "lightgreen", + "lightgrey", + "lightpink", + "lightsalmon", + "lightseagreen", + "lightskyblue", + "lightslategray", + "lightslategrey", + "lightsteelblue", + "lightyellow", + "limegreen", + "linen", + "magenta", + "mediumaquamarine", + "mediumblue", + "mediumorchid", + "mediumpurple", + "mediumseagreen", + "mediumslateblue", + "mediumspringgreen", + "mediumturquoise", + "mediumvioletred", + "midnightblue", + "mintcream", + "mistyrose", + "moccasin", + "navajowhite", + "oldlace", + "olivedrab", + "orangered", + "orchid", + "palegoldenrod", + "palegreen", + "paleturquoise", + "palevioletred", + "papayawhip", + "peachpuff", + "peru", + "pink", + "plum", + "powderblue", + "rosybrown", + "royalblue", + "saddlebrown", + "salmon", + "sandybrown", + "seagreen", + "seashell", + "sienna", + "skyblue", + "slateblue", + "slategray", + "slategrey", + "snow", + "springgreen", + "steelblue", + "tan", + "thistle", + "tomato", + "turquoise", + "violet", + "wheat", + "whitesmoke", + "yellowgreen", + "rebeccapurple" + ], + "type": "string" + }, + "ColorScheme": { + "anyOf": [ + { + "$ref": "#/definitions/Categorical" + }, + { + "$ref": "#/definitions/SequentialSingleHue" + }, + { + "$ref": "#/definitions/SequentialMultiHue" + }, + { + "$ref": "#/definitions/Diverging" + }, + { + "$ref": "#/definitions/Cyclical" + } + ] + }, + "Encoding": { + "additionalProperties": false, + "properties": { + "angle": { + "$ref": "#/definitions/NumericMarkPropDef", + "description": "Rotation angle of point and text marks." + }, + "color": { + "$ref": "#/definitions/ColorDef", + "description": "Color of the marks – either fill or stroke color based on the `filled` property of mark definition. By default, `color` represents fill color for `\"area\"`, `\"bar\"`, `\"tick\"`, `\"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-config)'s `color` property.\n\n_Note:_ 1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. The `fill` or `stroke` encodings have higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified. 2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme)." + }, + "description": { + "anyOf": [ + { + "$ref": "#/definitions/StringFieldDefWithCondition" + }, + { + "$ref": "#/definitions/StringValueDefWithCondition" + } + ], + "description": "A text description of this mark for ARIA accessibility (SVG output only). For SVG output the `\"aria-label\"` attribute will be set to this description." + }, + "detail": { + "anyOf": [ + { + "$ref": "#/definitions/FieldDefWithoutScale" + }, + { + "items": { + "$ref": "#/definitions/FieldDefWithoutScale" + }, + "type": "array" + } + ], + "description": "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": { + "$ref": "#/definitions/ColorDef", + "description": "Fill color of the marks. __Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color` property.\n\n_Note:_ The `fill` encoding has higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified." + }, + "fillOpacity": { + "$ref": "#/definitions/NumericMarkPropDef", + "description": "Fill opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `fillOpacity` property." + }, + "href": { + "anyOf": [ + { + "$ref": "#/definitions/StringFieldDefWithCondition" + }, + { + "$ref": "#/definitions/StringValueDefWithCondition" + } + ], + "description": "A URL to load upon mouse click." + }, + "key": { + "$ref": "#/definitions/FieldDefWithoutScale", + "description": "A data field to use as a unique key for data binding. When a visualization’s data is updated, the key value will be used to match data elements to existing mark instances. Use a key channel to enable object constancy for transitions over dynamic data." + }, + "latitude": { + "$ref": "#/definitions/LatLongDef", + "description": "Latitude position of geographically projected marks." + }, + "latitude2": { + "$ref": "#/definitions/Position2Def", + "description": "Latitude-2 position for geographically projected ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`." + }, + "longitude": { + "$ref": "#/definitions/LatLongDef", + "description": "Longitude position of geographically projected marks." + }, + "longitude2": { + "$ref": "#/definitions/Position2Def", + "description": "Longitude-2 position for geographically projected ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`." + }, + "opacity": { + "$ref": "#/definitions/NumericMarkPropDef", + "description": "Opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `opacity` property." + }, + "order": { + "anyOf": [ + { + "$ref": "#/definitions/OrderFieldDef" + }, + { + "items": { + "$ref": "#/definitions/OrderFieldDef" + }, + "type": "array" + }, + { + "$ref": "#/definitions/OrderValueDef" + }, + { + "$ref": "#/definitions/OrderOnlyDef" + } + ], + "description": "Order of the marks.\n- For stacked marks, this `order` channel encodes [stack order](https://vega.github.io/vega-lite/docs/stack.html#order).\n- For line and trail marks, this `order` channel encodes order of data points in the lines. This can be useful for creating [a connected scatterplot](https://vega.github.io/vega-lite/examples/connected_scatterplot.html). Setting `order` to `{\"value\": null}` makes the line marks use the original order in the data sources.\n- Otherwise, this `order` channel encodes layer order of the marks.\n\n__Note__: In aggregate plots, `order` field should be `aggregate`d to avoid creating additional aggregation grouping." + }, + "radius": { + "$ref": "#/definitions/PolarDef", + "description": "The outer radius in pixels of arc marks." + }, + "radius2": { + "$ref": "#/definitions/Position2Def", + "description": "The inner radius in pixels of arc marks." + }, + "shape": { + "$ref": "#/definitions/ShapeDef", + "description": "Shape of the mark.\n\n1. For `point` marks the supported values include: - plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`. - the line symbol `\"stroke\"` - centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n2. For `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. (`\"circle\"` if unset.)" + }, + "size": { + "$ref": "#/definitions/NumericMarkPropDef", + "description": "Size of the mark.\n- For `\"point\"`, `\"square\"` and `\"circle\"`, – the symbol size, or pixel area of the mark.\n- For `\"bar\"` and `\"tick\"` – the bar and tick's size.\n- For `\"text\"` – the text's font size.\n- Size is unsupported for `\"line\"`, `\"area\"`, and `\"rect\"`. (Use `\"trail\"` instead of line with varying size)" + }, + "stroke": { + "$ref": "#/definitions/ColorDef", + "description": "Stroke color of the marks. __Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color` property.\n\n_Note:_ The `stroke` encoding has higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified." + }, + "strokeDash": { + "$ref": "#/definitions/NumericArrayMarkPropDef", + "description": "Stroke dash of the marks.\n\n__Default value:__ `[1,0]` (No dash)." + }, + "strokeOpacity": { + "$ref": "#/definitions/NumericMarkPropDef", + "description": "Stroke opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeOpacity` property." + }, + "strokeWidth": { + "$ref": "#/definitions/NumericMarkPropDef", + "description": "Stroke width of the marks.\n\n__Default value:__ If undefined, the default stroke width depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeWidth` property." + }, + "text": { + "$ref": "#/definitions/TextDef", + "description": "Text of the `text` mark." + }, + "theta": { + "$ref": "#/definitions/PolarDef", + "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians." + }, + "theta2": { + "$ref": "#/definitions/Position2Def", + "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise." + }, + "tooltip": { + "anyOf": [ + { + "$ref": "#/definitions/StringFieldDefWithCondition" + }, + { + "$ref": "#/definitions/StringValueDefWithCondition" + }, + { + "items": { + "$ref": "#/definitions/StringFieldDef" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "The tooltip text to show upon mouse hover. Specifying `tooltip` encoding overrides [the `tooltip` property in the mark definition](https://vega.github.io/vega-lite/docs/mark.html#mark-def).\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite." + }, + "url": { + "anyOf": [ + { + "$ref": "#/definitions/StringFieldDefWithCondition" + }, + { + "$ref": "#/definitions/StringValueDefWithCondition" + } + ], + "description": "The URL of an image mark." + }, + "x": { + "$ref": "#/definitions/PositionDef", + "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot." + }, + "x2": { + "$ref": "#/definitions/Position2Def", + "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot." + }, + "xError": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/ValueDef" + } + ], + "description": "Error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + }, + "xError2": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/ValueDef" + } + ], + "description": "Secondary error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + }, + "xOffset": { + "$ref": "#/definitions/OffsetDef", + "description": "Offset of x-position of the marks" + }, + "y": { + "$ref": "#/definitions/PositionDef", + "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot." + }, + "y2": { + "$ref": "#/definitions/Position2Def", + "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot." + }, + "yError": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/ValueDef" + } + ], + "description": "Error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + }, + "yError2": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/ValueDef" + } + ], + "description": "Secondary error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + }, + "yOffset": { + "$ref": "#/definitions/OffsetDef", + "description": "Offset of y-position of the marks" + } + }, + "type": "object" + }, + "CompositeMark": { + "anyOf": [ + { + "$ref": "#/definitions/BoxPlot" + }, + { + "$ref": "#/definitions/ErrorBar" + }, + { + "$ref": "#/definitions/ErrorBand" + } + ] + }, + "CompositeMarkDef": { + "anyOf": [ + { + "$ref": "#/definitions/BoxPlotDef" + }, + { + "$ref": "#/definitions/ErrorBarDef" + }, + { + "$ref": "#/definitions/ErrorBandDef" + } + ] + }, + "CompositionConfig": { + "additionalProperties": false, + "properties": { + "columns": { + "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for:\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).", + "type": "number" + }, + "spacing": { + "description": "The default spacing in pixels between composed sub-views.\n\n__Default value__: `20`", + "type": "number" + } + }, + "type": "object" + }, + "ConditionalMarkPropFieldOrDatumDef": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate" + }, + { + "$ref": "#/definitions/ConditionalParameter" + } + ] + }, + "ConditionalMarkPropFieldOrDatumDef": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate>" + }, + { + "$ref": "#/definitions/ConditionalParameter>" + } + ] + }, + "ConditionalStringFieldDef": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate" + }, + { + "$ref": "#/definitions/ConditionalParameter" + } + ] + }, + "ConditionalValueDef<(Gradient|string|null|ExprRef)>": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate>" + }, + { + "$ref": "#/definitions/ConditionalParameter>" + } + ] + }, + "ConditionalValueDef<(Text|ExprRef)>": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate>" + }, + { + "$ref": "#/definitions/ConditionalParameter>" + } + ] + }, + "ConditionalValueDef<(number[]|ExprRef)>": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate>" + }, + { + "$ref": "#/definitions/ConditionalParameter>" + } + ] + }, + "ConditionalValueDef<(number|ExprRef)>": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate>" + }, + { + "$ref": "#/definitions/ConditionalParameter>" + } + ] + }, + "ConditionalValueDef<(string|ExprRef)>": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate>" + }, + { + "$ref": "#/definitions/ConditionalParameter>" + } + ] + }, + "ConditionalValueDef<(string|null|ExprRef)>": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate>" + }, + { + "$ref": "#/definitions/ConditionalParameter>" + } + ] + }, + "ConditionalValueDef": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate>" + }, + { + "$ref": "#/definitions/ConditionalParameter>" + } + ] + }, + "ConditionalAxisColor": { + "$ref": "#/definitions/ConditionalAxisProperty<(Color|null)>" + }, + "ConditionalAxisLabelAlign": { + "$ref": "#/definitions/ConditionalAxisProperty<(Align|null)>" + }, + "ConditionalAxisLabelBaseline": { + "$ref": "#/definitions/ConditionalAxisProperty<(TextBaseline|null)>" + }, + "ConditionalAxisLabelFontStyle": { + "$ref": "#/definitions/ConditionalAxisProperty<(FontStyle|null)>" + }, + "ConditionalAxisLabelFontWeight": { + "$ref": "#/definitions/ConditionalAxisProperty<(FontWeight|null)>" + }, + "ConditionalAxisNumber": { + "$ref": "#/definitions/ConditionalAxisProperty<(number|null)>" + }, + "ConditionalAxisNumberArray": { + "$ref": "#/definitions/ConditionalAxisProperty<(number[]|null)>" + }, + "ConditionalAxisProperty<(Align|null)>": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>" + }, + "type": "array" + } + ] + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/Align" + }, + { + "type": "null" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "condition", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>" + }, + "type": "array" + } + ] + }, + "expr": { + "description": "Vega expression (which can refer to Vega-Lite parameters).", + "type": "string" + } + }, + "required": [ + "condition", + "expr" + ], + "type": "object" + } + ] + }, + "ConditionalAxisProperty<(Color|null)>": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>" + }, + "type": "array" + } + ] + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "type": "null" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "condition", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>" + }, + "type": "array" + } + ] + }, + "expr": { + "description": "Vega expression (which can refer to Vega-Lite parameters).", + "type": "string" + } + }, + "required": [ + "condition", + "expr" + ], + "type": "object" + } + ] + }, + "ConditionalAxisProperty<(FontStyle|null)>": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>" + }, + "type": "array" + } + ] + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle" + }, + { + "type": "null" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "condition", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>" + }, + "type": "array" + } + ] + }, + "expr": { + "description": "Vega expression (which can refer to Vega-Lite parameters).", + "type": "string" + } + }, + "required": [ + "condition", + "expr" + ], + "type": "object" + } + ] + }, + "ConditionalAxisProperty<(FontWeight|null)>": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>" + }, + "type": "array" + } + ] + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight" + }, + { + "type": "null" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "condition", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>" + }, + "type": "array" + } + ] + }, + "expr": { + "description": "Vega expression (which can refer to Vega-Lite parameters).", + "type": "string" + } + }, + "required": [ + "condition", + "expr" + ], + "type": "object" + } + ] + }, + "ConditionalAxisProperty<(TextBaseline|null)>": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>" + }, + "type": "array" + } + ] + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline" + }, + { + "type": "null" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "condition", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>" + }, + "type": "array" + } + ] + }, + "expr": { + "description": "Vega expression (which can refer to Vega-Lite parameters).", + "type": "string" + } + }, + "required": [ + "condition", + "expr" + ], + "type": "object" + } + ] + }, + "ConditionalAxisProperty<(number[]|null)>": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>" + }, + "type": "array" + } + ] + }, + "value": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "condition", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>" + }, + "type": "array" + } + ] + }, + "expr": { + "description": "Vega expression (which can refer to Vega-Lite parameters).", + "type": "string" + } + }, + "required": [ + "condition", + "expr" + ], + "type": "object" + } + ] + }, + "ConditionalAxisProperty<(number|null)>": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>" + }, + "type": "array" + } + ] + }, + "value": { + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).", + "type": [ + "number", + "null" + ] + } + }, + "required": [ + "condition", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>" + }, + "type": "array" + } + ] + }, + "expr": { + "description": "Vega expression (which can refer to Vega-Lite parameters).", + "type": "string" + } + }, + "required": [ + "condition", + "expr" + ], + "type": "object" + } + ] + }, + "ConditionalAxisProperty<(string|null)>": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(string|null)>|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(string|null)>|ExprRef)>" + }, + "type": "array" + } + ] + }, + "value": { + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "condition", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(string|null)>|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalPredicate<(ValueDef<(string|null)>|ExprRef)>" + }, + "type": "array" + } + ] + }, + "expr": { + "description": "Vega expression (which can refer to Vega-Lite parameters).", + "type": "string" + } + }, + "required": [ + "condition", + "expr" + ], + "type": "object" + } + ] + }, + "ConditionalAxisString": { + "$ref": "#/definitions/ConditionalAxisProperty<(string|null)>" + }, + "ConditionalParameter": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "empty": { + "description": "For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "param": { + "$ref": "#/definitions/ParameterName", + "description": "Filter using a parameter name." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "required": [ + "param" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "empty": { + "description": "For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "param": { + "$ref": "#/definitions/ParameterName", + "description": "Filter using a parameter name." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "required": [ + "param" + ], + "type": "object" + } + ] + }, + "ConditionalParameter>": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "empty": { + "description": "For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "param": { + "$ref": "#/definitions/ParameterName", + "description": "Filter using a parameter name." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/TypeForShape", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "required": [ + "param" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "empty": { + "description": "For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "param": { + "$ref": "#/definitions/ParameterName", + "description": "Filter using a parameter name." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "required": [ + "param" + ], + "type": "object" + } + ] + }, + "ConditionalParameter": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "const": "binned", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "empty": { + "description": "For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "format": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/Dict" + } + ], + "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format." + }, + "formatType": { + "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.", + "type": "string" + }, + "param": { + "$ref": "#/definitions/ParameterName", + "description": "Filter using a parameter name." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "required": [ + "param" + ], + "type": "object" + }, + "ConditionalParameter>": { + "additionalProperties": false, + "properties": { + "empty": { + "description": "For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, + "param": { + "$ref": "#/definitions/ParameterName", + "description": "Filter using a parameter name." + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "string" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "param", + "value" + ], + "type": "object" + }, + "ConditionalParameter>": { + "additionalProperties": false, + "properties": { + "empty": { + "description": "For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, + "param": { + "$ref": "#/definitions/ParameterName", + "description": "Filter using a parameter name." + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "param", + "value" + ], + "type": "object" + }, + "ConditionalParameter>": { + "additionalProperties": false, + "properties": { + "empty": { + "description": "For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, + "param": { + "$ref": "#/definitions/ParameterName", + "description": "Filter using a parameter name." + }, + "value": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "param", + "value" + ], + "type": "object" + }, + "ConditionalParameter>": { + "additionalProperties": false, + "properties": { + "empty": { + "description": "For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, + "param": { + "$ref": "#/definitions/ParameterName", + "description": "Filter using a parameter name." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "param", + "value" + ], + "type": "object" + }, + "ConditionalParameter>": { + "additionalProperties": false, + "properties": { + "empty": { + "description": "For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, + "param": { + "$ref": "#/definitions/ParameterName", + "description": "Filter using a parameter name." + }, + "value": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "param", + "value" + ], + "type": "object" + }, + "ConditionalParameter>": { + "additionalProperties": false, + "properties": { + "empty": { + "description": "For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, + "param": { + "$ref": "#/definitions/ParameterName", + "description": "Filter using a parameter name." + }, + "value": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "param", + "value" + ], + "type": "object" + }, + "ConditionalParameter>": { + "additionalProperties": false, + "properties": { + "empty": { + "description": "For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, + "param": { + "$ref": "#/definitions/ParameterName", + "description": "Filter using a parameter name." + }, + "value": { + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).", + "type": "number" + } + }, + "required": [ + "param", + "value" + ], + "type": "object" + }, + "ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/Align" + }, + { + "type": "null" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "test", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "expr": { + "description": "Vega expression (which can refer to Vega-Lite parameters).", + "type": "string" + }, + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + } + }, + "required": [ + "expr", + "test" + ], + "type": "object" + } + ] + }, + "ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "type": "null" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "test", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "expr": { + "description": "Vega expression (which can refer to Vega-Lite parameters).", + "type": "string" + }, + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + } + }, + "required": [ + "expr", + "test" + ], + "type": "object" + } + ] + }, + "ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle" + }, + { + "type": "null" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "test", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "expr": { + "description": "Vega expression (which can refer to Vega-Lite parameters).", + "type": "string" + }, + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + } + }, + "required": [ + "expr", + "test" + ], + "type": "object" + } + ] + }, + "ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight" + }, + { + "type": "null" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "test", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "expr": { + "description": "Vega expression (which can refer to Vega-Lite parameters).", + "type": "string" + }, + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + } + }, + "required": [ + "expr", + "test" + ], + "type": "object" + } + ] + }, + "ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline" + }, + { + "type": "null" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "test", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "expr": { + "description": "Vega expression (which can refer to Vega-Lite parameters).", + "type": "string" + }, + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + } + }, + "required": [ + "expr", + "test" + ], + "type": "object" + } + ] + }, + "ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + }, + "value": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "test", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "expr": { + "description": "Vega expression (which can refer to Vega-Lite parameters).", + "type": "string" + }, + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + } + }, + "required": [ + "expr", + "test" + ], + "type": "object" + } + ] + }, + "ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + }, + "value": { + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).", + "type": [ + "number", + "null" + ] + } + }, + "required": [ + "test", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "expr": { + "description": "Vega expression (which can refer to Vega-Lite parameters).", + "type": "string" + }, + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + } + }, + "required": [ + "expr", + "test" + ], + "type": "object" + } + ] + }, + "ConditionalPredicate<(ValueDef<(string|null)>|ExprRef)>": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + }, + "value": { + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "test", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "expr": { + "description": "Vega expression (which can refer to Vega-Lite parameters).", + "type": "string" + }, + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + } + }, + "required": [ + "expr", + "test" + ], + "type": "object" + } + ] + }, + "ConditionalPredicate": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "required": [ + "test" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "required": [ + "test" + ], + "type": "object" + } + ] + }, + "ConditionalPredicate>": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/TypeForShape", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "required": [ + "test" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "required": [ + "test" + ], + "type": "object" + } + ] + }, + "ConditionalPredicate": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "const": "binned", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "format": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/Dict" + } + ], + "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format." + }, + "formatType": { + "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.", + "type": "string" + }, + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "required": [ + "test" + ], + "type": "object" + }, + "ConditionalPredicate>": { + "additionalProperties": false, + "properties": { + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "string" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "test", + "value" + ], + "type": "object" + }, + "ConditionalPredicate>": { + "additionalProperties": false, + "properties": { + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "test", + "value" + ], + "type": "object" + }, + "ConditionalPredicate>": { + "additionalProperties": false, + "properties": { + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + }, + "value": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "test", + "value" + ], + "type": "object" + }, + "ConditionalPredicate>": { + "additionalProperties": false, + "properties": { + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "test", + "value" + ], + "type": "object" + }, + "ConditionalPredicate>": { + "additionalProperties": false, + "properties": { + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + }, + "value": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "test", + "value" + ], + "type": "object" + }, + "ConditionalPredicate>": { + "additionalProperties": false, + "properties": { + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + }, + "value": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "test", + "value" + ], + "type": "object" + }, + "ConditionalPredicate>": { + "additionalProperties": false, + "properties": { + "test": { + "$ref": "#/definitions/PredicateComposition", + "description": "Predicate for triggering the condition" + }, + "value": { + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).", + "type": "number" + } + }, + "required": [ + "test", + "value" + ], + "type": "object" + }, + "Config": { + "additionalProperties": false, + "properties": { + "arc": { + "$ref": "#/definitions/RectConfig", + "description": "Arc-specific Config" + }, + "area": { + "$ref": "#/definitions/AreaConfig", + "description": "Area-Specific Config" + }, + "aria": { + "description": "A boolean flag indicating if ARIA default attributes should be included for marks and guides (SVG output only). If false, the `\"aria-hidden\"` attribute will be set for all guides, removing them from the ARIA accessibility tree and Vega-Lite will not generate default descriptions for marks.\n\n__Default value:__ `true`.", + "type": "boolean" + }, + "autosize": { + "anyOf": [ + { + "$ref": "#/definitions/AutosizeType" + }, + { + "$ref": "#/definitions/AutoSizeParams" + } + ], + "description": "How the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`" + }, + "axis": { + "$ref": "#/definitions/AxisConfig", + "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/AxisConfig", + "description": "Config for axes with \"band\" scales." + }, + "axisBottom": { + "$ref": "#/definitions/AxisConfig", + "description": "Config for x-axis along the bottom edge of the chart." + }, + "axisDiscrete": { + "$ref": "#/definitions/AxisConfig", + "description": "Config for axes with \"point\" or \"band\" scales." + }, + "axisLeft": { + "$ref": "#/definitions/AxisConfig", + "description": "Config for y-axis along the left edge of the chart." + }, + "axisPoint": { + "$ref": "#/definitions/AxisConfig", + "description": "Config for axes with \"point\" scales." + }, + "axisQuantitative": { + "$ref": "#/definitions/AxisConfig", + "description": "Config for quantitative axes." + }, + "axisRight": { + "$ref": "#/definitions/AxisConfig", + "description": "Config for y-axis along the right edge of the chart." + }, + "axisTemporal": { + "$ref": "#/definitions/AxisConfig", + "description": "Config for temporal axes." + }, + "axisTop": { + "$ref": "#/definitions/AxisConfig", + "description": "Config for x-axis along the top edge of the chart." + }, + "axisX": { + "$ref": "#/definitions/AxisConfig", + "description": "X-axis specific config." + }, + "axisXBand": { + "$ref": "#/definitions/AxisConfig", + "description": "Config for x-axes with \"band\" scales." + }, + "axisXDiscrete": { + "$ref": "#/definitions/AxisConfig", + "description": "Config for x-axes with \"point\" or \"band\" scales." + }, + "axisXPoint": { + "$ref": "#/definitions/AxisConfig", + "description": "Config for x-axes with \"point\" scales." + }, + "axisXQuantitative": { + "$ref": "#/definitions/AxisConfig", + "description": "Config for x-quantitative axes." + }, + "axisXTemporal": { + "$ref": "#/definitions/AxisConfig", + "description": "Config for x-temporal axes." + }, + "axisY": { + "$ref": "#/definitions/AxisConfig", + "description": "Y-axis specific config." + }, + "axisYBand": { + "$ref": "#/definitions/AxisConfig", + "description": "Config for y-axes with \"band\" scales." + }, + "axisYDiscrete": { + "$ref": "#/definitions/AxisConfig", + "description": "Config for y-axes with \"point\" or \"band\" scales." + }, + "axisYPoint": { + "$ref": "#/definitions/AxisConfig", + "description": "Config for y-axes with \"point\" scales." + }, + "axisYQuantitative": { + "$ref": "#/definitions/AxisConfig", + "description": "Config for y-quantitative axes." + }, + "axisYTemporal": { + "$ref": "#/definitions/AxisConfig", + "description": "Config for y-temporal axes." + }, + "background": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ `\"white\"`" + }, + "bar": { + "$ref": "#/definitions/BarConfig", + "description": "Bar-Specific Config" + }, + "boxplot": { + "$ref": "#/definitions/BoxPlotConfig", + "description": "Box Config" + }, + "circle": { + "$ref": "#/definitions/MarkConfig", + "description": "Circle-Specific Config" + }, + "concat": { + "$ref": "#/definitions/CompositionConfig", + "description": "Default configuration for all concatenation and repeat view composition operators (`concat`, `hconcat`, `vconcat`, and `repeat`)" + }, + "countTitle": { + "description": "Default axis and legend title for count fields.\n\n__Default value:__ `'Count of Records`.", + "type": "string" + }, + "customFormatTypes": { + "description": "Allow the `formatType` property for text marks and guides to accept a custom formatter function [registered as a Vega expression](https://vega.github.io/vega-lite/usage/compile.html#format-type).", + "type": "boolean" + }, + "errorband": { + "$ref": "#/definitions/ErrorBandConfig", + "description": "ErrorBand Config" + }, + "errorbar": { + "$ref": "#/definitions/ErrorBarConfig", + "description": "ErrorBar Config" + }, + "facet": { + "$ref": "#/definitions/CompositionConfig", + "description": "Default configuration for the `facet` view composition operator" + }, + "fieldTitle": { + "description": "Defines how Vega-Lite generates title for fields. There are three possible styles:\n- `\"verbal\"` (Default) - displays function in a verbal style (e.g., \"Sum of field\", \"Year-month of date\", \"field (binned)\").\n- `\"function\"` - displays function using parentheses and capitalized texts (e.g., \"SUM(field)\", \"YEARMONTH(date)\", \"BIN(field)\").\n- `\"plain\"` - displays only the field name without functions (e.g., \"field\", \"date\", \"field\").", + "enum": [ + "verbal", + "functional", + "plain" + ], + "type": "string" + }, + "font": { + "description": "Default font for all text marks, titles, and labels.", + "type": "string" + }, + "geoshape": { + "$ref": "#/definitions/MarkConfig", + "description": "Geoshape-Specific Config" + }, + "header": { + "$ref": "#/definitions/HeaderConfig", + "description": "Header configuration, which determines default properties for all [headers](https://vega.github.io/vega-lite/docs/header.html).\n\nFor a full list of header configuration options, please see the [corresponding section of in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config)." + }, + "headerColumn": { + "$ref": "#/definitions/HeaderConfig", + "description": "Header configuration, which determines default properties for column [headers](https://vega.github.io/vega-lite/docs/header.html).\n\nFor a full list of header configuration options, please see the [corresponding section of in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config)." + }, + "headerFacet": { + "$ref": "#/definitions/HeaderConfig", + "description": "Header configuration, which determines default properties for non-row/column facet [headers](https://vega.github.io/vega-lite/docs/header.html).\n\nFor a full list of header configuration options, please see the [corresponding section of in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config)." + }, + "headerRow": { + "$ref": "#/definitions/HeaderConfig", + "description": "Header configuration, which determines default properties for row [headers](https://vega.github.io/vega-lite/docs/header.html).\n\nFor a full list of header configuration options, please see the [corresponding section of in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config)." + }, + "image": { + "$ref": "#/definitions/RectConfig", + "description": "Image-specific Config" + }, + "legend": { + "$ref": "#/definitions/LegendConfig", + "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", + "description": "Line-Specific Config" + }, + "lineBreak": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property provides a global default for text marks, which is overridden by mark or style config settings, and by the lineBreak mark encoding channel. If signal-valued, either string or regular expression (regexp) values are valid." + }, + "locale": { + "$ref": "#/definitions/Locale", + "description": "Locale definitions for string parsing and formatting of number and date values. The locale object should contain `number` and/or `time` properties with [locale definitions](https://vega.github.io/vega/docs/api/locale/). Locale definitions provided in the config block may be overridden by the View constructor locale option." + }, + "mark": { + "$ref": "#/definitions/MarkConfig", + "description": "Mark Config" + }, + "normalizedNumberFormat": { + "description": "If normalizedNumberFormatType is not specified, D3 number format for axis labels, text marks, and tooltips of normalized stacked fields (fields with `stack: \"normalize\"`). For example `\"s\"` for SI units. Use [D3's number format pattern](https://github.com/d3/d3-format#locale_format).\n\nIf `config.normalizedNumberFormatType` is specified and `config.customFormatTypes` is `true`, this value will be passed as `format` alongside `datum.value` to the `config.numberFormatType` function. __Default value:__ `%`", + "type": "string" + }, + "normalizedNumberFormatType": { + "description": "[Custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type) for `config.normalizedNumberFormat`.\n\n__Default value:__ `undefined` -- This is equilvalent to call D3-format, which is exposed as [`format` in Vega-Expression](https://vega.github.io/vega/docs/expressions/#format). __Note:__ You must also set `customFormatTypes` to `true` to use this feature.", + "type": "string" + }, + "numberFormat": { + "description": "If numberFormatType is not specified, D3 number format for guide labels, text marks, and tooltips of non-normalized fields (fields *without* `stack: \"normalize\"`). For example `\"s\"` for SI units. Use [D3's number format pattern](https://github.com/d3/d3-format#locale_format).\n\nIf `config.numberFormatType` is specified and `config.customFormatTypes` is `true`, this value will be passed as `format` alongside `datum.value` to the `config.numberFormatType` function.", + "type": "string" + }, + "numberFormatType": { + "description": "[Custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type) for `config.numberFormat`.\n\n__Default value:__ `undefined` -- This is equilvalent to call D3-format, which is exposed as [`format` in Vega-Expression](https://vega.github.io/vega/docs/expressions/#format). __Note:__ You must also set `customFormatTypes` to `true` to use this feature.", + "type": "string" + }, + "padding": { + "anyOf": [ + { + "$ref": "#/definitions/Padding" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`" + }, + "params": { + "description": "Dynamic variables or selections that parameterize a visualization.", + "items": { + "$ref": "#/definitions/TopLevelParameter" + }, + "type": "array" + }, + "point": { + "$ref": "#/definitions/MarkConfig", + "description": "Point-Specific Config" + }, + "projection": { + "$ref": "#/definitions/ProjectionConfig", + "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. For 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/RectConfig", + "description": "Rect-Specific Config" + }, + "rule": { + "$ref": "#/definitions/MarkConfig", + "description": "Rule-Specific Config" + }, + "scale": { + "$ref": "#/definitions/ScaleConfig", + "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", + "description": "An object hash for defining default properties for each type of selections." + }, + "square": { + "$ref": "#/definitions/MarkConfig", + "description": "Square-Specific Config" + }, + "style": { + "$ref": "#/definitions/StyleConfigIndex", + "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/MarkConfig", + "description": "Text-Specific Config" + }, + "tick": { + "$ref": "#/definitions/TickConfig", + "description": "Tick-Specific Config" + }, + "timeFormat": { + "description": "Default time format for raw time values (without time units) in text marks, legend labels and header labels.\n\n__Default value:__ `\"%b %d, %Y\"` __Note:__ Axes automatically determine the format for each label automatically so this config does not affect axes.", + "type": "string" + }, + "timeFormatType": { + "description": "[Custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type) for `config.timeFormat`.\n\n__Default value:__ `undefined` -- This is equilvalent to call D3-time-format, which is exposed as [`timeFormat` in Vega-Expression](https://vega.github.io/vega/docs/expressions/#timeFormat). __Note:__ You must also set `customFormatTypes` to `true` and there must *not* be a `timeUnit` defined to use this feature.", + "type": "string" + }, + "title": { + "$ref": "#/definitions/TitleConfig", + "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)." + }, + "tooltipFormat": { + "$ref": "#/definitions/FormatConfig", + "description": "Define [custom format configuration](https://vega.github.io/vega-lite/docs/config.html#format) for tooltips. If unspecified, default format config will be applied." + }, + "trail": { + "$ref": "#/definitions/LineConfig", + "description": "Trail-Specific Config" + }, + "view": { + "$ref": "#/definitions/ViewConfig", + "description": "Default properties for [single view plots](https://vega.github.io/vega-lite/docs/spec.html#single)." + } + }, + "type": "object" + }, + "CsvDataFormat": { + "additionalProperties": false, + "properties": { + "parse": { + "anyOf": [ + { + "$ref": "#/definitions/Parse" + }, + { + "type": "null" + } + ], + "description": "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.\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). For 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\"`.\n\n__Default value:__ The default format type is determined by the extension of the file URL. If no extension is detected, `\"json\"` will be used by default.", + "enum": [ + "csv", + "tsv" + ], + "type": "string" + } + }, + "type": "object" + }, + "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", + "sw-resize", + "w-resize", + "ew-resize", + "ns-resize", + "nesw-resize", + "nwse-resize", + "col-resize", + "row-resize", + "all-scroll", + "zoom-in", + "zoom-out", + "grab", + "grabbing" + ], + "type": "string" + }, + "Cyclical": { + "enum": [ + "rainbow", + "sinebow" + ], + "type": "string" + }, + "Data": { + "anyOf": [ + { + "$ref": "#/definitions/DataSource" + }, + { + "$ref": "#/definitions/Generator" + } + ] + }, + "DataFormat": { + "anyOf": [ + { + "$ref": "#/definitions/CsvDataFormat" + }, + { + "$ref": "#/definitions/DsvDataFormat" + }, + { + "$ref": "#/definitions/JsonDataFormat" + }, + { + "$ref": "#/definitions/TopoDataFormat" + } + ] + }, + "DataSource": { + "anyOf": [ + { + "$ref": "#/definitions/UrlData" + }, + { + "$ref": "#/definitions/InlineData" + }, + { + "$ref": "#/definitions/NamedData" + } + ] + }, + "Datasets": { + "$ref": "#/definitions/Dict" + }, + "DateTime": { + "additionalProperties": false, + "description": "Object for defining datetime in Vega-Lite Filter. If both month and quarter are provided, month has higher precedence. `day` cannot be combined with other date. We accept string for month and day names.", + "properties": { + "date": { + "description": "Integer value representing the date (day of the month) from 1-31.", + "maximum": 31, + "minimum": 1, + "type": "number" + }, + "day": { + "anyOf": [ + { + "$ref": "#/definitions/Day" + }, + { + "type": "string" + } + ], + "description": "Value representing the day of a week. This can be one of: (1) integer value -- `1` represents Monday; (2) case-insensitive day name (e.g., `\"Monday\"`); (3) case-insensitive, 3-character short day name (e.g., `\"Mon\"`).\n\n**Warning:** A DateTime definition object with `day`** should not be combined with `year`, `quarter`, `month`, or `date`." + }, + "hours": { + "description": "Integer value representing the hour of a day from 0-23.", + "maximum": 24, + "minimum": 0, + "type": "number" + }, + "milliseconds": { + "description": "Integer value representing the millisecond segment of time.", + "maximum": 1000, + "minimum": 0, + "type": "number" + }, + "minutes": { + "description": "Integer value representing the minute segment of time from 0-59.", + "maximum": 60, + "minimum": 0, + "type": "number" + }, + "month": { + "anyOf": [ + { + "$ref": "#/definitions/Month" + }, + { + "type": "string" + } + ], + "description": "One of: (1) integer value representing the month from `1`-`12`. `1` represents January; (2) case-insensitive month name (e.g., `\"January\"`); (3) case-insensitive, 3-character short month name (e.g., `\"Jan\"`)." + }, + "quarter": { + "description": "Integer value representing the quarter of the year (from 1-4).", + "maximum": 4, + "minimum": 1, + "type": "number" + }, + "seconds": { + "description": "Integer value representing the second segment (0-59) of a time value", + "maximum": 60, + "minimum": 0, + "type": "number" + }, + "utc": { + "description": "A boolean flag indicating if date time is in utc time. If false, the date time is in local time", + "type": "boolean" + }, + "year": { + "description": "Integer value representing the year.", + "type": "number" + } + }, + "type": "object" + }, + "DatumDef": { + "additionalProperties": false, + "properties": { + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "Day": { + "maximum": 7, + "minimum": 1, + "type": "number" + }, + "DensityTransform": { + "additionalProperties": false, + "properties": { + "as": { + "description": "The output fields for the sample value and corresponding density estimate.\n\n__Default value:__ `[\"value\", \"density\"]`", + "items": { + "$ref": "#/definitions/FieldName" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "bandwidth": { + "description": "The bandwidth (standard deviation) of the Gaussian kernel. If unspecified or set to zero, the bandwidth value is automatically estimated from the input data using Scott’s rule.", + "type": "number" + }, + "counts": { + "description": "A boolean flag indicating if the output values should be probability estimates (false) or smoothed counts (true).\n\n__Default value:__ `false`", + "type": "boolean" + }, + "cumulative": { + "description": "A boolean flag indicating whether to produce density estimates (false) or cumulative density estimates (true).\n\n__Default value:__ `false`", + "type": "boolean" + }, + "density": { + "$ref": "#/definitions/FieldName", + "description": "The data field for which to perform density estimation." + }, + "extent": { + "description": "A [min, max] domain from which to sample the distribution. If unspecified, the extent will be determined by the observed minimum and maximum values of the density value field.", + "items": { + "type": "number" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "groupby": { + "description": "The data fields to group by. If not specified, a single group containing all data objects will be used.", + "items": { + "$ref": "#/definitions/FieldName" + }, + "type": "array" + }, + "maxsteps": { + "description": "The maximum number of samples to take along the extent domain for plotting the density.\n\n__Default value:__ `200`", + "type": "number" + }, + "minsteps": { + "description": "The minimum number of samples to take along the extent domain for plotting the density.\n\n__Default value:__ `25`", + "type": "number" + }, + "resolve": { + "description": "Indicates how parameters for multiple densities should be resolved. If `\"independent\"`, each density may have its own domain extent and dynamic number of curve sample steps. If `\"shared\"`, the KDE transform will ensure that all densities are defined over a shared domain and curve steps, enabling stacking.\n\n__Default value:__ `\"shared\"`", + "enum": [ + "independent", + "shared" + ], + "type": "string" + }, + "steps": { + "description": "The exact number of samples to take along the extent domain for plotting the density. If specified, overrides both minsteps and maxsteps to set an exact number of uniform samples. Potentially useful in conjunction with a fixed extent to ensure consistent sample points for stacked densities.", + "type": "number" + } + }, + "required": [ + "density" + ], + "type": "object" + }, + "DerivedStream": { + "additionalProperties": false, + "properties": { + "between": { + "items": { + "$ref": "#/definitions/Stream" + }, + "type": "array" + }, + "consume": { + "type": "boolean" + }, + "debounce": { + "type": "number" + }, + "filter": { + "anyOf": [ + { + "$ref": "#/definitions/Expr" + }, + { + "items": { + "$ref": "#/definitions/Expr" + }, + "type": "array" + } + ] + }, + "markname": { + "type": "string" + }, + "marktype": { + "$ref": "#/definitions/MarkType" + }, + "stream": { + "$ref": "#/definitions/Stream" + }, + "throttle": { + "type": "number" + } + }, + "required": [ + "stream" + ], + "type": "object" + }, + "Dict": { + "additionalProperties": { + "$ref": "#/definitions/InlineDataset" + }, + "type": "object" + }, + "Dict": { + "additionalProperties": { + "$ref": "#/definitions/SelectionInit" + }, + "type": "object" + }, + "Dict": { + "additionalProperties": { + "$ref": "#/definitions/SelectionInitInterval" + }, + "type": "object" + }, + "Dict": { + "additionalProperties": {}, + "type": "object" + }, + "Diverging": { + "enum": [ + "blueorange", + "blueorange-3", + "blueorange-4", + "blueorange-5", + "blueorange-6", + "blueorange-7", + "blueorange-8", + "blueorange-9", + "blueorange-10", + "blueorange-11", + "brownbluegreen", + "brownbluegreen-3", + "brownbluegreen-4", + "brownbluegreen-5", + "brownbluegreen-6", + "brownbluegreen-7", + "brownbluegreen-8", + "brownbluegreen-9", + "brownbluegreen-10", + "brownbluegreen-11", + "purplegreen", + "purplegreen-3", + "purplegreen-4", + "purplegreen-5", + "purplegreen-6", + "purplegreen-7", + "purplegreen-8", + "purplegreen-9", + "purplegreen-10", + "purplegreen-11", + "pinkyellowgreen", + "pinkyellowgreen-3", + "pinkyellowgreen-4", + "pinkyellowgreen-5", + "pinkyellowgreen-6", + "pinkyellowgreen-7", + "pinkyellowgreen-8", + "pinkyellowgreen-9", + "pinkyellowgreen-10", + "pinkyellowgreen-11", + "purpleorange", + "purpleorange-3", + "purpleorange-4", + "purpleorange-5", + "purpleorange-6", + "purpleorange-7", + "purpleorange-8", + "purpleorange-9", + "purpleorange-10", + "purpleorange-11", + "redblue", + "redblue-3", + "redblue-4", + "redblue-5", + "redblue-6", + "redblue-7", + "redblue-8", + "redblue-9", + "redblue-10", + "redblue-11", + "redgrey", + "redgrey-3", + "redgrey-4", + "redgrey-5", + "redgrey-6", + "redgrey-7", + "redgrey-8", + "redgrey-9", + "redgrey-10", + "redgrey-11", + "redyellowblue", + "redyellowblue-3", + "redyellowblue-4", + "redyellowblue-5", + "redyellowblue-6", + "redyellowblue-7", + "redyellowblue-8", + "redyellowblue-9", + "redyellowblue-10", + "redyellowblue-11", + "redyellowgreen", + "redyellowgreen-3", + "redyellowgreen-4", + "redyellowgreen-5", + "redyellowgreen-6", + "redyellowgreen-7", + "redyellowgreen-8", + "redyellowgreen-9", + "redyellowgreen-10", + "redyellowgreen-11", + "spectral", + "spectral-3", + "spectral-4", + "spectral-5", + "spectral-6", + "spectral-7", + "spectral-8", + "spectral-9", + "spectral-10", + "spectral-11" + ], + "type": "string" + }, + "DomainUnionWith": { + "additionalProperties": false, + "properties": { + "unionWith": { + "description": "Customized domain values to be union with the field's values or explicitly defined domain. Should be an array of valid scale domain values.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "$ref": "#/definitions/DateTime" + } + ] + }, + "type": "array" + } + }, + "required": [ + "unionWith" + ], + "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": [ + { + "$ref": "#/definitions/Parse" + }, + { + "type": "null" + } + ], + "description": "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.\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). For 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": { + "const": "dsv", + "description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\n\n__Default value:__ 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": "string" + } + }, + "required": [ + "delimiter" + ], + "type": "object" + }, + "Element": { + "type": "string" + }, + "EncodingSortField": { + "additionalProperties": false, + "description": "A sort definition for sorting a discrete scale in an encoding field definition.", + "properties": { + "field": { + "$ref": "#/definitions/Field", + "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/NonArgAggregateOp", + "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\"`). An aggregation is required when there are multiple values of the sort field for each encoded data field. The 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).\n\n__Default value:__ `\"sum\"` for stacked plots. Otherwise, `\"min\"`." + }, + "order": { + "anyOf": [ + { + "$ref": "#/definitions/SortOrder" + }, + { + "type": "null" + } + ], + "description": "The sort order. One of `\"ascending\"` (default), `\"descending\"`, or `null` (no not sort)." + } + }, + "type": "object" + }, + "ErrorBand": { + "const": "errorband", + "type": "string" + }, + "ErrorBandConfig": { + "additionalProperties": false, + "properties": { + "band": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/AnyMarkConfig" + } + ] + }, + "borders": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/AnyMarkConfig" + } + ] + }, + "extent": { + "$ref": "#/definitions/ErrorBarExtent", + "description": "The extent of the band. Available options include:\n- `\"ci\"`: Extend the band to the confidence interval of the mean.\n- `\"stderr\"`: The size of band are set to the value of standard error, extending from the mean.\n- `\"stdev\"`: The size of band are set to the value of standard deviation, extending from the mean.\n- `\"iqr\"`: Extend the band to the q1 and q3.\n\n__Default value:__ `\"stderr\"`." + }, + "interpolate": { + "$ref": "#/definitions/Interpolate", + "description": "The line interpolation method for the error band. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes at the midpoint of each pair of adjacent x-values.\n- `\"step-before\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes before the x-value.\n- `\"step-after\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes after the x-value.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y." + }, + "tension": { + "description": "The tension parameter for the interpolation type of the error band.", + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "type": "object" + }, + "ErrorBandDef": { + "additionalProperties": false, + "properties": { + "band": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/AnyMarkConfig" + } + ] + }, + "borders": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/AnyMarkConfig" + } + ] + }, + "clip": { + "description": "Whether a composite mark be clipped to the enclosing group’s width and height.", + "type": "boolean" + }, + "color": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default color.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`." + }, + "extent": { + "$ref": "#/definitions/ErrorBarExtent", + "description": "The extent of the band. Available options include:\n- `\"ci\"`: Extend the band to the confidence interval of the mean.\n- `\"stderr\"`: The size of band are set to the value of standard error, extending from the mean.\n- `\"stdev\"`: The size of band are set to the value of standard deviation, extending from the mean.\n- `\"iqr\"`: Extend the band to the q1 and q3.\n\n__Default value:__ `\"stderr\"`." + }, + "interpolate": { + "$ref": "#/definitions/Interpolate", + "description": "The line interpolation method for the error band. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes at the midpoint of each pair of adjacent x-values.\n- `\"step-before\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes before the x-value.\n- `\"step-after\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes after the x-value.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y." + }, + "opacity": { + "description": "The opacity (value between [0,1]) of the mark.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "orient": { + "$ref": "#/definitions/Orientation", + "description": "Orientation of the error band. This is normally automatically determined, but can be specified when the orientation is ambiguous and cannot be automatically determined." + }, + "tension": { + "description": "The tension parameter for the interpolation type of the error band.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "type": { + "$ref": "#/definitions/ErrorBand", + "description": "The mark type. This could a primitive mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`, `\"area\"`, `\"point\"`, `\"geoshape\"`, `\"rule\"`, and `\"text\"`) or a composite mark type (`\"boxplot\"`, `\"errorband\"`, `\"errorbar\"`)." + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "ErrorBar": { + "const": "errorbar", + "type": "string" + }, + "ErrorBarConfig": { + "additionalProperties": false, + "properties": { + "extent": { + "$ref": "#/definitions/ErrorBarExtent", + "description": "The extent of the rule. Available options include:\n- `\"ci\"`: Extend the rule to the confidence interval of the mean.\n- `\"stderr\"`: The size of rule are set to the value of standard error, extending from the mean.\n- `\"stdev\"`: The size of rule are set to the value of standard deviation, extending from the mean.\n- `\"iqr\"`: Extend the rule to the q1 and q3.\n\n__Default value:__ `\"stderr\"`." + }, + "rule": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/AnyMarkConfig" + } + ] + }, + "size": { + "description": "Size of the ticks of an error bar", + "type": "number" + }, + "thickness": { + "description": "Thickness of the ticks and the bar of an error bar", + "type": "number" + }, + "ticks": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/AnyMarkConfig" + } + ] + } + }, + "type": "object" + }, + "ErrorBarDef": { + "additionalProperties": false, + "properties": { + "clip": { + "description": "Whether a composite mark be clipped to the enclosing group’s width and height.", + "type": "boolean" + }, + "color": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default color.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`." + }, + "extent": { + "$ref": "#/definitions/ErrorBarExtent", + "description": "The extent of the rule. Available options include:\n- `\"ci\"`: Extend the rule to the confidence interval of the mean.\n- `\"stderr\"`: The size of rule are set to the value of standard error, extending from the mean.\n- `\"stdev\"`: The size of rule are set to the value of standard deviation, extending from the mean.\n- `\"iqr\"`: Extend the rule to the q1 and q3.\n\n__Default value:__ `\"stderr\"`." + }, + "opacity": { + "description": "The opacity (value between [0,1]) of the mark.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "orient": { + "$ref": "#/definitions/Orientation", + "description": "Orientation of the error bar. This is normally automatically determined, but can be specified when the orientation is ambiguous and cannot be automatically determined." + }, + "rule": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/AnyMarkConfig" + } + ] + }, + "size": { + "description": "Size of the ticks of an error bar", + "type": "number" + }, + "thickness": { + "description": "Thickness of the ticks and the bar of an error bar", + "type": "number" + }, + "ticks": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/AnyMarkConfig" + } + ] + }, + "type": { + "$ref": "#/definitions/ErrorBar", + "description": "The mark type. This could a primitive mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`, `\"area\"`, `\"point\"`, `\"geoshape\"`, `\"rule\"`, and `\"text\"`) or a composite mark type (`\"boxplot\"`, `\"errorband\"`, `\"errorbar\"`)." + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "ErrorBarExtent": { + "enum": [ + "ci", + "iqr", + "stderr", + "stdev" + ], + "type": "string" + }, + "EventStream": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "between": { + "items": { + "$ref": "#/definitions/Stream" + }, + "type": "array" + }, + "consume": { + "type": "boolean" + }, + "debounce": { + "type": "number" + }, + "filter": { + "anyOf": [ + { + "$ref": "#/definitions/Expr" + }, + { + "items": { + "$ref": "#/definitions/Expr" + }, + "type": "array" + } + ] + }, + "markname": { + "type": "string" + }, + "marktype": { + "$ref": "#/definitions/MarkType" + }, + "source": { + "enum": [ + "view", + "scope" + ], + "type": "string" + }, + "throttle": { + "type": "number" + }, + "type": { + "$ref": "#/definitions/EventType" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "between": { + "items": { + "$ref": "#/definitions/Stream" + }, + "type": "array" + }, + "consume": { + "type": "boolean" + }, + "debounce": { + "type": "number" + }, + "filter": { + "anyOf": [ + { + "$ref": "#/definitions/Expr" + }, + { + "items": { + "$ref": "#/definitions/Expr" + }, + "type": "array" + } + ] + }, + "markname": { + "type": "string" + }, + "marktype": { + "$ref": "#/definitions/MarkType" + }, + "source": { + "const": "window", + "type": "string" + }, + "throttle": { + "type": "number" + }, + "type": { + "$ref": "#/definitions/WindowEventType" + } + }, + "required": [ + "source", + "type" + ], + "type": "object" + } + ] + }, + "EventType": { + "enum": [ + "click", + "dblclick", + "dragenter", + "dragleave", + "dragover", + "keydown", + "keypress", + "keyup", + "mousedown", + "mousemove", + "mouseout", + "mouseover", + "mouseup", + "mousewheel", + "pointerdown", + "pointermove", + "pointerout", + "pointerover", + "pointerup", + "timer", + "touchend", + "touchmove", + "touchstart", + "wheel" + ], + "type": "string" + }, + "Expr": { + "type": "string" + }, + "ExprRef": { + "additionalProperties": false, + "properties": { + "expr": { + "description": "Vega expression (which can refer to Vega-Lite parameters).", + "type": "string" + } + }, + "required": [ + "expr" + ], + "type": "object" + }, + "ExtentTransform": { + "additionalProperties": false, + "properties": { + "extent": { + "$ref": "#/definitions/FieldName", + "description": "The field of which to get the extent." + }, + "param": { + "$ref": "#/definitions/ParameterName", + "description": "The output parameter produced by the extent transform." + } + }, + "required": [ + "extent", + "param" + ], + "type": "object" + }, + "FacetEncodingFieldDef": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "align": { + "anyOf": [ + { + "$ref": "#/definitions/LayoutAlign" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\n- For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\n- For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "bounds": { + "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`", + "enum": [ + "full", + "flush" + ], + "type": "string" + }, + "center": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`" + }, + "columns": { + "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for:\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).", + "type": "number" + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "header": { + "anyOf": [ + { + "$ref": "#/definitions/Header" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of a facet's header." + }, + "sort": { + "anyOf": [ + { + "$ref": "#/definitions/SortArray" + }, + { + "$ref": "#/definitions/SortOrder" + }, + { + "$ref": "#/definitions/EncodingSortField" + }, + { + "type": "null" + } + ], + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` is not supported for `row` and `column`." + }, + "spacing": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)" + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "FacetFieldDef": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "header": { + "anyOf": [ + { + "$ref": "#/definitions/Header" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of a facet's header." + }, + "sort": { + "anyOf": [ + { + "$ref": "#/definitions/SortArray" + }, + { + "$ref": "#/definitions/SortOrder" + }, + { + "$ref": "#/definitions/EncodingSortField" + }, + { + "type": "null" + } + ], + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` is not supported for `row` and `column`." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "FacetMapping": { + "additionalProperties": false, + "properties": { + "column": { + "$ref": "#/definitions/FacetFieldDef", + "description": "A field definition for the horizontal facet of trellis plots." + }, + "row": { + "$ref": "#/definitions/FacetFieldDef", + "description": "A field definition for the vertical facet of trellis plots." + } + }, + "type": "object" + }, + "FacetedEncoding": { + "additionalProperties": false, + "properties": { + "angle": { + "$ref": "#/definitions/NumericMarkPropDef", + "description": "Rotation angle of point and text marks." + }, + "color": { + "$ref": "#/definitions/ColorDef", + "description": "Color of the marks – either fill or stroke color based on the `filled` property of mark definition. By default, `color` represents fill color for `\"area\"`, `\"bar\"`, `\"tick\"`, `\"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-config)'s `color` property.\n\n_Note:_ 1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. The `fill` or `stroke` encodings have higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified. 2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme)." + }, + "column": { + "$ref": "#/definitions/RowColumnEncodingFieldDef", + "description": "A field definition for the horizontal facet of trellis plots." + }, + "description": { + "anyOf": [ + { + "$ref": "#/definitions/StringFieldDefWithCondition" + }, + { + "$ref": "#/definitions/StringValueDefWithCondition" + } + ], + "description": "A text description of this mark for ARIA accessibility (SVG output only). For SVG output the `\"aria-label\"` attribute will be set to this description." + }, + "detail": { + "anyOf": [ + { + "$ref": "#/definitions/FieldDefWithoutScale" + }, + { + "items": { + "$ref": "#/definitions/FieldDefWithoutScale" + }, + "type": "array" + } + ], + "description": "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." + }, + "facet": { + "$ref": "#/definitions/FacetEncodingFieldDef", + "description": "A field definition for the (flexible) facet of trellis plots.\n\nIf either `row` or `column` is specified, this channel will be ignored." + }, + "fill": { + "$ref": "#/definitions/ColorDef", + "description": "Fill color of the marks. __Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color` property.\n\n_Note:_ The `fill` encoding has higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified." + }, + "fillOpacity": { + "$ref": "#/definitions/NumericMarkPropDef", + "description": "Fill opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `fillOpacity` property." + }, + "href": { + "anyOf": [ + { + "$ref": "#/definitions/StringFieldDefWithCondition" + }, + { + "$ref": "#/definitions/StringValueDefWithCondition" + } + ], + "description": "A URL to load upon mouse click." + }, + "key": { + "$ref": "#/definitions/FieldDefWithoutScale", + "description": "A data field to use as a unique key for data binding. When a visualization’s data is updated, the key value will be used to match data elements to existing mark instances. Use a key channel to enable object constancy for transitions over dynamic data." + }, + "latitude": { + "$ref": "#/definitions/LatLongDef", + "description": "Latitude position of geographically projected marks." + }, + "latitude2": { + "$ref": "#/definitions/Position2Def", + "description": "Latitude-2 position for geographically projected ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`." + }, + "longitude": { + "$ref": "#/definitions/LatLongDef", + "description": "Longitude position of geographically projected marks." + }, + "longitude2": { + "$ref": "#/definitions/Position2Def", + "description": "Longitude-2 position for geographically projected ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`." + }, + "opacity": { + "$ref": "#/definitions/NumericMarkPropDef", + "description": "Opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `opacity` property." + }, + "order": { + "anyOf": [ + { + "$ref": "#/definitions/OrderFieldDef" + }, + { + "items": { + "$ref": "#/definitions/OrderFieldDef" + }, + "type": "array" + }, + { + "$ref": "#/definitions/OrderValueDef" + }, + { + "$ref": "#/definitions/OrderOnlyDef" + } + ], + "description": "Order of the marks.\n- For stacked marks, this `order` channel encodes [stack order](https://vega.github.io/vega-lite/docs/stack.html#order).\n- For line and trail marks, this `order` channel encodes order of data points in the lines. This can be useful for creating [a connected scatterplot](https://vega.github.io/vega-lite/examples/connected_scatterplot.html). Setting `order` to `{\"value\": null}` makes the line marks use the original order in the data sources.\n- Otherwise, this `order` channel encodes layer order of the marks.\n\n__Note__: In aggregate plots, `order` field should be `aggregate`d to avoid creating additional aggregation grouping." + }, + "radius": { + "$ref": "#/definitions/PolarDef", + "description": "The outer radius in pixels of arc marks." + }, + "radius2": { + "$ref": "#/definitions/Position2Def", + "description": "The inner radius in pixels of arc marks." + }, + "row": { + "$ref": "#/definitions/RowColumnEncodingFieldDef", + "description": "A field definition for the vertical facet of trellis plots." + }, + "shape": { + "$ref": "#/definitions/ShapeDef", + "description": "Shape of the mark.\n\n1. For `point` marks the supported values include: - plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`. - the line symbol `\"stroke\"` - centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n2. For `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. (`\"circle\"` if unset.)" + }, + "size": { + "$ref": "#/definitions/NumericMarkPropDef", + "description": "Size of the mark.\n- For `\"point\"`, `\"square\"` and `\"circle\"`, – the symbol size, or pixel area of the mark.\n- For `\"bar\"` and `\"tick\"` – the bar and tick's size.\n- For `\"text\"` – the text's font size.\n- Size is unsupported for `\"line\"`, `\"area\"`, and `\"rect\"`. (Use `\"trail\"` instead of line with varying size)" + }, + "stroke": { + "$ref": "#/definitions/ColorDef", + "description": "Stroke color of the marks. __Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color` property.\n\n_Note:_ The `stroke` encoding has higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified." + }, + "strokeDash": { + "$ref": "#/definitions/NumericArrayMarkPropDef", + "description": "Stroke dash of the marks.\n\n__Default value:__ `[1,0]` (No dash)." + }, + "strokeOpacity": { + "$ref": "#/definitions/NumericMarkPropDef", + "description": "Stroke opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeOpacity` property." + }, + "strokeWidth": { + "$ref": "#/definitions/NumericMarkPropDef", + "description": "Stroke width of the marks.\n\n__Default value:__ If undefined, the default stroke width depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeWidth` property." + }, + "text": { + "$ref": "#/definitions/TextDef", + "description": "Text of the `text` mark." + }, + "theta": { + "$ref": "#/definitions/PolarDef", + "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians." + }, + "theta2": { + "$ref": "#/definitions/Position2Def", + "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise." + }, + "tooltip": { + "anyOf": [ + { + "$ref": "#/definitions/StringFieldDefWithCondition" + }, + { + "$ref": "#/definitions/StringValueDefWithCondition" + }, + { + "items": { + "$ref": "#/definitions/StringFieldDef" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "The tooltip text to show upon mouse hover. Specifying `tooltip` encoding overrides [the `tooltip` property in the mark definition](https://vega.github.io/vega-lite/docs/mark.html#mark-def).\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite." + }, + "url": { + "anyOf": [ + { + "$ref": "#/definitions/StringFieldDefWithCondition" + }, + { + "$ref": "#/definitions/StringValueDefWithCondition" + } + ], + "description": "The URL of an image mark." + }, + "x": { + "$ref": "#/definitions/PositionDef", + "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot." + }, + "x2": { + "$ref": "#/definitions/Position2Def", + "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot." + }, + "xError": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/ValueDef" + } + ], + "description": "Error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + }, + "xError2": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/ValueDef" + } + ], + "description": "Secondary error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + }, + "xOffset": { + "$ref": "#/definitions/OffsetDef", + "description": "Offset of x-position of the marks" + }, + "y": { + "$ref": "#/definitions/PositionDef", + "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot." + }, + "y2": { + "$ref": "#/definitions/Position2Def", + "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot." + }, + "yError": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/ValueDef" + } + ], + "description": "Error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + }, + "yError2": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/ValueDef" + } + ], + "description": "Secondary error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + }, + "yOffset": { + "$ref": "#/definitions/OffsetDef", + "description": "Offset of y-position of the marks" + } + }, + "type": "object" + }, + "FacetedUnitSpec": { + "additionalProperties": false, + "description": "Unit spec that can have a composite mark and row or column channels (shorthand for a facet spec).", + "properties": { + "align": { + "anyOf": [ + { + "$ref": "#/definitions/LayoutAlign" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\n- For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\n- For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`." + }, + "bounds": { + "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`", + "enum": [ + "full", + "flush" + ], + "type": "string" + }, + "center": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`" + }, + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Data" + }, + { + "type": "null" + } + ], + "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent." + }, + "description": { + "description": "Description of this mark for commenting purpose.", + "type": "string" + }, + "encoding": { + "$ref": "#/definitions/FacetedEncoding", + "description": "A key-value mapping between encoding channels and definition of fields." + }, + "height": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "container", + "type": "string" + }, + { + "$ref": "#/definitions/Step" + } + ], + "description": "The height of a visualization.\n\n- For a plot with a continuous y-field, height should be a number.\n- For a plot with either a discrete y-field or no y-field, height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step. (No y-field is equivalent to having one discrete step.)\n- To enable responsive sizing on height, it should be set to `\"container\"`.\n\n__Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous y-field and `config.view.discreteHeight` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view and the `\"container\"` option cannot be used.\n\n__See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation." + }, + "mark": { + "$ref": "#/definitions/AnyMark", + "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`, `\"area\"`, `\"point\"`, `\"rule\"`, `\"geoshape\"`, and `\"text\"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def)." + }, + "name": { + "description": "Name of the visualization for later reference.", + "type": "string" + }, + "params": { + "description": "An array of parameters that may either be simple variables, or more complex selections that map user input to data queries.", + "items": { + "$ref": "#/definitions/SelectionParameter" + }, + "type": "array" + }, + "projection": { + "$ref": "#/definitions/Projection", + "description": "An object defining properties of geographic projection, which will be applied to `shape` path for `\"geoshape\"` marks and to `latitude` and `\"longitude\"` channels for other marks." + }, + "resolve": { + "$ref": "#/definitions/Resolve", + "description": "Scale, axis, and legend resolutions for view composition specifications." + }, + "spacing": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)" + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/TitleParams" + } + ], + "description": "Title for the plot." + }, + "transform": { + "description": "An array of data transformations such as filter and new field calculation.", + "items": { + "$ref": "#/definitions/Transform" + }, + "type": "array" + }, + "view": { + "$ref": "#/definitions/ViewBackground", + "description": "An object defining the view background's fill and stroke.\n\n__Default value:__ none (transparent)" + }, + "width": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "container", + "type": "string" + }, + { + "$ref": "#/definitions/Step" + } + ], + "description": "The width of a visualization.\n\n- For a plot with a continuous x-field, width should be a number.\n- For a plot with either a discrete x-field or no x-field, width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step. (No x-field is equivalent to having one discrete step.)\n- To enable responsive sizing on width, it should be set to `\"container\"`.\n\n__Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous x-field and `config.view.discreteWidth` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view and the `\"container\"` option cannot be used.\n\n__See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation." + } + }, + "required": [ + "mark" + ], + "type": "object" + }, + "Feature": { + "additionalProperties": false, + "description": "A feature object which contains a geometry and associated properties. https://tools.ietf.org/html/rfc7946#section-3.2", + "properties": { + "bbox": { + "$ref": "#/definitions/BBox", + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. https://tools.ietf.org/html/rfc7946#section-5" + }, + "geometry": { + "$ref": "#/definitions/Geometry", + "description": "The feature's geometry" + }, + "id": { + "description": "A value that uniquely identifies this feature in a https://tools.ietf.org/html/rfc7946#section-3.2.", + "type": [ + "string", + "number" + ] + }, + "properties": { + "$ref": "#/definitions/GeoJsonProperties", + "description": "Properties associated with this feature." + }, + "type": { + "const": "Feature", + "description": "Specifies the type of GeoJSON object.", + "type": "string" + } + }, + "required": [ + "geometry", + "properties", + "type" + ], + "type": "object" + }, + "Feature": { + "additionalProperties": false, + "description": "A feature object which contains a geometry and associated properties. https://tools.ietf.org/html/rfc7946#section-3.2", + "properties": { + "bbox": { + "$ref": "#/definitions/BBox", + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. https://tools.ietf.org/html/rfc7946#section-5" + }, + "geometry": { + "$ref": "#/definitions/Geometry", + "description": "The feature's geometry" + }, + "id": { + "description": "A value that uniquely identifies this feature in a https://tools.ietf.org/html/rfc7946#section-3.2.", + "type": [ + "string", + "number" + ] + }, + "properties": { + "$ref": "#/definitions/GeoJsonProperties", + "description": "Properties associated with this feature." + }, + "type": { + "const": "Feature", + "description": "Specifies the type of GeoJSON object.", + "type": "string" + } + }, + "required": [ + "geometry", + "properties", + "type" + ], + "type": "object" + }, + "FeatureCollection": { + "additionalProperties": false, + "description": "A collection of feature objects. https://tools.ietf.org/html/rfc7946#section-3.3", + "properties": { + "bbox": { + "$ref": "#/definitions/BBox", + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. https://tools.ietf.org/html/rfc7946#section-5" + }, + "features": { + "items": { + "$ref": "#/definitions/Feature" + }, + "type": "array" + }, + "type": { + "const": "FeatureCollection", + "description": "Specifies the type of GeoJSON object.", + "type": "string" + } + }, + "required": [ + "features", + "type" + ], + "type": "object" + }, + "Field": { + "anyOf": [ + { + "$ref": "#/definitions/FieldName" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ] + }, + "FieldDefWithoutScale": { + "$ref": "#/definitions/TypedFieldDef", + "description": "Field Def without scale (and without bin: \"binned\" support)." + }, + "FieldEqualPredicate": { + "additionalProperties": false, + "properties": { + "equal": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The value that the field should be equal to." + }, + "field": { + "$ref": "#/definitions/FieldName", + "description": "Field to be tested." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit for the field to be tested." + } + }, + "required": [ + "equal", + "field" + ], + "type": "object" + }, + "FieldGTEPredicate": { + "additionalProperties": false, + "properties": { + "field": { + "$ref": "#/definitions/FieldName", + "description": "Field to be tested." + }, + "gte": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The value that the field should be greater than or equals to." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit for the field to be tested." + } + }, + "required": [ + "field", + "gte" + ], + "type": "object" + }, + "FieldGTPredicate": { + "additionalProperties": false, + "properties": { + "field": { + "$ref": "#/definitions/FieldName", + "description": "Field to be tested." + }, + "gt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The value that the field should be greater than." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit for the field to be tested." + } + }, + "required": [ + "field", + "gt" + ], + "type": "object" + }, + "FieldLTEPredicate": { + "additionalProperties": false, + "properties": { + "field": { + "$ref": "#/definitions/FieldName", + "description": "Field to be tested." + }, + "lte": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The value that the field should be less than or equals to." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit for the field to be tested." + } + }, + "required": [ + "field", + "lte" + ], + "type": "object" + }, + "FieldLTPredicate": { + "additionalProperties": false, + "properties": { + "field": { + "$ref": "#/definitions/FieldName", + "description": "Field to be tested." + }, + "lt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The value that the field should be less than." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit for the field to be tested." + } + }, + "required": [ + "field", + "lt" + ], + "type": "object" + }, + "FieldName": { + "type": "string" + }, + "FieldOneOfPredicate": { + "additionalProperties": false, + "properties": { + "field": { + "$ref": "#/definitions/FieldName", + "description": "Field to be tested." + }, + "oneOf": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "items": { + "type": "boolean" + }, + "type": "array" + }, + { + "items": { + "$ref": "#/definitions/DateTime" + }, + "type": "array" + } + ], + "description": "A set of values that the `field`'s value should be a member of, for a data item included in the filtered data." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit for the field to be tested." + } + }, + "required": [ + "field", + "oneOf" + ], + "type": "object" + }, + "FieldOrDatumDefWithCondition": { + "additionalProperties": false, + "description": "A FieldDef with Condition { condition: {value: ...}, field: ..., ... }", + "properties": { + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "FieldOrDatumDefWithCondition": { + "additionalProperties": false, + "description": "A FieldDef with Condition { condition: {value: ...}, field: ..., ... }", + "properties": { + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "FieldOrDatumDefWithCondition": { + "additionalProperties": false, + "description": "A FieldDef with Condition { condition: {value: ...}, field: ..., ... }", + "properties": { + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "FieldOrDatumDefWithCondition": { + "additionalProperties": false, + "description": "A FieldDef with Condition { condition: {value: ...}, field: ..., ... }", + "properties": { + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(number[]|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(number[]|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "FieldOrDatumDefWithCondition": { + "additionalProperties": false, + "description": "A FieldDef with Condition { condition: {value: ...}, field: ..., ... }", + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "FieldOrDatumDefWithCondition": { + "additionalProperties": false, + "description": "A FieldDef with Condition { condition: {value: ...}, field: ..., ... }", + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "FieldOrDatumDefWithCondition": { + "additionalProperties": false, + "description": "A FieldDef with Condition { condition: {value: ...}, field: ..., ... }", + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(number[]|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(number[]|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "FieldOrDatumDefWithCondition,(string|null)>": { + "additionalProperties": false, + "description": "A FieldDef with Condition { condition: {value: ...}, field: ..., ... }", + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/TypeForShape", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "FieldOrDatumDefWithCondition": { + "additionalProperties": false, + "description": "A FieldDef with Condition { condition: {value: ...}, field: ..., ... }", + "properties": { + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(Text|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(Text|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "format": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/Dict" + } + ], + "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format." + }, + "formatType": { + "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.", + "type": "string" + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "FieldOrDatumDefWithCondition": { + "additionalProperties": false, + "description": "A FieldDef with Condition { condition: {value: ...}, field: ..., ... }", + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "const": "binned", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(Text|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(Text|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "format": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/Dict" + } + ], + "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format." + }, + "formatType": { + "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.", + "type": "string" + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "FieldOrDatumDefWithCondition": { + "additionalProperties": false, + "description": "A FieldDef with Condition { condition: {value: ...}, field: ..., ... }", + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "const": "binned", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(string|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(string|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "format": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/Dict" + } + ], + "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format." + }, + "formatType": { + "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.", + "type": "string" + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "FieldRange": { + "additionalProperties": false, + "properties": { + "field": { + "type": "string" + } + }, + "required": [ + "field" + ], + "type": "object" + }, + "FieldRangePredicate": { + "additionalProperties": false, + "properties": { + "field": { + "$ref": "#/definitions/FieldName", + "description": "Field to be tested." + }, + "range": { + "anyOf": [ + { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "An array of inclusive minimum and maximum values for a field value of a data item to be included in the filtered data.", + "maxItems": 2, + "minItems": 2 + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit for the field to be tested." + } + }, + "required": [ + "field", + "range" + ], + "type": "object" + }, + "FieldValidPredicate": { + "additionalProperties": false, + "properties": { + "field": { + "$ref": "#/definitions/FieldName", + "description": "Field to be tested." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit for the field to be tested." + }, + "valid": { + "description": "If set to true the field's value has to be valid, meaning both not `null` and not [`NaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN).", + "type": "boolean" + } + }, + "required": [ + "field", + "valid" + ], + "type": "object" + }, + "FilterTransform": { + "additionalProperties": false, + "properties": { + "filter": { + "$ref": "#/definitions/PredicateComposition", + "description": "The `filter` property must be a predication definition, which can take one of the following forms:\n\n1) an [expression](https://vega.github.io/vega-lite/docs/types.html#expression) string, where `datum` can be used to refer to the current data object. For example, `{filter: \"datum.b2 > 60\"}` would make the output data includes only items that have values in the field `b2` over 60.\n\n2) one of the [field predicates](https://vega.github.io/vega-lite/docs/predicate.html#field-predicate): [`equal`](https://vega.github.io/vega-lite/docs/predicate.html#field-equal-predicate), [`lt`](https://vega.github.io/vega-lite/docs/predicate.html#lt-predicate), [`lte`](https://vega.github.io/vega-lite/docs/predicate.html#lte-predicate), [`gt`](https://vega.github.io/vega-lite/docs/predicate.html#gt-predicate), [`gte`](https://vega.github.io/vega-lite/docs/predicate.html#gte-predicate), [`range`](https://vega.github.io/vega-lite/docs/predicate.html#range-predicate), [`oneOf`](https://vega.github.io/vega-lite/docs/predicate.html#one-of-predicate), or [`valid`](https://vega.github.io/vega-lite/docs/predicate.html#valid-predicate),\n\n3) a [selection predicate](https://vega.github.io/vega-lite/docs/predicate.html#selection-predicate), which define the names of a selection that the data point should belong to (or a logical composition of selections).\n\n4) a [logical composition](https://vega.github.io/vega-lite/docs/predicate.html#composition) of (1), (2), or (3)." + } + }, + "required": [ + "filter" + ], + "type": "object" + }, + "Fit": { + "anyOf": [ + { + "$ref": "#/definitions/GeoJsonFeature" + }, + { + "$ref": "#/definitions/GeoJsonFeatureCollection" + }, + { + "items": { + "$ref": "#/definitions/GeoJsonFeature" + }, + "type": "array" + } + ] + }, + "FlattenTransform": { + "additionalProperties": false, + "properties": { + "as": { + "description": "The output field names for extracted array values.\n\n__Default value:__ The field name of the corresponding array field", + "items": { + "$ref": "#/definitions/FieldName" + }, + "type": "array" + }, + "flatten": { + "description": "An array of one or more data fields containing arrays to flatten. If multiple fields are specified, their array values should have a parallel structure, ideally with the same length. If the lengths of parallel arrays do not match, the longest array will be used with `null` values added for missing entries.", + "items": { + "$ref": "#/definitions/FieldName" + }, + "type": "array" + } + }, + "required": [ + "flatten" + ], + "type": "object" + }, + "FoldTransform": { + "additionalProperties": false, + "properties": { + "as": { + "description": "The output field names for the key and value properties produced by the fold transform. __Default value:__ `[\"key\", \"value\"]`", + "items": { + "$ref": "#/definitions/FieldName" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "fold": { + "description": "An array of data fields indicating the properties to fold.", + "items": { + "$ref": "#/definitions/FieldName" + }, + "type": "array" + } + }, + "required": [ + "fold" + ], + "type": "object" + }, + "FontStyle": { + "type": "string" + }, + "FontWeight": { + "enum": [ + "normal", + "bold", + "lighter", + "bolder", + 100, + 200, + 300, + 400, + 500, + 600, + 700, + 800, + 900 + ], + "type": [ + "string", + "number" + ] + }, + "FormatConfig": { + "additionalProperties": false, + "properties": { + "normalizedNumberFormat": { + "description": "If normalizedNumberFormatType is not specified, D3 number format for axis labels, text marks, and tooltips of normalized stacked fields (fields with `stack: \"normalize\"`). For example `\"s\"` for SI units. Use [D3's number format pattern](https://github.com/d3/d3-format#locale_format).\n\nIf `config.normalizedNumberFormatType` is specified and `config.customFormatTypes` is `true`, this value will be passed as `format` alongside `datum.value` to the `config.numberFormatType` function. __Default value:__ `%`", + "type": "string" + }, + "normalizedNumberFormatType": { + "description": "[Custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type) for `config.normalizedNumberFormat`.\n\n__Default value:__ `undefined` -- This is equilvalent to call D3-format, which is exposed as [`format` in Vega-Expression](https://vega.github.io/vega/docs/expressions/#format). __Note:__ You must also set `customFormatTypes` to `true` to use this feature.", + "type": "string" + }, + "numberFormat": { + "description": "If numberFormatType is not specified, D3 number format for guide labels, text marks, and tooltips of non-normalized fields (fields *without* `stack: \"normalize\"`). For example `\"s\"` for SI units. Use [D3's number format pattern](https://github.com/d3/d3-format#locale_format).\n\nIf `config.numberFormatType` is specified and `config.customFormatTypes` is `true`, this value will be passed as `format` alongside `datum.value` to the `config.numberFormatType` function.", + "type": "string" + }, + "numberFormatType": { + "description": "[Custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type) for `config.numberFormat`.\n\n__Default value:__ `undefined` -- This is equilvalent to call D3-format, which is exposed as [`format` in Vega-Expression](https://vega.github.io/vega/docs/expressions/#format). __Note:__ You must also set `customFormatTypes` to `true` to use this feature.", + "type": "string" + }, + "timeFormat": { + "description": "Default time format for raw time values (without time units) in text marks, legend labels and header labels.\n\n__Default value:__ `\"%b %d, %Y\"` __Note:__ Axes automatically determine the format for each label automatically so this config does not affect axes.", + "type": "string" + }, + "timeFormatType": { + "description": "[Custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type) for `config.timeFormat`.\n\n__Default value:__ `undefined` -- This is equilvalent to call D3-time-format, which is exposed as [`timeFormat` in Vega-Expression](https://vega.github.io/vega/docs/expressions/#timeFormat). __Note:__ You must also set `customFormatTypes` to `true` and there must *not* be a `timeUnit` defined to use this feature.", + "type": "string" + } + }, + "type": "object" + }, + "Generator": { + "anyOf": [ + { + "$ref": "#/definitions/SequenceGenerator" + }, + { + "$ref": "#/definitions/SphereGenerator" + }, + { + "$ref": "#/definitions/GraticuleGenerator" + } + ] + }, + "ConcatSpec": { + "additionalProperties": false, + "description": "Base interface for a generalized concatenation specification.", + "properties": { + "align": { + "anyOf": [ + { + "$ref": "#/definitions/LayoutAlign" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\n- For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\n- For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`." + }, + "bounds": { + "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`", + "enum": [ + "full", + "flush" + ], + "type": "string" + }, + "center": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`" + }, + "columns": { + "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for:\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).", + "type": "number" + }, + "concat": { + "description": "A list of views to be concatenated.", + "items": { + "$ref": "#/definitions/Spec" + }, + "type": "array" + }, + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Data" + }, + { + "type": "null" + } + ], + "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent." + }, + "description": { + "description": "Description of this mark for commenting purpose.", + "type": "string" + }, + "name": { + "description": "Name of the visualization for later reference.", + "type": "string" + }, + "resolve": { + "$ref": "#/definitions/Resolve", + "description": "Scale, axis, and legend resolutions for view composition specifications." + }, + "spacing": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)" + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/TitleParams" + } + ], + "description": "Title for the plot." + }, + "transform": { + "description": "An array of data transformations such as filter and new field calculation.", + "items": { + "$ref": "#/definitions/Transform" + }, + "type": "array" + } + }, + "required": [ + "concat" + ], + "type": "object" + }, + "FacetSpec": { + "additionalProperties": false, + "description": "Base interface for a facet specification.", + "properties": { + "align": { + "anyOf": [ + { + "$ref": "#/definitions/LayoutAlign" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\n- For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\n- For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`." + }, + "bounds": { + "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`", + "enum": [ + "full", + "flush" + ], + "type": "string" + }, + "center": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`" + }, + "columns": { + "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for:\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).", + "type": "number" + }, + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Data" + }, + { + "type": "null" + } + ], + "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent." + }, + "description": { + "description": "Description of this mark for commenting purpose.", + "type": "string" + }, + "facet": { + "anyOf": [ + { + "$ref": "#/definitions/FacetFieldDef" + }, + { + "$ref": "#/definitions/FacetMapping" + } + ], + "description": "Definition for how to facet the data. One of: 1) [a field definition for faceting the plot by one field](https://vega.github.io/vega-lite/docs/facet.html#field-def) 2) [An object that maps `row` and `column` channels to their field definitions](https://vega.github.io/vega-lite/docs/facet.html#mapping)" + }, + "name": { + "description": "Name of the visualization for later reference.", + "type": "string" + }, + "resolve": { + "$ref": "#/definitions/Resolve", + "description": "Scale, axis, and legend resolutions for view composition specifications." + }, + "spacing": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)" + }, + "spec": { + "anyOf": [ + { + "$ref": "#/definitions/LayerSpec" + }, + { + "$ref": "#/definitions/FacetedUnitSpec" + } + ], + "description": "A specification of the view that gets faceted." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/TitleParams" + } + ], + "description": "Title for the plot." + }, + "transform": { + "description": "An array of data transformations such as filter and new field calculation.", + "items": { + "$ref": "#/definitions/Transform" + }, + "type": "array" + } + }, + "required": [ + "facet", + "spec" + ], + "type": "object" + }, + "HConcatSpec": { + "additionalProperties": false, + "description": "Base interface for a horizontal concatenation specification.", + "properties": { + "bounds": { + "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`", + "enum": [ + "full", + "flush" + ], + "type": "string" + }, + "center": { + "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`", + "type": "boolean" + }, + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Data" + }, + { + "type": "null" + } + ], + "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent." + }, + "description": { + "description": "Description of this mark for commenting purpose.", + "type": "string" + }, + "hconcat": { + "description": "A list of views to be concatenated and put into a row.", + "items": { + "$ref": "#/definitions/Spec" + }, + "type": "array" + }, + "name": { + "description": "Name of the visualization for later reference.", + "type": "string" + }, + "resolve": { + "$ref": "#/definitions/Resolve", + "description": "Scale, axis, and legend resolutions for view composition specifications." + }, + "spacing": { + "description": "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`", + "type": "number" + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/TitleParams" + } + ], + "description": "Title for the plot." + }, + "transform": { + "description": "An array of data transformations such as filter and new field calculation.", + "items": { + "$ref": "#/definitions/Transform" + }, + "type": "array" + } + }, + "required": [ + "hconcat" + ], + "type": "object" + }, + "Spec": { + "anyOf": [ + { + "$ref": "#/definitions/FacetedUnitSpec" + }, + { + "$ref": "#/definitions/LayerSpec" + }, + { + "$ref": "#/definitions/RepeatSpec" + }, + { + "$ref": "#/definitions/FacetSpec" + }, + { + "$ref": "#/definitions/ConcatSpec" + }, + { + "$ref": "#/definitions/VConcatSpec" + }, + { + "$ref": "#/definitions/HConcatSpec" + } + ], + "description": "Any specification in Vega-Lite." + }, + "GenericUnitSpec": { + "additionalProperties": false, + "description": "Base interface for a unit (single-view) specification.", + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Data" + }, + { + "type": "null" + } + ], + "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent." + }, + "description": { + "description": "Description of this mark for commenting purpose.", + "type": "string" + }, + "encoding": { + "$ref": "#/definitions/Encoding", + "description": "A key-value mapping between encoding channels and definition of fields." + }, + "mark": { + "$ref": "#/definitions/AnyMark", + "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`, `\"area\"`, `\"point\"`, `\"rule\"`, `\"geoshape\"`, and `\"text\"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def)." + }, + "name": { + "description": "Name of the visualization for later reference.", + "type": "string" + }, + "params": { + "description": "An array of parameters that may either be simple variables, or more complex selections that map user input to data queries.", + "items": { + "$ref": "#/definitions/SelectionParameter" + }, + "type": "array" + }, + "projection": { + "$ref": "#/definitions/Projection", + "description": "An object defining properties of geographic projection, which will be applied to `shape` path for `\"geoshape\"` marks and to `latitude` and `\"longitude\"` channels for other marks." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/TitleParams" + } + ], + "description": "Title for the plot." + }, + "transform": { + "description": "An array of data transformations such as filter and new field calculation.", + "items": { + "$ref": "#/definitions/Transform" + }, + "type": "array" + } + }, + "required": [ + "mark" + ], + "type": "object" + }, + "VConcatSpec": { + "additionalProperties": false, + "description": "Base interface for a vertical concatenation specification.", + "properties": { + "bounds": { + "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`", + "enum": [ + "full", + "flush" + ], + "type": "string" + }, + "center": { + "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`", + "type": "boolean" + }, + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Data" + }, + { + "type": "null" + } + ], + "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent." + }, + "description": { + "description": "Description of this mark for commenting purpose.", + "type": "string" + }, + "name": { + "description": "Name of the visualization for later reference.", + "type": "string" + }, + "resolve": { + "$ref": "#/definitions/Resolve", + "description": "Scale, axis, and legend resolutions for view composition specifications." + }, + "spacing": { + "description": "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`", + "type": "number" + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/TitleParams" + } + ], + "description": "Title for the plot." + }, + "transform": { + "description": "An array of data transformations such as filter and new field calculation.", + "items": { + "$ref": "#/definitions/Transform" + }, + "type": "array" + }, + "vconcat": { + "description": "A list of views to be concatenated and put into a column.", + "items": { + "$ref": "#/definitions/Spec" + }, + "type": "array" + } + }, + "required": [ + "vconcat" + ], + "type": "object" + }, + "GeoJsonFeature": { + "$ref": "#/definitions/Feature" + }, + "GeoJsonFeatureCollection": { + "$ref": "#/definitions/FeatureCollection" + }, + "GeoJsonProperties": { + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ] + }, + "Geometry": { + "anyOf": [ + { + "$ref": "#/definitions/Point" + }, + { + "$ref": "#/definitions/MultiPoint" + }, + { + "$ref": "#/definitions/LineString" + }, + { + "$ref": "#/definitions/MultiLineString" + }, + { + "$ref": "#/definitions/Polygon" + }, + { + "$ref": "#/definitions/MultiPolygon" + }, + { + "$ref": "#/definitions/GeometryCollection" + } + ], + "description": "Union of geometry objects. https://tools.ietf.org/html/rfc7946#section-3" + }, + "GeometryCollection": { + "additionalProperties": false, + "description": "Geometry Collection https://tools.ietf.org/html/rfc7946#section-3.1.8", + "properties": { + "bbox": { + "$ref": "#/definitions/BBox", + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. https://tools.ietf.org/html/rfc7946#section-5" + }, + "geometries": { + "items": { + "$ref": "#/definitions/Geometry" + }, + "type": "array" + }, + "type": { + "const": "GeometryCollection", + "description": "Specifies the type of GeoJSON object.", + "type": "string" + } + }, + "required": [ + "geometries", + "type" + ], + "type": "object" + }, + "Gradient": { + "anyOf": [ + { + "$ref": "#/definitions/LinearGradient" + }, + { + "$ref": "#/definitions/RadialGradient" + } + ] + }, + "GradientStop": { + "additionalProperties": false, + "properties": { + "color": { + "$ref": "#/definitions/Color", + "description": "The color value at this point in the gradient." + }, + "offset": { + "description": "The offset fraction for the color stop, indicating its position within the gradient.", + "type": "number" + } + }, + "required": [ + "offset", + "color" + ], + "type": "object" + }, + "GraticuleGenerator": { + "additionalProperties": false, + "properties": { + "graticule": { + "anyOf": [ + { + "const": true, + "type": "boolean" + }, + { + "$ref": "#/definitions/GraticuleParams" + } + ], + "description": "Generate graticule GeoJSON data for geographic reference lines." + }, + "name": { + "description": "Provide a placeholder name and bind data at runtime.", + "type": "string" + } + }, + "required": [ + "graticule" + ], + "type": "object" + }, + "GraticuleParams": { + "additionalProperties": false, + "properties": { + "extent": { + "$ref": "#/definitions/Vector2>", + "description": "Sets both the major and minor extents to the same values." + }, + "extentMajor": { + "$ref": "#/definitions/Vector2>", + "description": "The major extent of the graticule as a two-element array of coordinates." + }, + "extentMinor": { + "$ref": "#/definitions/Vector2>", + "description": "The minor extent of the graticule as a two-element array of coordinates." + }, + "precision": { + "description": "The precision of the graticule in degrees.\n\n__Default value:__ `2.5`", + "type": "number" + }, + "step": { + "$ref": "#/definitions/Vector2", + "description": "Sets both the major and minor step angles to the same values." + }, + "stepMajor": { + "$ref": "#/definitions/Vector2", + "description": "The major step angles of the graticule.\n\n\n__Default value:__ `[90, 360]`" + }, + "stepMinor": { + "$ref": "#/definitions/Vector2", + "description": "The minor step angles of the graticule.\n\n__Default value:__ `[10, 10]`" + } + }, + "type": "object" + }, + "Header": { + "additionalProperties": false, + "description": "Headers of row / column channels for faceted plots.", + "properties": { + "format": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/Dict" + } + ], + "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format." + }, + "formatType": { + "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.", + "type": "string" + }, + "labelAlign": { + "anyOf": [ + { + "$ref": "#/definitions/Align" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Horizontal text alignment of header labels. One of `\"left\"`, `\"center\"`, or `\"right\"`." + }, + "labelAnchor": { + "$ref": "#/definitions/TitleAnchor", + "description": "The anchor position for placing the labels. One of `\"start\"`, `\"middle\"`, or `\"end\"`. For example, with a label orientation of top these anchor positions map to a left-, center-, or right-aligned label." + }, + "labelAngle": { + "description": "The rotation angle of the header labels.\n\n__Default value:__ `0` for column header, `-90` for row header.", + "maximum": 360, + "minimum": -360, + "type": "number" + }, + "labelBaseline": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The vertical text baseline for the header labels. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `titleLineHeight` rather than `titleFontSize` alone." + }, + "labelColor": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The color of the header label, can be in hex color code or regular color name." + }, + "labelExpr": { + "description": "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the header's backing `datum` object.", + "type": "string" + }, + "labelFont": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The font of the header label." + }, + "labelFontSize": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The font size of the header label, in pixels.", + "minimum": 0 + }, + "labelFontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The font style of the header label." + }, + "labelFontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The font weight of the header label." + }, + "labelLimit": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The maximum length of the header label in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit" + }, + "labelLineHeight": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Line height in pixels for multi-line header labels or title text with `\"line-top\"` or `\"line-bottom\"` baseline." + }, + "labelOrient": { + "$ref": "#/definitions/Orient", + "description": "The orientation of the header label. One of `\"top\"`, `\"bottom\"`, `\"left\"` or `\"right\"`." + }, + "labelPadding": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The padding, in pixel, between facet header's label and the plot.\n\n__Default value:__ `10`" + }, + "labels": { + "description": "A boolean flag indicating if labels should be included as part of the header.\n\n__Default value:__ `true`.", + "type": "boolean" + }, + "orient": { + "$ref": "#/definitions/Orient", + "description": "Shortcut for setting both labelOrient and titleOrient." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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." + }, + "titleAlign": { + "anyOf": [ + { + "$ref": "#/definitions/Align" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Horizontal text alignment (to the anchor) of header titles." + }, + "titleAnchor": { + "$ref": "#/definitions/TitleAnchor", + "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." + }, + "titleAngle": { + "description": "The rotation angle of the header title.\n\n__Default value:__ `0`.", + "maximum": 360, + "minimum": -360, + "type": "number" + }, + "titleBaseline": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The vertical text baseline for the header title. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `titleLineHeight` rather than `titleFontSize` alone.\n\n__Default value:__ `\"middle\"`" + }, + "titleColor": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Color of the header title, can be in hex color code or regular color name." + }, + "titleFont": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Font of the header title. (e.g., `\"Helvetica Neue\"`)." + }, + "titleFontSize": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Font size of the header title.", + "minimum": 0 + }, + "titleFontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The font style of the header title." + }, + "titleFontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Font weight of the header title. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)." + }, + "titleLimit": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The maximum length of the header title in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit" + }, + "titleLineHeight": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Line height in pixels for multi-line header title text or title text with `\"line-top\"` or `\"line-bottom\"` baseline." + }, + "titleOrient": { + "$ref": "#/definitions/Orient", + "description": "The orientation of the header title. One of `\"top\"`, `\"bottom\"`, `\"left\"` or `\"right\"`." + }, + "titlePadding": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The padding, in pixel, between facet header's title and the label.\n\n__Default value:__ `10`" + } + }, + "type": "object" + }, + "HeaderConfig": { + "additionalProperties": false, + "properties": { + "format": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/Dict" + } + ], + "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format." + }, + "formatType": { + "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.", + "type": "string" + }, + "labelAlign": { + "anyOf": [ + { + "$ref": "#/definitions/Align" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Horizontal text alignment of header labels. One of `\"left\"`, `\"center\"`, or `\"right\"`." + }, + "labelAnchor": { + "$ref": "#/definitions/TitleAnchor", + "description": "The anchor position for placing the labels. One of `\"start\"`, `\"middle\"`, or `\"end\"`. For example, with a label orientation of top these anchor positions map to a left-, center-, or right-aligned label." + }, + "labelAngle": { + "description": "The rotation angle of the header labels.\n\n__Default value:__ `0` for column header, `-90` for row header.", + "maximum": 360, + "minimum": -360, + "type": "number" + }, + "labelBaseline": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The vertical text baseline for the header labels. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `titleLineHeight` rather than `titleFontSize` alone." + }, + "labelColor": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The color of the header label, can be in hex color code or regular color name." + }, + "labelExpr": { + "description": "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the header's backing `datum` object.", + "type": "string" + }, + "labelFont": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The font of the header label." + }, + "labelFontSize": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The font size of the header label, in pixels.", + "minimum": 0 + }, + "labelFontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The font style of the header label." + }, + "labelFontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The font weight of the header label." + }, + "labelLimit": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The maximum length of the header label in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit" + }, + "labelLineHeight": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Line height in pixels for multi-line header labels or title text with `\"line-top\"` or `\"line-bottom\"` baseline." + }, + "labelOrient": { + "$ref": "#/definitions/Orient", + "description": "The orientation of the header label. One of `\"top\"`, `\"bottom\"`, `\"left\"` or `\"right\"`." + }, + "labelPadding": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The padding, in pixel, between facet header's label and the plot.\n\n__Default value:__ `10`" + }, + "labels": { + "description": "A boolean flag indicating if labels should be included as part of the header.\n\n__Default value:__ `true`.", + "type": "boolean" + }, + "orient": { + "$ref": "#/definitions/Orient", + "description": "Shortcut for setting both labelOrient and titleOrient." + }, + "title": { + "description": "Set to null to disable title for the axis, legend, or header.", + "type": "null" + }, + "titleAlign": { + "anyOf": [ + { + "$ref": "#/definitions/Align" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Horizontal text alignment (to the anchor) of header titles." + }, + "titleAnchor": { + "$ref": "#/definitions/TitleAnchor", + "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." + }, + "titleAngle": { + "description": "The rotation angle of the header title.\n\n__Default value:__ `0`.", + "maximum": 360, + "minimum": -360, + "type": "number" + }, + "titleBaseline": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The vertical text baseline for the header title. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `titleLineHeight` rather than `titleFontSize` alone.\n\n__Default value:__ `\"middle\"`" + }, + "titleColor": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Color of the header title, can be in hex color code or regular color name." + }, + "titleFont": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Font of the header title. (e.g., `\"Helvetica Neue\"`)." + }, + "titleFontSize": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Font size of the header title.", + "minimum": 0 + }, + "titleFontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The font style of the header title." + }, + "titleFontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Font weight of the header title. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)." + }, + "titleLimit": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The maximum length of the header title in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit" + }, + "titleLineHeight": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Line height in pixels for multi-line header title text or title text with `\"line-top\"` or `\"line-bottom\"` baseline." + }, + "titleOrient": { + "$ref": "#/definitions/Orient", + "description": "The orientation of the header title. One of `\"top\"`, `\"bottom\"`, `\"left\"` or `\"right\"`." + }, + "titlePadding": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The padding, in pixel, between facet header's title and the label.\n\n__Default value:__ `10`" + } + }, + "type": "object" + }, + "HexColor": { + "format": "color-hex", + "type": "string" + }, + "ImputeMethod": { + "enum": [ + "value", + "median", + "max", + "min", + "mean" + ], + "type": "string" + }, + "ImputeParams": { + "additionalProperties": false, + "properties": { + "frame": { + "description": "A frame specification as a two-element array used to control the window over which the specified method is applied. The array entries should either be a number indicating the offset from the current data object, or null to indicate unbounded rows preceding or following the current data object. For example, the value `[-5, 5]` indicates that the window should include five objects preceding and five objects following the current object.\n\n__Default value:__: `[null, null]` indicating that the window includes all objects.", + "items": { + "type": [ + "null", + "number" + ] + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "keyvals": { + "anyOf": [ + { + "items": {}, + "type": "array" + }, + { + "$ref": "#/definitions/ImputeSequence" + } + ], + "description": "Defines the key values that should be considered for imputation. An array of key values or an object defining a [number sequence](https://vega.github.io/vega-lite/docs/impute.html#sequence-def).\n\nIf provided, this will be used in addition to the key values observed within the input data. If not provided, the values will be derived from all unique values of the `key` field. For `impute` in `encoding`, the key field is the x-field if the y-field is imputed, or vice versa.\n\nIf there is no impute grouping, this property _must_ be specified." + }, + "method": { + "$ref": "#/definitions/ImputeMethod", + "description": "The imputation method to use for the field value of imputed data objects. One of `\"value\"`, `\"mean\"`, `\"median\"`, `\"max\"` or `\"min\"`.\n\n__Default value:__ `\"value\"`" + }, + "value": { + "description": "The field value to use when the imputation `method` is `\"value\"`." + } + }, + "type": "object" + }, + "ImputeSequence": { + "additionalProperties": false, + "properties": { + "start": { + "description": "The starting value of the sequence. __Default value:__ `0`", + "type": "number" + }, + "step": { + "description": "The step value between sequence entries. __Default value:__ `1` or `-1` if `stop < start`", + "type": "number" + }, + "stop": { + "description": "The ending value(exclusive) of the sequence.", + "type": "number" + } + }, + "required": [ + "stop" + ], + "type": "object" + }, + "ImputeTransform": { + "additionalProperties": false, + "properties": { + "frame": { + "description": "A frame specification as a two-element array used to control the window over which the specified method is applied. The array entries should either be a number indicating the offset from the current data object, or null to indicate unbounded rows preceding or following the current data object. For example, the value `[-5, 5]` indicates that the window should include five objects preceding and five objects following the current object.\n\n__Default value:__: `[null, null]` indicating that the window includes all objects.", + "items": { + "type": [ + "null", + "number" + ] + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "groupby": { + "description": "An optional array of fields by which to group the values. Imputation will then be performed on a per-group basis.", + "items": { + "$ref": "#/definitions/FieldName" + }, + "type": "array" + }, + "impute": { + "$ref": "#/definitions/FieldName", + "description": "The data field for which the missing values should be imputed." + }, + "key": { + "$ref": "#/definitions/FieldName", + "description": "A key field that uniquely identifies data objects within a group. Missing key values (those occurring in the data but not in the current group) will be imputed." + }, + "keyvals": { + "anyOf": [ + { + "items": {}, + "type": "array" + }, + { + "$ref": "#/definitions/ImputeSequence" + } + ], + "description": "Defines the key values that should be considered for imputation. An array of key values or an object defining a [number sequence](https://vega.github.io/vega-lite/docs/impute.html#sequence-def).\n\nIf provided, this will be used in addition to the key values observed within the input data. If not provided, the values will be derived from all unique values of the `key` field. For `impute` in `encoding`, the key field is the x-field if the y-field is imputed, or vice versa.\n\nIf there is no impute grouping, this property _must_ be specified." + }, + "method": { + "$ref": "#/definitions/ImputeMethod", + "description": "The imputation method to use for the field value of imputed data objects. One of `\"value\"`, `\"mean\"`, `\"median\"`, `\"max\"` or `\"min\"`.\n\n__Default value:__ `\"value\"`" + }, + "value": { + "description": "The field value to use when the imputation `method` is `\"value\"`." + } + }, + "required": [ + "impute", + "key" + ], + "type": "object" + }, + "InlineData": { + "additionalProperties": false, + "properties": { + "format": { + "$ref": "#/definitions/DataFormat", + "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, 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." + } + }, + "required": [ + "values" + ], + "type": "object" + }, + "InlineDataset": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "items": { + "type": "boolean" + }, + "type": "array" + }, + { + "items": { + "type": "object" + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "object" + } + ] + }, + "Interpolate": { + "enum": [ + "basis", + "basis-open", + "basis-closed", + "bundle", + "cardinal", + "cardinal-open", + "cardinal-closed", + "catmull-rom", + "linear", + "linear-closed", + "monotone", + "natural", + "step", + "step-before", + "step-after" + ], + "type": "string" + }, + "IntervalSelectionConfig": { + "additionalProperties": false, + "properties": { + "clear": { + "anyOf": [ + { + "$ref": "#/definitions/Stream" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ], + "description": "Clears the selection, emptying it of all values. This property can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable clear.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear` examples ](https://vega.github.io/vega-lite/docs/selection.html#clear) in the documentation." + }, + "encodings": { + "description": "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ The [projection with `encodings` and `fields` section](https://vega.github.io/vega-lite/docs/selection.html#project) in the documentation.", + "items": { + "$ref": "#/definitions/SingleDefUnitChannel" + }, + "type": "array" + }, + "fields": { + "description": "An array of field names whose values must match for a data tuple to fall within the selection.\n\n__See also:__ The [projection with `encodings` and `fields` section](https://vega.github.io/vega-lite/docs/selection.html#project) in the documentation.", + "items": { + "$ref": "#/definitions/FieldName" + }, + "type": "array" + }, + "mark": { + "$ref": "#/definitions/BrushConfig", + "description": "An interval selection also adds a rectangle mark to depict the extents of the interval. The `mark` property can be used to customize the appearance of the mark.\n\n__See also:__ [`mark` examples](https://vega.github.io/vega-lite/docs/selection.html#mark) in the documentation." + }, + "on": { + "anyOf": [ + { + "$ref": "#/definitions/Stream" + }, + { + "type": "string" + } + ], + "description": "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection. For interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters).\n\n__See also:__ [`on` examples](https://vega.github.io/vega-lite/docs/selection.html#on) in the documentation." + }, + "resolve": { + "$ref": "#/definitions/SelectionResolution", + "description": "With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\n\nOne of:\n- `\"global\"` -- only one brush exists for the entire SPLOM. When the user begins to drag, any previous brushes are cleared, and a new one is constructed.\n- `\"union\"` -- each cell contains its own brush, and points are highlighted if they lie within _any_ of these individual brushes.\n- `\"intersect\"` -- each cell contains its own brush, and points are highlighted only if they fall within _all_ of these individual brushes.\n\n__Default value:__ `global`.\n\n__See also:__ [`resolve` examples](https://vega.github.io/vega-lite/docs/selection.html#resolve) in the documentation." + }, + "translate": { + "description": "When truthy, allows a user to interactively move an interval selection back-and-forth. Can be `true`, `false` (to disable panning), or a [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/) which must include a start and end event to trigger continuous panning. Discrete panning (e.g., pressing the left/right arrow keys) will be supported in future versions.\n\n__Default value:__ `true`, which corresponds to `[pointerdown, window:pointerup] > window:pointermove!`. This default allows users to clicks and drags within an interval selection to reposition it.\n\n__See also:__ [`translate` examples](https://vega.github.io/vega-lite/docs/selection.html#translate) in the documentation.", + "type": [ + "string", + "boolean" + ] + }, + "type": { + "const": "interval", + "description": "Determines the default event processing and data query for the selection. Vega-Lite currently supports two selection types:\n\n- `\"point\"` -- to select multiple discrete data values; the first value is selected on `click` and additional values toggled on shift-click.\n- `\"interval\"` -- to select a continuous range of data values on `drag`.", + "type": "string" + }, + "zoom": { + "description": "When truthy, allows a user to interactively resize an interval selection. Can be `true`, `false` (to disable zooming), or a [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/). Currently, only `wheel` events are supported, but custom event streams can still be used to specify filters, debouncing, and throttling. Future versions will expand the set of events that can trigger this transformation.\n\n__Default value:__ `true`, which corresponds to `wheel!`. This default allows users to use the mouse wheel to resize an interval selection.\n\n__See also:__ [`zoom` examples](https://vega.github.io/vega-lite/docs/selection.html#zoom) in the documentation.", + "type": [ + "string", + "boolean" + ] + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "IntervalSelectionConfigWithoutType": { + "additionalProperties": false, + "properties": { + "clear": { + "anyOf": [ + { + "$ref": "#/definitions/Stream" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ], + "description": "Clears the selection, emptying it of all values. This property can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable clear.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear` examples ](https://vega.github.io/vega-lite/docs/selection.html#clear) in the documentation." + }, + "encodings": { + "description": "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ The [projection with `encodings` and `fields` section](https://vega.github.io/vega-lite/docs/selection.html#project) in the documentation.", + "items": { + "$ref": "#/definitions/SingleDefUnitChannel" + }, + "type": "array" + }, + "fields": { + "description": "An array of field names whose values must match for a data tuple to fall within the selection.\n\n__See also:__ The [projection with `encodings` and `fields` section](https://vega.github.io/vega-lite/docs/selection.html#project) in the documentation.", + "items": { + "$ref": "#/definitions/FieldName" + }, + "type": "array" + }, + "mark": { + "$ref": "#/definitions/BrushConfig", + "description": "An interval selection also adds a rectangle mark to depict the extents of the interval. The `mark` property can be used to customize the appearance of the mark.\n\n__See also:__ [`mark` examples](https://vega.github.io/vega-lite/docs/selection.html#mark) in the documentation." + }, + "on": { + "anyOf": [ + { + "$ref": "#/definitions/Stream" + }, + { + "type": "string" + } + ], + "description": "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection. For interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters).\n\n__See also:__ [`on` examples](https://vega.github.io/vega-lite/docs/selection.html#on) in the documentation." + }, + "resolve": { + "$ref": "#/definitions/SelectionResolution", + "description": "With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\n\nOne of:\n- `\"global\"` -- only one brush exists for the entire SPLOM. When the user begins to drag, any previous brushes are cleared, and a new one is constructed.\n- `\"union\"` -- each cell contains its own brush, and points are highlighted if they lie within _any_ of these individual brushes.\n- `\"intersect\"` -- each cell contains its own brush, and points are highlighted only if they fall within _all_ of these individual brushes.\n\n__Default value:__ `global`.\n\n__See also:__ [`resolve` examples](https://vega.github.io/vega-lite/docs/selection.html#resolve) in the documentation." + }, + "translate": { + "description": "When truthy, allows a user to interactively move an interval selection back-and-forth. Can be `true`, `false` (to disable panning), or a [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/) which must include a start and end event to trigger continuous panning. Discrete panning (e.g., pressing the left/right arrow keys) will be supported in future versions.\n\n__Default value:__ `true`, which corresponds to `[pointerdown, window:pointerup] > window:pointermove!`. This default allows users to clicks and drags within an interval selection to reposition it.\n\n__See also:__ [`translate` examples](https://vega.github.io/vega-lite/docs/selection.html#translate) in the documentation.", + "type": [ + "string", + "boolean" + ] + }, + "zoom": { + "description": "When truthy, allows a user to interactively resize an interval selection. Can be `true`, `false` (to disable zooming), or a [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/). Currently, only `wheel` events are supported, but custom event streams can still be used to specify filters, debouncing, and throttling. Future versions will expand the set of events that can trigger this transformation.\n\n__Default value:__ `true`, which corresponds to `wheel!`. This default allows users to use the mouse wheel to resize an interval selection.\n\n__See also:__ [`zoom` examples](https://vega.github.io/vega-lite/docs/selection.html#zoom) in the documentation.", + "type": [ + "string", + "boolean" + ] + } + }, + "type": "object" + }, + "JoinAggregateFieldDef": { + "additionalProperties": false, + "properties": { + "as": { + "$ref": "#/definitions/FieldName", + "description": "The output name for the join aggregate operation." + }, + "field": { + "$ref": "#/definitions/FieldName", + "description": "The data field for which to compute the aggregate function. This can be omitted for functions that do not operate over a field such as `\"count\"`." + }, + "op": { + "$ref": "#/definitions/AggregateOp", + "description": "The aggregation operation to apply (e.g., `\"sum\"`, `\"average\"` or `\"count\"`). See the list of all supported operations [here](https://vega.github.io/vega-lite/docs/aggregate.html#ops)." + } + }, + "required": [ + "op", + "as" + ], + "type": "object" + }, + "JoinAggregateTransform": { + "additionalProperties": false, + "properties": { + "groupby": { + "description": "The data fields for partitioning the data objects into separate groups. If unspecified, all data points will be in a single group.", + "items": { + "$ref": "#/definitions/FieldName" + }, + "type": "array" + }, + "joinaggregate": { + "description": "The definition of the fields in the join aggregate, and what calculations to use.", + "items": { + "$ref": "#/definitions/JoinAggregateFieldDef" + }, + "type": "array" + } + }, + "required": [ + "joinaggregate" + ], + "type": "object" + }, + "JsonDataFormat": { + "additionalProperties": false, + "properties": { + "parse": { + "anyOf": [ + { + "$ref": "#/definitions/Parse" + }, + { + "type": "null" + } + ], + "description": "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.\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). For 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. 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": "string" + }, + "type": { + "const": "json", + "description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\n\n__Default value:__ 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": "string" + } + }, + "type": "object" + }, + "LabelOverlap": { + "anyOf": [ + { + "type": "boolean" + }, + { + "const": "parity", + "type": "string" + }, + { + "const": "greedy", + "type": "string" + } + ] + }, + "LatLongDef": { + "anyOf": [ + { + "$ref": "#/definitions/LatLongFieldDef" + }, + { + "$ref": "#/definitions/DatumDef" + } + ] + }, + "LatLongFieldDef": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.", + "type": "null" + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "const": "quantitative", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.", + "type": "string" + } + }, + "type": "object" + }, + "LayerRepeatMapping": { + "additionalProperties": false, + "properties": { + "column": { + "description": "An array of fields to be repeated horizontally.", + "items": { + "type": "string" + }, + "type": "array" + }, + "layer": { + "description": "An array of fields to be repeated as layers.", + "items": { + "type": "string" + }, + "type": "array" + }, + "row": { + "description": "An array of fields to be repeated vertically.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "layer" + ], + "type": "object" + }, + "LayerRepeatSpec": { + "additionalProperties": false, + "properties": { + "align": { + "anyOf": [ + { + "$ref": "#/definitions/LayoutAlign" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\n- For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\n- For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`." + }, + "bounds": { + "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`", + "enum": [ + "full", + "flush" + ], + "type": "string" + }, + "center": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`" + }, + "columns": { + "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for:\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).", + "type": "number" + }, + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Data" + }, + { + "type": "null" + } + ], + "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent." + }, + "description": { + "description": "Description of this mark for commenting purpose.", + "type": "string" + }, + "name": { + "description": "Name of the visualization for later reference.", + "type": "string" + }, + "repeat": { + "$ref": "#/definitions/LayerRepeatMapping", + "description": "Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If `\"repeat\"` is an array, the field can be referred to as `{\"repeat\": \"repeat\"}`. The repeated views are laid out in a wrapped row. You can set the number of columns to control the wrapping. 2) An object that maps `\"row\"` and/or `\"column\"` to the listed fields to be repeated along the particular orientations. The objects `{\"repeat\": \"row\"}` and `{\"repeat\": \"column\"}` can be used to refer to the repeated field respectively." + }, + "resolve": { + "$ref": "#/definitions/Resolve", + "description": "Scale, axis, and legend resolutions for view composition specifications." + }, + "spacing": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)" + }, + "spec": { + "anyOf": [ + { + "$ref": "#/definitions/LayerSpec" + }, + { + "$ref": "#/definitions/UnitSpecWithFrame" + } + ], + "description": "A specification of the view that gets repeated." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/TitleParams" + } + ], + "description": "Title for the plot." + }, + "transform": { + "description": "An array of data transformations such as filter and new field calculation.", + "items": { + "$ref": "#/definitions/Transform" + }, + "type": "array" + } + }, + "required": [ + "repeat", + "spec" + ], + "type": "object" + }, + "LayerSpec": { + "additionalProperties": false, + "description": "A full layered plot specification, which may contains `encoding` and `projection` properties that will be applied to underlying unit (single-view) specifications.", + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Data" + }, + { + "type": "null" + } + ], + "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent." + }, + "description": { + "description": "Description of this mark for commenting purpose.", + "type": "string" + }, + "encoding": { + "$ref": "#/definitions/SharedEncoding", + "description": "A shared key-value mapping between encoding channels and definition of fields in the underlying layers." + }, + "height": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "container", + "type": "string" + }, + { + "$ref": "#/definitions/Step" + } + ], + "description": "The height of a visualization.\n\n- For a plot with a continuous y-field, height should be a number.\n- For a plot with either a discrete y-field or no y-field, height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step. (No y-field is equivalent to having one discrete step.)\n- To enable responsive sizing on height, it should be set to `\"container\"`.\n\n__Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous y-field and `config.view.discreteHeight` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view and the `\"container\"` option cannot be used.\n\n__See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation." + }, + "layer": { + "description": "Layer or single view specifications to be layered.\n\n__Note__: Specifications inside `layer` cannot use `row` and `column` channels as layering facet specifications is not allowed. Instead, use the [facet operator](https://vega.github.io/vega-lite/docs/facet.html) and place a layer inside a facet.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/LayerSpec" + }, + { + "$ref": "#/definitions/UnitSpec" + } + ] + }, + "type": "array" + }, + "name": { + "description": "Name of the visualization for later reference.", + "type": "string" + }, + "projection": { + "$ref": "#/definitions/Projection", + "description": "An object defining properties of the geographic projection shared by underlying layers." + }, + "resolve": { + "$ref": "#/definitions/Resolve", + "description": "Scale, axis, and legend resolutions for view composition specifications." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/TitleParams" + } + ], + "description": "Title for the plot." + }, + "transform": { + "description": "An array of data transformations such as filter and new field calculation.", + "items": { + "$ref": "#/definitions/Transform" + }, + "type": "array" + }, + "view": { + "$ref": "#/definitions/ViewBackground", + "description": "An object defining the view background's fill and stroke.\n\n__Default value:__ none (transparent)" + }, + "width": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "container", + "type": "string" + }, + { + "$ref": "#/definitions/Step" + } + ], + "description": "The width of a visualization.\n\n- For a plot with a continuous x-field, width should be a number.\n- For a plot with either a discrete x-field or no x-field, width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step. (No x-field is equivalent to having one discrete step.)\n- To enable responsive sizing on width, it should be set to `\"container\"`.\n\n__Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous x-field and `config.view.discreteWidth` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view and the `\"container\"` option cannot be used.\n\n__See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation." + } + }, + "required": [ + "layer" + ], + "type": "object" + }, + "LayoutAlign": { + "enum": [ + "all", + "each", + "none" + ], + "type": "string" + }, + "Legend": { + "additionalProperties": false, + "description": "Properties of a legend or boolean flag for determining whether to show it.", + "properties": { + "aria": { + "anyOf": [ + { + "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG group, removing the legend from the ARIA accessibility tree.\n\n__Default value:__ `true`", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "clipHeight": { + "anyOf": [ + { + "description": "The height in pixels to clip symbol legend entries and limit their size.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "columnPadding": { + "anyOf": [ + { + "description": "The horizontal padding in pixels between symbol legend entries.\n\n__Default value:__ `10`.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "columns": { + "anyOf": [ + { + "description": "The number of columns in which to arrange symbol legend entries. A value of `0` or lower indicates a single row with one column per entry.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadius": { + "anyOf": [ + { + "description": "Corner radius for the full legend.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "description": { + "anyOf": [ + { + "description": "A text description of this legend for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If the `aria` property is true, for SVG output the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute) will be set to this description. If the description is unspecified it will be automatically generated.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "direction": { + "$ref": "#/definitions/Orientation", + "description": "The direction of the legend, one of `\"vertical\"` or `\"horizontal\"`.\n\n__Default value:__\n- For top-/bottom-`orient`ed legends, `\"horizontal\"`\n- For left-/right-`orient`ed legends, `\"vertical\"`\n- For top/bottom-left/right-`orient`ed legends, `\"horizontal\"` for gradient legends and `\"vertical\"` for symbol legends." + }, + "fillColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "Background fill color for the full legend." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "format": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/Dict" + } + ], + "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format." + }, + "formatType": { + "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.", + "type": "string" + }, + "gradientLength": { + "anyOf": [ + { + "description": "The length in pixels of the primary axis of a color gradient. This value corresponds to the height of a vertical gradient or the width of a horizontal gradient.\n\n__Default value:__ `200`.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "gradientOpacity": { + "anyOf": [ + { + "description": "Opacity of the color gradient.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "gradientStrokeColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "The color of the gradient stroke, can be in hex color code or regular color name.\n\n__Default value:__ `\"lightGray\"`." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "gradientStrokeWidth": { + "anyOf": [ + { + "description": "The width of the gradient stroke, in pixels.\n\n__Default value:__ `0`.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "gradientThickness": { + "anyOf": [ + { + "description": "The thickness in pixels of the color gradient. This value corresponds to the width of a vertical gradient or the height of a horizontal gradient.\n\n__Default value:__ `16`.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "gridAlign": { + "anyOf": [ + { + "$ref": "#/definitions/LayoutAlign", + "description": "The alignment to apply to symbol legends rows and columns. The supported string values are `\"all\"`, `\"each\"` (the default), and `none`. For more information, see the [grid layout documentation](https://vega.github.io/vega/docs/layout).\n\n__Default value:__ `\"each\"`." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelAlign": { + "anyOf": [ + { + "$ref": "#/definitions/Align", + "description": "The alignment of the legend label, can be left, center, or right." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelBaseline": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline", + "description": "The position of the baseline of legend label, can be `\"top\"`, `\"middle\"`, `\"bottom\"`, or `\"alphabetic\"`.\n\n__Default value:__ `\"middle\"`." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "The color of the legend label, can be in hex color code or regular color name." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelExpr": { + "description": "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the legend's backing `datum` object.", + "type": "string" + }, + "labelFont": { + "anyOf": [ + { + "description": "The font of the legend label.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelFontSize": { + "anyOf": [ + { + "description": "The font size of legend label.\n\n__Default value:__ `10`.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelFontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle", + "description": "The font style of legend label." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelFontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight", + "description": "The font weight of legend label." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelLimit": { + "anyOf": [ + { + "description": "Maximum allowed pixel width of legend tick labels.\n\n__Default value:__ `160`.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelOffset": { + "anyOf": [ + { + "description": "The offset of the legend label.\n\n__Default value:__ `4`.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelOpacity": { + "anyOf": [ + { + "description": "Opacity of labels.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelOverlap": { + "anyOf": [ + { + "$ref": "#/definitions/LabelOverlap", + "description": "The strategy to use for resolving overlap of labels in gradient legends. If `false`, no overlap reduction is attempted. If set to `true` (default) or `\"parity\"`, a strategy of removing every other label is used. If set to `\"greedy\"`, a linear scan of the labels is performed, removing any label that overlaps with the last visible label (this often works better for log-scaled axes).\n\n__Default value:__ `true`." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelPadding": { + "anyOf": [ + { + "description": "Padding in pixels between the legend and legend labels.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelSeparation": { + "anyOf": [ + { + "description": "The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default `0`). This property is ignored if *labelOverlap* resolution is not enabled.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "legendX": { + "anyOf": [ + { + "description": "Custom x-position for legend with orient \"none\".", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "legendY": { + "anyOf": [ + { + "description": "Custom y-position for legend with orient \"none\".", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "offset": { + "anyOf": [ + { + "description": "The offset in pixels by which to displace the legend from the data rectangle and axes.\n\n__Default value:__ `18`.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "orient": { + "$ref": "#/definitions/LegendOrient", + "description": "The orientation of the legend, which determines how the legend is positioned within the scene. One of `\"left\"`, `\"right\"`, `\"top\"`, `\"bottom\"`, `\"top-left\"`, `\"top-right\"`, `\"bottom-left\"`, `\"bottom-right\"`, `\"none\"`.\n\n__Default value:__ `\"right\"`" + }, + "padding": { + "anyOf": [ + { + "description": "The padding between the border and content of the legend group.\n\n__Default value:__ `0`.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "rowPadding": { + "anyOf": [ + { + "description": "The vertical padding in pixels between symbol legend entries.\n\n__Default value:__ `2`.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "Border stroke color for the full legend." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolDash": { + "anyOf": [ + { + "description": "An array of alternating [stroke, space] lengths for dashed symbol strokes.", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolDashOffset": { + "anyOf": [ + { + "description": "The pixel offset at which to start drawing with the symbol stroke dash array.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolFillColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "The color of the legend symbol," + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolLimit": { + "anyOf": [ + { + "description": "The maximum number of allowed entries for a symbol legend. Additional entries will be dropped.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolOffset": { + "anyOf": [ + { + "description": "Horizontal pixel offset for legend symbols.\n\n__Default value:__ `0`.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolOpacity": { + "anyOf": [ + { + "description": "Opacity of the legend symbols.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolSize": { + "anyOf": [ + { + "description": "The size of the legend symbol, in pixels.\n\n__Default value:__ `100`.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolStrokeColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "Stroke color for legend symbols." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolStrokeWidth": { + "anyOf": [ + { + "description": "The width of the symbol's stroke.\n\n__Default value:__ `1.5`.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolType": { + "anyOf": [ + { + "$ref": "#/definitions/SymbolShape", + "description": "The symbol shape. One of the plotting shapes `circle` (default), `square`, `cross`, `diamond`, `triangle-up`, `triangle-down`, `triangle-right`, or `triangle-left`, the line symbol `stroke`, or one of the centered directional shapes `arrow`, `wedge`, or `triangle`. Alternatively, a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) can be provided. For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.\n\n__Default value:__ `\"circle\"`." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "tickCount": { + "anyOf": [ + { + "$ref": "#/definitions/TickCount", + "description": "The desired number of tick values for quantitative legends." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "tickMinStep": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The minimum desired step between legend ticks, in terms of scale domain values. For example, a value of `1` indicates that ticks should not be less than 1 unit apart. If `tickMinStep` is specified, the `tickCount` value will be adjusted, if necessary, to enforce the minimum step value.\n\n__Default value__: `undefined`" + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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." + }, + "titleAlign": { + "anyOf": [ + { + "$ref": "#/definitions/Align", + "description": "Horizontal text alignment for legend titles.\n\n__Default value:__ `\"left\"`." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleAnchor": { + "anyOf": [ + { + "$ref": "#/definitions/TitleAnchor", + "description": "Text anchor position for placing legend titles." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleBaseline": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline", + "description": "Vertical text baseline for legend titles. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone.\n\n__Default value:__ `\"top\"`." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "The color of the legend title, can be in hex color code or regular color name." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleFont": { + "anyOf": [ + { + "description": "The font of the legend title.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleFontSize": { + "anyOf": [ + { + "description": "The font size of the legend title.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleFontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle", + "description": "The font style of the legend title." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleFontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight", + "description": "The font weight of the legend title. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleLimit": { + "anyOf": [ + { + "description": "Maximum allowed pixel width of legend titles.\n\n__Default value:__ `180`.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleLineHeight": { + "anyOf": [ + { + "description": "Line height in pixels for multi-line title text or title text with `\"line-top\"` or `\"line-bottom\"` baseline.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleOpacity": { + "anyOf": [ + { + "description": "Opacity of the legend title.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleOrient": { + "anyOf": [ + { + "$ref": "#/definitions/Orient", + "description": "Orientation of the legend title." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titlePadding": { + "anyOf": [ + { + "description": "The padding, in pixels, between title and legend.\n\n__Default value:__ `5`.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "type": { + "description": "The type of the legend. Use `\"symbol\"` to create a discrete legend and `\"gradient\"` for a continuous color gradient.\n\n__Default value:__ `\"gradient\"` for non-binned quantitative fields and temporal fields; `\"symbol\"` otherwise.", + "enum": [ + "symbol", + "gradient" + ], + "type": "string" + }, + "values": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "items": { + "type": "boolean" + }, + "type": "array" + }, + { + "items": { + "$ref": "#/definitions/DateTime" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Explicitly set the visible legend values." + }, + "zindex": { + "description": "A non-negative integer indicating the z-index of the legend. If zindex is 0, legend should be drawn behind all chart elements. To put them in front, use zindex = 1.", + "minimum": 0, + "type": "number" + } + }, + "type": "object" + }, + "LegendBinding": { + "anyOf": [ + { + "const": "legend", + "type": "string" + }, + { + "$ref": "#/definitions/LegendStreamBinding" + } + ] + }, + "LegendConfig": { + "additionalProperties": false, + "properties": { + "aria": { + "anyOf": [ + { + "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG group, removing the legend from the ARIA accessibility tree.\n\n__Default value:__ `true`", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "clipHeight": { + "anyOf": [ + { + "description": "The height in pixels to clip symbol legend entries and limit their size.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "columnPadding": { + "anyOf": [ + { + "description": "The horizontal padding in pixels between symbol legend entries.\n\n__Default value:__ `10`.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "columns": { + "anyOf": [ + { + "description": "The number of columns in which to arrange symbol legend entries. A value of `0` or lower indicates a single row with one column per entry.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadius": { + "anyOf": [ + { + "description": "Corner radius for the full legend.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "description": { + "anyOf": [ + { + "description": "A text description of this legend for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If the `aria` property is true, for SVG output the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute) will be set to this description. If the description is unspecified it will be automatically generated.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "direction": { + "$ref": "#/definitions/Orientation", + "description": "The direction of the legend, one of `\"vertical\"` or `\"horizontal\"`.\n\n__Default value:__\n- For top-/bottom-`orient`ed legends, `\"horizontal\"`\n- For left-/right-`orient`ed legends, `\"vertical\"`\n- For top/bottom-left/right-`orient`ed legends, `\"horizontal\"` for gradient legends and `\"vertical\"` for symbol legends." + }, + "disable": { + "description": "Disable legend by default", + "type": "boolean" + }, + "fillColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "Background fill color for the full legend." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "gradientDirection": { + "anyOf": [ + { + "$ref": "#/definitions/Orientation", + "description": "The default direction (`\"horizontal\"` or `\"vertical\"`) for gradient legends.\n\n__Default value:__ `\"vertical\"`." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "gradientHorizontalMaxLength": { + "description": "Max legend length for a horizontal gradient when `config.legend.gradientLength` is undefined.\n\n__Default value:__ `200`", + "type": "number" + }, + "gradientHorizontalMinLength": { + "description": "Min legend length for a horizontal gradient when `config.legend.gradientLength` is undefined.\n\n__Default value:__ `100`", + "type": "number" + }, + "gradientLabelLimit": { + "anyOf": [ + { + "description": "The maximum allowed length in pixels of color ramp gradient labels.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "gradientLabelOffset": { + "anyOf": [ + { + "description": "Vertical offset in pixels for color ramp gradient labels.\n\n__Default value:__ `2`.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "gradientLength": { + "anyOf": [ + { + "description": "The length in pixels of the primary axis of a color gradient. This value corresponds to the height of a vertical gradient or the width of a horizontal gradient.\n\n__Default value:__ `200`.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "gradientOpacity": { + "anyOf": [ + { + "description": "Opacity of the color gradient.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "gradientStrokeColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "The color of the gradient stroke, can be in hex color code or regular color name.\n\n__Default value:__ `\"lightGray\"`." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "gradientStrokeWidth": { + "anyOf": [ + { + "description": "The width of the gradient stroke, in pixels.\n\n__Default value:__ `0`.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "gradientThickness": { + "anyOf": [ + { + "description": "The thickness in pixels of the color gradient. This value corresponds to the width of a vertical gradient or the height of a horizontal gradient.\n\n__Default value:__ `16`.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "gradientVerticalMaxLength": { + "description": "Max legend length for a vertical gradient when `config.legend.gradientLength` is undefined.\n\n__Default value:__ `200`", + "type": "number" + }, + "gradientVerticalMinLength": { + "description": "Min legend length for a vertical gradient when `config.legend.gradientLength` is undefined.\n\n__Default value:__ `100`", + "type": "number" + }, + "gridAlign": { + "anyOf": [ + { + "$ref": "#/definitions/LayoutAlign", + "description": "The alignment to apply to symbol legends rows and columns. The supported string values are `\"all\"`, `\"each\"` (the default), and `none`. For more information, see the [grid layout documentation](https://vega.github.io/vega/docs/layout).\n\n__Default value:__ `\"each\"`." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelAlign": { + "anyOf": [ + { + "$ref": "#/definitions/Align", + "description": "The alignment of the legend label, can be left, center, or right." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelBaseline": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline", + "description": "The position of the baseline of legend label, can be `\"top\"`, `\"middle\"`, `\"bottom\"`, or `\"alphabetic\"`.\n\n__Default value:__ `\"middle\"`." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "The color of the legend label, can be in hex color code or regular color name." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelFont": { + "anyOf": [ + { + "description": "The font of the legend label.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelFontSize": { + "anyOf": [ + { + "description": "The font size of legend label.\n\n__Default value:__ `10`.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelFontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle", + "description": "The font style of legend label." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelFontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight", + "description": "The font weight of legend label." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelLimit": { + "anyOf": [ + { + "description": "Maximum allowed pixel width of legend tick labels.\n\n__Default value:__ `160`.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelOffset": { + "anyOf": [ + { + "description": "The offset of the legend label.\n\n__Default value:__ `4`.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelOpacity": { + "anyOf": [ + { + "description": "Opacity of labels.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelOverlap": { + "anyOf": [ + { + "$ref": "#/definitions/LabelOverlap" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The strategy to use for resolving overlap of labels in gradient legends. If `false`, no overlap reduction is attempted. If set to `true` or `\"parity\"`, a strategy of removing every other label is used. If set to `\"greedy\"`, a linear scan of the labels is performed, removing any label that overlaps with the last visible label (this often works better for log-scaled axes).\n\n__Default value:__ `\"greedy\"` for `log scales otherwise `true`." + }, + "labelPadding": { + "anyOf": [ + { + "description": "Padding in pixels between the legend and legend labels.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "labelSeparation": { + "anyOf": [ + { + "description": "The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default `0`). This property is ignored if *labelOverlap* resolution is not enabled.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "layout": { + "$ref": "#/definitions/ExprRef" + }, + "legendX": { + "anyOf": [ + { + "description": "Custom x-position for legend with orient \"none\".", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "legendY": { + "anyOf": [ + { + "description": "Custom y-position for legend with orient \"none\".", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "offset": { + "anyOf": [ + { + "description": "The offset in pixels by which to displace the legend from the data rectangle and axes.\n\n__Default value:__ `18`.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "orient": { + "$ref": "#/definitions/LegendOrient", + "description": "The orientation of the legend, which determines how the legend is positioned within the scene. One of `\"left\"`, `\"right\"`, `\"top\"`, `\"bottom\"`, `\"top-left\"`, `\"top-right\"`, `\"bottom-left\"`, `\"bottom-right\"`, `\"none\"`.\n\n__Default value:__ `\"right\"`" + }, + "padding": { + "anyOf": [ + { + "description": "The padding between the border and content of the legend group.\n\n__Default value:__ `0`.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "rowPadding": { + "anyOf": [ + { + "description": "The vertical padding in pixels between symbol legend entries.\n\n__Default value:__ `2`.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "Border stroke color for the full legend." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeDash": { + "anyOf": [ + { + "description": "Border stroke dash pattern for the full legend.", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeWidth": { + "anyOf": [ + { + "description": "Border stroke width for the full legend.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolBaseFillColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "Default fill color for legend symbols. Only applied if there is no `\"fill\"` scale color encoding for the legend.\n\n__Default value:__ `\"transparent\"`." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolBaseStrokeColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "Default stroke color for legend symbols. Only applied if there is no `\"fill\"` scale color encoding for the legend.\n\n__Default value:__ `\"gray\"`." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolDash": { + "anyOf": [ + { + "description": "An array of alternating [stroke, space] lengths for dashed symbol strokes.", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolDashOffset": { + "anyOf": [ + { + "description": "The pixel offset at which to start drawing with the symbol stroke dash array.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolDirection": { + "anyOf": [ + { + "$ref": "#/definitions/Orientation", + "description": "The default direction (`\"horizontal\"` or `\"vertical\"`) for symbol legends.\n\n__Default value:__ `\"vertical\"`." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolFillColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "The color of the legend symbol," + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolLimit": { + "anyOf": [ + { + "description": "The maximum number of allowed entries for a symbol legend. Additional entries will be dropped.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolOffset": { + "anyOf": [ + { + "description": "Horizontal pixel offset for legend symbols.\n\n__Default value:__ `0`.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolOpacity": { + "anyOf": [ + { + "description": "Opacity of the legend symbols.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolSize": { + "anyOf": [ + { + "description": "The size of the legend symbol, in pixels.\n\n__Default value:__ `100`.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolStrokeColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "Stroke color for legend symbols." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolStrokeWidth": { + "anyOf": [ + { + "description": "The width of the symbol's stroke.\n\n__Default value:__ `1.5`.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "symbolType": { + "anyOf": [ + { + "$ref": "#/definitions/SymbolShape", + "description": "The symbol shape. One of the plotting shapes `circle` (default), `square`, `cross`, `diamond`, `triangle-up`, `triangle-down`, `triangle-right`, or `triangle-left`, the line symbol `stroke`, or one of the centered directional shapes `arrow`, `wedge`, or `triangle`. Alternatively, a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) can be provided. For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.\n\n__Default value:__ `\"circle\"`." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "tickCount": { + "anyOf": [ + { + "$ref": "#/definitions/TickCount", + "description": "The desired number of tick values for quantitative legends." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "title": { + "description": "Set to null to disable title for the axis, legend, or header.", + "type": "null" + }, + "titleAlign": { + "anyOf": [ + { + "$ref": "#/definitions/Align", + "description": "Horizontal text alignment for legend titles.\n\n__Default value:__ `\"left\"`." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleAnchor": { + "anyOf": [ + { + "$ref": "#/definitions/TitleAnchor", + "description": "Text anchor position for placing legend titles." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleBaseline": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline", + "description": "Vertical text baseline for legend titles. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone.\n\n__Default value:__ `\"top\"`." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "The color of the legend title, can be in hex color code or regular color name." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleFont": { + "anyOf": [ + { + "description": "The font of the legend title.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleFontSize": { + "anyOf": [ + { + "description": "The font size of the legend title.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleFontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle", + "description": "The font style of the legend title." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleFontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight", + "description": "The font weight of the legend title. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleLimit": { + "anyOf": [ + { + "description": "Maximum allowed pixel width of legend titles.\n\n__Default value:__ `180`.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleLineHeight": { + "anyOf": [ + { + "description": "Line height in pixels for multi-line title text or title text with `\"line-top\"` or `\"line-bottom\"` baseline.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleOpacity": { + "anyOf": [ + { + "description": "Opacity of the legend title.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titleOrient": { + "anyOf": [ + { + "$ref": "#/definitions/Orient", + "description": "Orientation of the legend title." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "titlePadding": { + "anyOf": [ + { + "description": "The padding, in pixels, between title and legend.\n\n__Default value:__ `5`.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "unselectedOpacity": { + "description": "The opacity of unselected legend entries.\n\n__Default value:__ 0.35.", + "type": "number" + }, + "zindex": { + "anyOf": [ + { + "description": "The integer z-index indicating the layering of the legend group relative to other axis, mark, and legend groups.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + } + }, + "type": "object" + }, + "LegendOrient": { + "enum": [ + "none", + "left", + "right", + "top", + "bottom", + "top-left", + "top-right", + "bottom-left", + "bottom-right" + ], + "type": "string" + }, + "LegendResolveMap": { + "additionalProperties": false, + "properties": { + "angle": { + "$ref": "#/definitions/ResolveMode" + }, + "color": { + "$ref": "#/definitions/ResolveMode" + }, + "fill": { + "$ref": "#/definitions/ResolveMode" + }, + "fillOpacity": { + "$ref": "#/definitions/ResolveMode" + }, + "opacity": { + "$ref": "#/definitions/ResolveMode" + }, + "shape": { + "$ref": "#/definitions/ResolveMode" + }, + "size": { + "$ref": "#/definitions/ResolveMode" + }, + "stroke": { + "$ref": "#/definitions/ResolveMode" + }, + "strokeDash": { + "$ref": "#/definitions/ResolveMode" + }, + "strokeOpacity": { + "$ref": "#/definitions/ResolveMode" + }, + "strokeWidth": { + "$ref": "#/definitions/ResolveMode" + } + }, + "type": "object" + }, + "LegendStreamBinding": { + "additionalProperties": false, + "properties": { + "legend": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/Stream" + } + ] + } + }, + "required": [ + "legend" + ], + "type": "object" + }, + "LineConfig": { + "additionalProperties": false, + "properties": { + "align": { + "anyOf": [ + { + "$ref": "#/definitions/Align" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\"left\"`, `\"right\"`, `\"center\"`.\n\n__Note:__ Expression reference is *not* supported for range marks." + }, + "angle": { + "anyOf": [ + { + "description": "The rotation angle of the text, in degrees.", + "maximum": 360, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "aria": { + "anyOf": [ + { + "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ariaRole": { + "anyOf": [ + { + "description": "Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"role\" attribute. Warning: this property is experimental and may be changed in the future.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ariaRoleDescription": { + "anyOf": [ + { + "description": "A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"aria-roledescription\" attribute. Warning: this property is experimental and may be changed in the future.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "aspect": { + "anyOf": [ + { + "description": "Whether to keep aspect ratio of image marks.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "baseline": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "For text marks, the vertical text baseline. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, `\"line-bottom\"`, or an expression reference that provides one of the valid values. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Note:__ Expression reference is *not* supported for range marks." + }, + "blend": { + "anyOf": [ + { + "$ref": "#/definitions/Blend", + "description": "The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `\"source-over\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "color": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default color.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`." + }, + "cornerRadius": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusBottomLeft": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusBottomRight": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusTopLeft": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusTopRight": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cursor": { + "anyOf": [ + { + "$ref": "#/definitions/Cursor", + "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "description": { + "anyOf": [ + { + "description": "A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dir": { + "anyOf": [ + { + "$ref": "#/definitions/TextDirection", + "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dx": { + "anyOf": [ + { + "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dy": { + "anyOf": [ + { + "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ellipsis": { + "anyOf": [ + { + "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "endAngle": { + "anyOf": [ + { + "description": "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fill": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)" + }, + "fillOpacity": { + "anyOf": [ + { + "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "filled": { + "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\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": { + "anyOf": [ + { + "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontSize": { + "anyOf": [ + { + "description": "The font size, in pixels.\n\n__Default value:__ `11`", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle", + "description": "The font style (e.g., `\"italic\"`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight", + "description": "The font weight. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "height": { + "anyOf": [ + { + "description": "Height of the marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "href": { + "anyOf": [ + { + "$ref": "#/definitions/URI", + "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "innerRadius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "interpolate": { + "anyOf": [ + { + "$ref": "#/definitions/Interpolate", + "description": "The line interpolation method to use for line and area marks. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function.\n- `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "invalid": { + "anyOf": [ + { + "$ref": "#/definitions/MarkInvalidDataMode" + }, + { + "type": "null" + } + ], + "description": "Invalid data mode, which defines how the marks and corresponding scales should represent invalid values (`null` and `NaN` in continuous scales *without* defined output for invalid values).\n\n- `\"filter\"` — *Exclude* all invalid values from the visualization's *marks* and *scales*. For path marks (for line, area, trail), this option will create paths that connect valid points, as if the data rows with invalid values do not exist.\n\n- `\"break-paths-filter-domains\"` — Break path marks (for line, area, trail) at invalid values. For non-path marks, this is equivalent to `\"filter\"`. All *scale* domains will *exclude* these filtered data points.\n\n- `\"break-paths-show-domains\"` — Break paths (for line, area, trail) at invalid values. Hide invalid values for non-path marks. All *scale* domains will *include* these filtered data points (for both path and non-path marks).\n\n- `\"show\"` or `null` — Show all data points in the marks and scale domains. Each scale will use the output for invalid values defined in `config.scale.invalid` or, if unspecified, by default invalid values will produce the same visual values as zero (if the scale includes zero) or the minimum value (if the scale does not include zero).\n\n- `\"break-paths-show-path-domains\"` (default) — This is equivalent to `\"break-paths-show-domains\"` for path-based marks (line/area/trail) and `\"filter\"` for non-path marks.\n\n__Note__: If any channel's scale has an output for invalid values defined in `config.scale.invalid`, all values for the scales will be considered \"valid\" since they can produce a reasonable output for the scales. Thus, fields for such channels will not be filtered and will not cause path breaks." + }, + "limit": { + "anyOf": [ + { + "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "lineBreak": { + "anyOf": [ + { + "description": "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "lineHeight": { + "anyOf": [ + { + "description": "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "opacity": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.", + "maximum": 1, + "minimum": 0 + }, + "order": { + "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.", + "type": [ + "null", + "boolean" + ] + }, + "orient": { + "$ref": "#/definitions/Orientation", + "description": "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.\n- For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension.\n- For area, this property determines the orient property of the Vega output.\n- For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored." + }, + "outerRadius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "padAngle": { + "anyOf": [ + { + "description": "The angular padding applied to sides of the arc, in radians.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "point": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/OverlayMarkDef" + }, + { + "const": "transparent", + "type": "string" + } + ], + "description": "A flag for overlaying points on top of line or area marks, or an object defining the properties of the overlayed points.\n\n- If this property is `\"transparent\"`, transparent points will be used (for enhancing tooltips and selections).\n\n- If this property is an empty object (`{}`) or `true`, filled points with default properties will be used.\n\n- If this property is `false`, no points would be automatically added to line or area marks.\n\n__Default value:__ `false`." + }, + "radius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties.\n\n__Default value:__ `min(plot_width, plot_height)/2`", + "minimum": 0 + }, + "radius2": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The secondary (inner) radius in pixels of arc marks.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "shape": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/SymbolShape" + }, + { + "type": "string" + } + ], + "description": "Shape of the point marks. Supported values include:\n- plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`.\n- the line symbol `\"stroke\"`\n- centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"`\n- a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "size": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default size for marks.\n- For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.\n- For `bar`, this represents the band size of the bar, in pixels.\n- For `text`, this represents the font size, in pixels.\n\n__Default value:__\n- `30` for point, circle, square marks; width/height's `step`\n- `2` for bar marks with discrete dimensions;\n- `5` for bar marks with continuous dimensions;\n- `11` for text marks.", + "minimum": 0 + }, + "smooth": { + "anyOf": [ + { + "description": "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "startAngle": { + "anyOf": [ + { + "description": "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "stroke": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)" + }, + "strokeCap": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeCap", + "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeDash": { + "anyOf": [ + { + "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeDashOffset": { + "anyOf": [ + { + "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeJoin": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeJoin", + "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeMiterLimit": { + "anyOf": [ + { + "description": "The miter limit at which to bevel a line join.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeOffset": { + "anyOf": [ + { + "description": "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeOpacity": { + "anyOf": [ + { + "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeWidth": { + "anyOf": [ + { + "description": "The stroke width, in pixels.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "tension": { + "anyOf": [ + { + "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "text": { + "anyOf": [ + { + "$ref": "#/definitions/Text", + "description": "Placeholder text if the `text` channel is not specified" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "theta": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians.", + "maximum": 360, + "minimum": 0 + }, + "theta2": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise." + }, + "timeUnitBandPosition": { + "description": "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.", + "type": "number" + }, + "timeUnitBandSize": { + "description": "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.", + "type": "number" + }, + "tooltip": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "$ref": "#/definitions/TooltipContent" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "type": "null" + } + ], + "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used.\n- If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used.\n- If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite.\n\n__Default value:__ `null`" + }, + "url": { + "anyOf": [ + { + "$ref": "#/definitions/URI", + "description": "The URL of the image file for image marks." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "width": { + "anyOf": [ + { + "description": "Width of the marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "x": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot." + }, + "x2": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot." + }, + "y": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot." + }, + "y2": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot." + } + }, + "type": "object" + }, + "LineString": { + "additionalProperties": false, + "description": "LineString geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.4", + "properties": { + "bbox": { + "$ref": "#/definitions/BBox", + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. https://tools.ietf.org/html/rfc7946#section-5" + }, + "coordinates": { + "items": { + "$ref": "#/definitions/Position" + }, + "type": "array" + }, + "type": { + "const": "LineString", + "description": "Specifies the type of GeoJSON object.", + "type": "string" + } + }, + "required": [ + "coordinates", + "type" + ], + "type": "object" + }, + "LinearGradient": { + "additionalProperties": false, + "properties": { + "gradient": { + "const": "linear", + "description": "The type of gradient. Use `\"linear\"` for a linear gradient.", + "type": "string" + }, + "id": { + "type": "string" + }, + "stops": { + "description": "An array of gradient stops defining the gradient color sequence.", + "items": { + "$ref": "#/definitions/GradientStop" + }, + "type": "array" + }, + "x1": { + "description": "The starting x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\n\n__Default value:__ `0`", + "type": "number" + }, + "x2": { + "description": "The ending x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\n\n__Default value:__ `1`", + "type": "number" + }, + "y1": { + "description": "The starting y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\n\n__Default value:__ `0`", + "type": "number" + }, + "y2": { + "description": "The ending y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\n\n__Default value:__ `0`", + "type": "number" + } + }, + "required": [ + "gradient", + "stops" + ], + "type": "object" + }, + "LocalMultiTimeUnit": { + "enum": [ + "yearquarter", + "yearquartermonth", + "yearmonth", + "yearmonthdate", + "yearmonthdatehours", + "yearmonthdatehoursminutes", + "yearmonthdatehoursminutesseconds", + "yearweek", + "yearweekday", + "yearweekdayhours", + "yearweekdayhoursminutes", + "yearweekdayhoursminutesseconds", + "yeardayofyear", + "quartermonth", + "monthdate", + "monthdatehours", + "monthdatehoursminutes", + "monthdatehoursminutesseconds", + "weekday", + "weekdayhours", + "weekdayhoursminutes", + "weekdayhoursminutesseconds", + "dayhours", + "dayhoursminutes", + "dayhoursminutesseconds", + "hoursminutes", + "hoursminutesseconds", + "minutesseconds", + "secondsmilliseconds" + ], + "type": "string" + }, + "LocalSingleTimeUnit": { + "enum": [ + "year", + "quarter", + "month", + "week", + "day", + "dayofyear", + "date", + "hours", + "minutes", + "seconds", + "milliseconds" + ], + "type": "string" + }, + "Locale": { + "additionalProperties": false, + "properties": { + "number": { + "$ref": "#/definitions/NumberLocale" + }, + "time": { + "$ref": "#/definitions/TimeLocale" + } + }, + "type": "object" + }, + "LoessTransform": { + "additionalProperties": false, + "properties": { + "as": { + "description": "The output field names for the smoothed points generated by the loess transform.\n\n__Default value:__ The field names of the input x and y values.", + "items": { + "$ref": "#/definitions/FieldName" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "bandwidth": { + "description": "A bandwidth parameter in the range `[0, 1]` that determines the amount of smoothing.\n\n__Default value:__ `0.3`", + "type": "number" + }, + "groupby": { + "description": "The data fields to group by. If not specified, a single group containing all data objects will be used.", + "items": { + "$ref": "#/definitions/FieldName" + }, + "type": "array" + }, + "loess": { + "$ref": "#/definitions/FieldName", + "description": "The data field of the dependent variable to smooth." + }, + "on": { + "$ref": "#/definitions/FieldName", + "description": "The data field of the independent variable to use a predictor." + } + }, + "required": [ + "loess", + "on" + ], + "type": "object" + }, + "LogicalAnd": { + "additionalProperties": false, + "properties": { + "and": { + "items": { + "$ref": "#/definitions/PredicateComposition" + }, + "type": "array" + } + }, + "required": [ + "and" + ], + "type": "object" + }, + "PredicateComposition": { + "anyOf": [ + { + "$ref": "#/definitions/LogicalNot" + }, + { + "$ref": "#/definitions/LogicalAnd" + }, + { + "$ref": "#/definitions/LogicalOr" + }, + { + "$ref": "#/definitions/Predicate" + } + ] + }, + "LogicalNot": { + "additionalProperties": false, + "properties": { + "not": { + "$ref": "#/definitions/PredicateComposition" + } + }, + "required": [ + "not" + ], + "type": "object" + }, + "LogicalOr": { + "additionalProperties": false, + "properties": { + "or": { + "items": { + "$ref": "#/definitions/PredicateComposition" + }, + "type": "array" + } + }, + "required": [ + "or" + ], + "type": "object" + }, + "LookupData": { + "additionalProperties": false, + "properties": { + "data": { + "$ref": "#/definitions/Data", + "description": "Secondary data source to lookup in." + }, + "fields": { + "description": "Fields in foreign data or selection to lookup. If not specified, the entire object is queried.", + "items": { + "$ref": "#/definitions/FieldName" + }, + "type": "array" + }, + "key": { + "$ref": "#/definitions/FieldName", + "description": "Key in data to lookup." + } + }, + "required": [ + "data", + "key" + ], + "type": "object" + }, + "LookupSelection": { + "additionalProperties": false, + "properties": { + "fields": { + "description": "Fields in foreign data or selection to lookup. If not specified, the entire object is queried.", + "items": { + "$ref": "#/definitions/FieldName" + }, + "type": "array" + }, + "key": { + "$ref": "#/definitions/FieldName", + "description": "Key in data to lookup." + }, + "param": { + "$ref": "#/definitions/ParameterName", + "description": "Selection parameter name to look up." + } + }, + "required": [ + "key", + "param" + ], + "type": "object" + }, + "LookupTransform": { + "additionalProperties": false, + "properties": { + "as": { + "anyOf": [ + { + "$ref": "#/definitions/FieldName" + }, + { + "items": { + "$ref": "#/definitions/FieldName" + }, + "type": "array" + } + ], + "description": "The output fields on which to store the looked up data values.\n\nFor data lookups, this property may be left blank if `from.fields` has been specified (those field names will be used); if `from.fields` has not been specified, `as` must be a string.\n\nFor selection lookups, this property is optional: if unspecified, looked up values will be stored under a property named for the selection; and if specified, it must correspond to `from.fields`." + }, + "default": { + "description": "The default value to use if lookup fails.\n\n__Default value:__ `null`" + }, + "from": { + "anyOf": [ + { + "$ref": "#/definitions/LookupData" + }, + { + "$ref": "#/definitions/LookupSelection" + } + ], + "description": "Data source or selection for secondary data reference." + }, + "lookup": { + "description": "Key in primary data source.", + "type": "string" + } + }, + "required": [ + "lookup", + "from" + ], + "type": "object" + }, + "Mark": { + "description": "All types of primitive marks.", + "enum": [ + "arc", + "area", + "bar", + "image", + "line", + "point", + "rect", + "rule", + "text", + "tick", + "trail", + "circle", + "square", + "geoshape" + ], + "type": "string" + }, + "MarkConfig": { + "additionalProperties": false, + "properties": { + "align": { + "anyOf": [ + { + "$ref": "#/definitions/Align" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\"left\"`, `\"right\"`, `\"center\"`.\n\n__Note:__ Expression reference is *not* supported for range marks." + }, + "angle": { + "anyOf": [ + { + "description": "The rotation angle of the text, in degrees.", + "maximum": 360, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "aria": { + "anyOf": [ + { + "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ariaRole": { + "anyOf": [ + { + "description": "Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"role\" attribute. Warning: this property is experimental and may be changed in the future.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ariaRoleDescription": { + "anyOf": [ + { + "description": "A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"aria-roledescription\" attribute. Warning: this property is experimental and may be changed in the future.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "aspect": { + "anyOf": [ + { + "description": "Whether to keep aspect ratio of image marks.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "baseline": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "For text marks, the vertical text baseline. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, `\"line-bottom\"`, or an expression reference that provides one of the valid values. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Note:__ Expression reference is *not* supported for range marks." + }, + "blend": { + "anyOf": [ + { + "$ref": "#/definitions/Blend", + "description": "The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `\"source-over\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "color": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default color.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`." + }, + "cornerRadius": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusBottomLeft": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusBottomRight": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusTopLeft": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusTopRight": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cursor": { + "anyOf": [ + { + "$ref": "#/definitions/Cursor", + "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "description": { + "anyOf": [ + { + "description": "A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dir": { + "anyOf": [ + { + "$ref": "#/definitions/TextDirection", + "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dx": { + "anyOf": [ + { + "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dy": { + "anyOf": [ + { + "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ellipsis": { + "anyOf": [ + { + "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "endAngle": { + "anyOf": [ + { + "description": "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fill": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)" + }, + "fillOpacity": { + "anyOf": [ + { + "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "filled": { + "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\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": { + "anyOf": [ + { + "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontSize": { + "anyOf": [ + { + "description": "The font size, in pixels.\n\n__Default value:__ `11`", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle", + "description": "The font style (e.g., `\"italic\"`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight", + "description": "The font weight. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "height": { + "anyOf": [ + { + "description": "Height of the marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "href": { + "anyOf": [ + { + "$ref": "#/definitions/URI", + "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "innerRadius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "interpolate": { + "anyOf": [ + { + "$ref": "#/definitions/Interpolate", + "description": "The line interpolation method to use for line and area marks. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function.\n- `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "invalid": { + "anyOf": [ + { + "$ref": "#/definitions/MarkInvalidDataMode" + }, + { + "type": "null" + } + ], + "description": "Invalid data mode, which defines how the marks and corresponding scales should represent invalid values (`null` and `NaN` in continuous scales *without* defined output for invalid values).\n\n- `\"filter\"` — *Exclude* all invalid values from the visualization's *marks* and *scales*. For path marks (for line, area, trail), this option will create paths that connect valid points, as if the data rows with invalid values do not exist.\n\n- `\"break-paths-filter-domains\"` — Break path marks (for line, area, trail) at invalid values. For non-path marks, this is equivalent to `\"filter\"`. All *scale* domains will *exclude* these filtered data points.\n\n- `\"break-paths-show-domains\"` — Break paths (for line, area, trail) at invalid values. Hide invalid values for non-path marks. All *scale* domains will *include* these filtered data points (for both path and non-path marks).\n\n- `\"show\"` or `null` — Show all data points in the marks and scale domains. Each scale will use the output for invalid values defined in `config.scale.invalid` or, if unspecified, by default invalid values will produce the same visual values as zero (if the scale includes zero) or the minimum value (if the scale does not include zero).\n\n- `\"break-paths-show-path-domains\"` (default) — This is equivalent to `\"break-paths-show-domains\"` for path-based marks (line/area/trail) and `\"filter\"` for non-path marks.\n\n__Note__: If any channel's scale has an output for invalid values defined in `config.scale.invalid`, all values for the scales will be considered \"valid\" since they can produce a reasonable output for the scales. Thus, fields for such channels will not be filtered and will not cause path breaks." + }, + "limit": { + "anyOf": [ + { + "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "lineBreak": { + "anyOf": [ + { + "description": "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "lineHeight": { + "anyOf": [ + { + "description": "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "opacity": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.", + "maximum": 1, + "minimum": 0 + }, + "order": { + "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.", + "type": [ + "null", + "boolean" + ] + }, + "orient": { + "$ref": "#/definitions/Orientation", + "description": "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.\n- For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension.\n- For area, this property determines the orient property of the Vega output.\n- For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored." + }, + "outerRadius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "padAngle": { + "anyOf": [ + { + "description": "The angular padding applied to sides of the arc, in radians.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "radius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties.\n\n__Default value:__ `min(plot_width, plot_height)/2`", + "minimum": 0 + }, + "radius2": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The secondary (inner) radius in pixels of arc marks.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "shape": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/SymbolShape" + }, + { + "type": "string" + } + ], + "description": "Shape of the point marks. Supported values include:\n- plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`.\n- the line symbol `\"stroke\"`\n- centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"`\n- a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "size": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default size for marks.\n- For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.\n- For `bar`, this represents the band size of the bar, in pixels.\n- For `text`, this represents the font size, in pixels.\n\n__Default value:__\n- `30` for point, circle, square marks; width/height's `step`\n- `2` for bar marks with discrete dimensions;\n- `5` for bar marks with continuous dimensions;\n- `11` for text marks.", + "minimum": 0 + }, + "smooth": { + "anyOf": [ + { + "description": "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "startAngle": { + "anyOf": [ + { + "description": "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "stroke": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)" + }, + "strokeCap": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeCap", + "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeDash": { + "anyOf": [ + { + "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeDashOffset": { + "anyOf": [ + { + "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeJoin": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeJoin", + "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeMiterLimit": { + "anyOf": [ + { + "description": "The miter limit at which to bevel a line join.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeOffset": { + "anyOf": [ + { + "description": "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeOpacity": { + "anyOf": [ + { + "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeWidth": { + "anyOf": [ + { + "description": "The stroke width, in pixels.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "tension": { + "anyOf": [ + { + "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "text": { + "anyOf": [ + { + "$ref": "#/definitions/Text", + "description": "Placeholder text if the `text` channel is not specified" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "theta": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians.", + "maximum": 360, + "minimum": 0 + }, + "theta2": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise." + }, + "timeUnitBandPosition": { + "description": "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.", + "type": "number" + }, + "timeUnitBandSize": { + "description": "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.", + "type": "number" + }, + "tooltip": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "$ref": "#/definitions/TooltipContent" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "type": "null" + } + ], + "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used.\n- If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used.\n- If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite.\n\n__Default value:__ `null`" + }, + "url": { + "anyOf": [ + { + "$ref": "#/definitions/URI", + "description": "The URL of the image file for image marks." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "width": { + "anyOf": [ + { + "description": "Width of the marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "x": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot." + }, + "x2": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot." + }, + "y": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot." + }, + "y2": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot." + } + }, + "type": "object" + }, + "MarkDef": { + "additionalProperties": false, + "properties": { + "align": { + "anyOf": [ + { + "$ref": "#/definitions/Align" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\"left\"`, `\"right\"`, `\"center\"`.\n\n__Note:__ Expression reference is *not* supported for range marks." + }, + "angle": { + "anyOf": [ + { + "description": "The rotation angle of the text, in degrees.", + "maximum": 360, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "aria": { + "anyOf": [ + { + "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ariaRole": { + "anyOf": [ + { + "description": "Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"role\" attribute. Warning: this property is experimental and may be changed in the future.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ariaRoleDescription": { + "anyOf": [ + { + "description": "A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"aria-roledescription\" attribute. Warning: this property is experimental and may be changed in the future.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "aspect": { + "anyOf": [ + { + "description": "Whether to keep aspect ratio of image marks.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "bandSize": { + "description": "The width of the ticks.\n\n__Default value:__ 3/4 of step (width step for horizontal ticks and height step for vertical ticks).", + "minimum": 0, + "type": "number" + }, + "baseline": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "For text marks, the vertical text baseline. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, `\"line-bottom\"`, or an expression reference that provides one of the valid values. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Note:__ Expression reference is *not* supported for range marks." + }, + "binSpacing": { + "description": "Offset between bars for binned field. The ideal value for this is either 0 (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).\n\n__Default value:__ `1`", + "minimum": 0, + "type": "number" + }, + "blend": { + "anyOf": [ + { + "$ref": "#/definitions/Blend", + "description": "The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `\"source-over\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "clip": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Whether a mark be clipped to the enclosing group’s width and height." + }, + "color": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default color.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`." + }, + "continuousBandSize": { + "description": "The default size of the bars on continuous scales.\n\n__Default value:__ `5`", + "minimum": 0, + "type": "number" + }, + "cornerRadius": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusBottomLeft": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusBottomRight": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusEnd": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "- For vertical bars, top-left and top-right corner radius.\n\n- For horizontal bars, top-right and bottom-right corner radius." + }, + "cornerRadiusTopLeft": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusTopRight": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cursor": { + "anyOf": [ + { + "$ref": "#/definitions/Cursor", + "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "description": { + "anyOf": [ + { + "description": "A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dir": { + "anyOf": [ + { + "$ref": "#/definitions/TextDirection", + "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "discreteBandSize": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/RelativeBandSize" + } + ], + "description": "The default size of the bars with discrete dimensions. If unspecified, the default size is `step-2`, which provides 2 pixel offset between bars.", + "minimum": 0 + }, + "dx": { + "anyOf": [ + { + "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dy": { + "anyOf": [ + { + "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ellipsis": { + "anyOf": [ + { + "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fill": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)" + }, + "fillOpacity": { + "anyOf": [ + { + "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "filled": { + "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\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": { + "anyOf": [ + { + "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontSize": { + "anyOf": [ + { + "description": "The font size, in pixels.\n\n__Default value:__ `11`", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle", + "description": "The font style (e.g., `\"italic\"`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight", + "description": "The font weight. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "height": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RelativeBandSize" + } + ], + "description": "Height of the marks. One of:\n\n- A number representing a fixed pixel height.\n\n- A relative band size definition. For example, `{band: 0.5}` represents half of the band" + }, + "href": { + "anyOf": [ + { + "$ref": "#/definitions/URI", + "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "innerRadius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "interpolate": { + "anyOf": [ + { + "$ref": "#/definitions/Interpolate", + "description": "The line interpolation method to use for line and area marks. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function.\n- `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "invalid": { + "anyOf": [ + { + "$ref": "#/definitions/MarkInvalidDataMode" + }, + { + "type": "null" + } + ], + "description": "Invalid data mode, which defines how the marks and corresponding scales should represent invalid values (`null` and `NaN` in continuous scales *without* defined output for invalid values).\n\n- `\"filter\"` — *Exclude* all invalid values from the visualization's *marks* and *scales*. For path marks (for line, area, trail), this option will create paths that connect valid points, as if the data rows with invalid values do not exist.\n\n- `\"break-paths-filter-domains\"` — Break path marks (for line, area, trail) at invalid values. For non-path marks, this is equivalent to `\"filter\"`. All *scale* domains will *exclude* these filtered data points.\n\n- `\"break-paths-show-domains\"` — Break paths (for line, area, trail) at invalid values. Hide invalid values for non-path marks. All *scale* domains will *include* these filtered data points (for both path and non-path marks).\n\n- `\"show\"` or `null` — Show all data points in the marks and scale domains. Each scale will use the output for invalid values defined in `config.scale.invalid` or, if unspecified, by default invalid values will produce the same visual values as zero (if the scale includes zero) or the minimum value (if the scale does not include zero).\n\n- `\"break-paths-show-path-domains\"` (default) — This is equivalent to `\"break-paths-show-domains\"` for path-based marks (line/area/trail) and `\"filter\"` for non-path marks.\n\n__Note__: If any channel's scale has an output for invalid values defined in `config.scale.invalid`, all values for the scales will be considered \"valid\" since they can produce a reasonable output for the scales. Thus, fields for such channels will not be filtered and will not cause path breaks." + }, + "limit": { + "anyOf": [ + { + "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "line": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/OverlayMarkDef" + } + ], + "description": "A flag for overlaying line on top of area marks, or an object defining the properties of the overlayed lines.\n\n- If this value is an empty object (`{}`) or `true`, lines with default properties will be used.\n\n- If this value is `false`, no lines would be automatically added to area marks.\n\n__Default value:__ `false`." + }, + "lineBreak": { + "anyOf": [ + { + "description": "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "lineHeight": { + "anyOf": [ + { + "description": "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "minBandSize": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The minimum band size for bar and rectangle marks. __Default value:__ `0.25`" + }, + "opacity": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.", + "maximum": 1, + "minimum": 0 + }, + "order": { + "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.", + "type": [ + "null", + "boolean" + ] + }, + "orient": { + "$ref": "#/definitions/Orientation", + "description": "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.\n- For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension.\n- For area, this property determines the orient property of the Vega output.\n- For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored." + }, + "outerRadius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "padAngle": { + "anyOf": [ + { + "description": "The angular padding applied to sides of the arc, in radians.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "point": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/OverlayMarkDef" + }, + { + "const": "transparent", + "type": "string" + } + ], + "description": "A flag for overlaying points on top of line or area marks, or an object defining the properties of the overlayed points.\n\n- If this property is `\"transparent\"`, transparent points will be used (for enhancing tooltips and selections).\n\n- If this property is an empty object (`{}`) or `true`, filled points with default properties will be used.\n\n- If this property is `false`, no points would be automatically added to line or area marks.\n\n__Default value:__ `false`." + }, + "radius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties.\n\n__Default value:__ `min(plot_width, plot_height)/2`", + "minimum": 0 + }, + "radius2": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The secondary (inner) radius in pixels of arc marks.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "radius2Offset": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Offset for radius2." + }, + "radiusOffset": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Offset for radius." + }, + "shape": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/SymbolShape" + }, + { + "type": "string" + } + ], + "description": "Shape of the point marks. Supported values include:\n- plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`.\n- the line symbol `\"stroke\"`\n- centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"`\n- a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "size": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default size for marks.\n- For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.\n- For `bar`, this represents the band size of the bar, in pixels.\n- For `text`, this represents the font size, in pixels.\n\n__Default value:__\n- `30` for point, circle, square marks; width/height's `step`\n- `2` for bar marks with discrete dimensions;\n- `5` for bar marks with continuous dimensions;\n- `11` for text marks.", + "minimum": 0 + }, + "smooth": { + "anyOf": [ + { + "description": "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "stroke": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)" + }, + "strokeCap": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeCap", + "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeDash": { + "anyOf": [ + { + "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeDashOffset": { + "anyOf": [ + { + "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeJoin": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeJoin", + "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeMiterLimit": { + "anyOf": [ + { + "description": "The miter limit at which to bevel a line join.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeOffset": { + "anyOf": [ + { + "description": "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeOpacity": { + "anyOf": [ + { + "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeWidth": { + "anyOf": [ + { + "description": "The stroke width, in pixels.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "style": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "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](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. __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": { + "anyOf": [ + { + "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "text": { + "anyOf": [ + { + "$ref": "#/definitions/Text", + "description": "Placeholder text if the `text` channel is not specified" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "theta": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians.", + "maximum": 360, + "minimum": 0 + }, + "theta2": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise." + }, + "theta2Offset": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Offset for theta2." + }, + "thetaOffset": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Offset for theta." + }, + "thickness": { + "description": "Thickness of the tick mark.\n\n__Default value:__ `1`", + "minimum": 0, + "type": "number" + }, + "timeUnitBandPosition": { + "description": "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.", + "type": "number" + }, + "timeUnitBandSize": { + "description": "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.", + "type": "number" + }, + "tooltip": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "$ref": "#/definitions/TooltipContent" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "type": "null" + } + ], + "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used.\n- If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used.\n- If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite.\n\n__Default value:__ `null`" + }, + "type": { + "$ref": "#/definitions/Mark", + "description": "The mark type. This could a primitive mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`, `\"area\"`, `\"point\"`, `\"geoshape\"`, `\"rule\"`, and `\"text\"`) or a composite mark type (`\"boxplot\"`, `\"errorband\"`, `\"errorbar\"`)." + }, + "url": { + "anyOf": [ + { + "$ref": "#/definitions/URI", + "description": "The URL of the image file for image marks." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "width": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RelativeBandSize" + } + ], + "description": "Width of the marks. One of:\n\n- A number representing a fixed pixel width.\n\n- A relative band size definition. For example, `{band: 0.5}` represents half of the band." + }, + "x": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot." + }, + "x2": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot." + }, + "x2Offset": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Offset for x2-position." + }, + "xOffset": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Offset for x-position." + }, + "y": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot." + }, + "y2": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot." + }, + "y2Offset": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Offset for y2-position." + }, + "yOffset": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Offset for y-position." + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "MarkInvalidDataMode": { + "enum": [ + "filter", + "break-paths-filter-domains", + "break-paths-show-domains", + "break-paths-show-path-domains", + "show" + ], + "type": "string" + }, + "MarkPropDef<(Gradient|string|null)>": { + "anyOf": [ + { + "$ref": "#/definitions/FieldOrDatumDefWithCondition" + }, + { + "$ref": "#/definitions/FieldOrDatumDefWithCondition" + }, + { + "$ref": "#/definitions/ValueDefWithCondition" + } + ] + }, + "MarkPropDef<(string|null),TypeForShape>": { + "anyOf": [ + { + "$ref": "#/definitions/FieldOrDatumDefWithCondition,(string|null)>" + }, + { + "$ref": "#/definitions/FieldOrDatumDefWithCondition" + }, + { + "$ref": "#/definitions/ValueDefWithCondition,(string|null)>" + } + ] + }, + "MarkPropDef": { + "anyOf": [ + { + "$ref": "#/definitions/FieldOrDatumDefWithCondition" + }, + { + "$ref": "#/definitions/FieldOrDatumDefWithCondition" + }, + { + "$ref": "#/definitions/ValueDefWithCondition" + } + ] + }, + "MarkPropDef": { + "anyOf": [ + { + "$ref": "#/definitions/FieldOrDatumDefWithCondition" + }, + { + "$ref": "#/definitions/FieldOrDatumDefWithCondition" + }, + { + "$ref": "#/definitions/ValueDefWithCondition" + } + ] + }, + "MarkType": { + "enum": [ + "arc", + "area", + "image", + "group", + "line", + "path", + "rect", + "rule", + "shape", + "symbol", + "text", + "trail" + ], + "type": "string" + }, + "MergedStream": { + "additionalProperties": false, + "properties": { + "between": { + "items": { + "$ref": "#/definitions/Stream" + }, + "type": "array" + }, + "consume": { + "type": "boolean" + }, + "debounce": { + "type": "number" + }, + "filter": { + "anyOf": [ + { + "$ref": "#/definitions/Expr" + }, + { + "items": { + "$ref": "#/definitions/Expr" + }, + "type": "array" + } + ] + }, + "markname": { + "type": "string" + }, + "marktype": { + "$ref": "#/definitions/MarkType" + }, + "merge": { + "items": { + "$ref": "#/definitions/Stream" + }, + "type": "array" + }, + "throttle": { + "type": "number" + } + }, + "required": [ + "merge" + ], + "type": "object" + }, + "Month": { + "maximum": 12, + "minimum": 1, + "type": "number" + }, + "MultiLineString": { + "additionalProperties": false, + "description": "MultiLineString geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.5", + "properties": { + "bbox": { + "$ref": "#/definitions/BBox", + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. https://tools.ietf.org/html/rfc7946#section-5" + }, + "coordinates": { + "items": { + "items": { + "$ref": "#/definitions/Position" + }, + "type": "array" + }, + "type": "array" + }, + "type": { + "const": "MultiLineString", + "description": "Specifies the type of GeoJSON object.", + "type": "string" + } + }, + "required": [ + "coordinates", + "type" + ], + "type": "object" + }, + "MultiPoint": { + "additionalProperties": false, + "description": "MultiPoint geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.3", + "properties": { + "bbox": { + "$ref": "#/definitions/BBox", + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. https://tools.ietf.org/html/rfc7946#section-5" + }, + "coordinates": { + "items": { + "$ref": "#/definitions/Position" + }, + "type": "array" + }, + "type": { + "const": "MultiPoint", + "description": "Specifies the type of GeoJSON object.", + "type": "string" + } + }, + "required": [ + "coordinates", + "type" + ], + "type": "object" + }, + "MultiPolygon": { + "additionalProperties": false, + "description": "MultiPolygon geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.7", + "properties": { + "bbox": { + "$ref": "#/definitions/BBox", + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. https://tools.ietf.org/html/rfc7946#section-5" + }, + "coordinates": { + "items": { + "items": { + "items": { + "$ref": "#/definitions/Position" + }, + "type": "array" + }, + "type": "array" + }, + "type": "array" + }, + "type": { + "const": "MultiPolygon", + "description": "Specifies the type of GeoJSON object.", + "type": "string" + } + }, + "required": [ + "coordinates", + "type" + ], + "type": "object" + }, + "MultiTimeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/LocalMultiTimeUnit" + }, + { + "$ref": "#/definitions/UtcMultiTimeUnit" + } + ] + }, + "NamedData": { + "additionalProperties": false, + "properties": { + "format": { + "$ref": "#/definitions/DataFormat", + "description": "An object that specifies the format for parsing the data." + }, + "name": { + "description": "Provide a placeholder name and bind data at runtime.\n\nNew data may change the layout but Vega does not always resize the chart. To update the layout when the data updates, set [autosize](https://vega.github.io/vega-lite/docs/size.html#autosize) or explicitly use [view.resize](https://vega.github.io/vega/docs/api/view/#view_resize).", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "NonArgAggregateOp": { + "enum": [ + "average", + "count", + "distinct", + "max", + "mean", + "median", + "min", + "missing", + "product", + "q1", + "q3", + "ci0", + "ci1", + "stderr", + "stdev", + "stdevp", + "sum", + "valid", + "values", + "variance", + "variancep", + "exponential", + "exponentialb" + ], + "type": "string" + }, + "NonLayerRepeatSpec": { + "additionalProperties": false, + "description": "Base interface for a repeat specification.", + "properties": { + "align": { + "anyOf": [ + { + "$ref": "#/definitions/LayoutAlign" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\n- For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\n- For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`." + }, + "bounds": { + "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`", + "enum": [ + "full", + "flush" + ], + "type": "string" + }, + "center": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`" + }, + "columns": { + "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for:\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).", + "type": "number" + }, + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Data" + }, + { + "type": "null" + } + ], + "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent." + }, + "description": { + "description": "Description of this mark for commenting purpose.", + "type": "string" + }, + "name": { + "description": "Name of the visualization for later reference.", + "type": "string" + }, + "repeat": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "$ref": "#/definitions/RepeatMapping" + } + ], + "description": "Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If `\"repeat\"` is an array, the field can be referred to as `{\"repeat\": \"repeat\"}`. The repeated views are laid out in a wrapped row. You can set the number of columns to control the wrapping. 2) An object that maps `\"row\"` and/or `\"column\"` to the listed fields to be repeated along the particular orientations. The objects `{\"repeat\": \"row\"}` and `{\"repeat\": \"column\"}` can be used to refer to the repeated field respectively." + }, + "resolve": { + "$ref": "#/definitions/Resolve", + "description": "Scale, axis, and legend resolutions for view composition specifications." + }, + "spacing": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)" + }, + "spec": { + "$ref": "#/definitions/NonNormalizedSpec", + "description": "A specification of the view that gets repeated." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/TitleParams" + } + ], + "description": "Title for the plot." + }, + "transform": { + "description": "An array of data transformations such as filter and new field calculation.", + "items": { + "$ref": "#/definitions/Transform" + }, + "type": "array" + } + }, + "required": [ + "repeat", + "spec" + ], + "type": "object" + }, + "NonNormalizedSpec": { + "$ref": "#/definitions/Spec" + }, + "NumberLocale": { + "additionalProperties": false, + "description": "Locale definition for formatting numbers.", + "properties": { + "currency": { + "$ref": "#/definitions/Vector2", + "description": "The currency prefix and suffix (e.g., [\"$\", \"\"])." + }, + "decimal": { + "description": "The decimal point (e.g., \".\").", + "type": "string" + }, + "grouping": { + "description": "The array of group sizes (e.g., [3]), cycled as needed.", + "items": { + "type": "number" + }, + "type": "array" + }, + "minus": { + "description": "The minus sign (defaults to hyphen-minus, \"-\").", + "type": "string" + }, + "nan": { + "description": "The not-a-number value (defaults to \"NaN\").", + "type": "string" + }, + "numerals": { + "$ref": "#/definitions/Vector10", + "description": "An array of ten strings to replace the numerals 0-9." + }, + "percent": { + "description": "The percent sign (defaults to \"%\").", + "type": "string" + }, + "thousands": { + "description": "The group separator (e.g., \",\").", + "type": "string" + } + }, + "required": [ + "decimal", + "thousands", + "grouping", + "currency" + ], + "type": "object" + }, + "NumericArrayMarkPropDef": { + "$ref": "#/definitions/MarkPropDef" + }, + "NumericMarkPropDef": { + "$ref": "#/definitions/MarkPropDef" + }, + "OffsetDef": { + "anyOf": [ + { + "$ref": "#/definitions/ScaleFieldDef" + }, + { + "$ref": "#/definitions/ScaleDatumDef" + }, + { + "$ref": "#/definitions/ValueDef" + } + ] + }, + "OrderFieldDef": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "const": "binned", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "sort": { + "$ref": "#/definitions/SortOrder", + "description": "The sort order. One of `\"ascending\"` (default) or `\"descending\"`." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "OrderOnlyDef": { + "additionalProperties": false, + "properties": { + "sort": { + "$ref": "#/definitions/SortOrder", + "description": "The sort order. One of `\"ascending\"` (default) or `\"descending\"`." + } + }, + "type": "object" + }, + "OrderValueDef": { + "additionalProperties": false, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "value" + ], + "type": "object" + }, + "Orient": { + "enum": [ + "left", + "right", + "top", + "bottom" + ], + "type": "string" + }, + "Orientation": { + "enum": [ + "horizontal", + "vertical" + ], + "type": "string" + }, + "OverlayMarkDef": { + "additionalProperties": false, + "properties": { + "align": { + "anyOf": [ + { + "$ref": "#/definitions/Align" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\"left\"`, `\"right\"`, `\"center\"`.\n\n__Note:__ Expression reference is *not* supported for range marks." + }, + "angle": { + "anyOf": [ + { + "description": "The rotation angle of the text, in degrees.", + "maximum": 360, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "aria": { + "anyOf": [ + { + "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ariaRole": { + "anyOf": [ + { + "description": "Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"role\" attribute. Warning: this property is experimental and may be changed in the future.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ariaRoleDescription": { + "anyOf": [ + { + "description": "A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"aria-roledescription\" attribute. Warning: this property is experimental and may be changed in the future.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "aspect": { + "anyOf": [ + { + "description": "Whether to keep aspect ratio of image marks.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "baseline": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "For text marks, the vertical text baseline. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, `\"line-bottom\"`, or an expression reference that provides one of the valid values. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Note:__ Expression reference is *not* supported for range marks." + }, + "blend": { + "anyOf": [ + { + "$ref": "#/definitions/Blend", + "description": "The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `\"source-over\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "clip": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Whether a mark be clipped to the enclosing group’s width and height." + }, + "color": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default color.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`." + }, + "cornerRadius": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusBottomLeft": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusBottomRight": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusTopLeft": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusTopRight": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cursor": { + "anyOf": [ + { + "$ref": "#/definitions/Cursor", + "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "description": { + "anyOf": [ + { + "description": "A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dir": { + "anyOf": [ + { + "$ref": "#/definitions/TextDirection", + "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dx": { + "anyOf": [ + { + "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dy": { + "anyOf": [ + { + "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ellipsis": { + "anyOf": [ + { + "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "endAngle": { + "anyOf": [ + { + "description": "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fill": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)" + }, + "fillOpacity": { + "anyOf": [ + { + "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "filled": { + "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\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": { + "anyOf": [ + { + "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontSize": { + "anyOf": [ + { + "description": "The font size, in pixels.\n\n__Default value:__ `11`", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle", + "description": "The font style (e.g., `\"italic\"`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight", + "description": "The font weight. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "height": { + "anyOf": [ + { + "description": "Height of the marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "href": { + "anyOf": [ + { + "$ref": "#/definitions/URI", + "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "innerRadius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "interpolate": { + "anyOf": [ + { + "$ref": "#/definitions/Interpolate", + "description": "The line interpolation method to use for line and area marks. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function.\n- `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "invalid": { + "anyOf": [ + { + "$ref": "#/definitions/MarkInvalidDataMode" + }, + { + "type": "null" + } + ], + "description": "Invalid data mode, which defines how the marks and corresponding scales should represent invalid values (`null` and `NaN` in continuous scales *without* defined output for invalid values).\n\n- `\"filter\"` — *Exclude* all invalid values from the visualization's *marks* and *scales*. For path marks (for line, area, trail), this option will create paths that connect valid points, as if the data rows with invalid values do not exist.\n\n- `\"break-paths-filter-domains\"` — Break path marks (for line, area, trail) at invalid values. For non-path marks, this is equivalent to `\"filter\"`. All *scale* domains will *exclude* these filtered data points.\n\n- `\"break-paths-show-domains\"` — Break paths (for line, area, trail) at invalid values. Hide invalid values for non-path marks. All *scale* domains will *include* these filtered data points (for both path and non-path marks).\n\n- `\"show\"` or `null` — Show all data points in the marks and scale domains. Each scale will use the output for invalid values defined in `config.scale.invalid` or, if unspecified, by default invalid values will produce the same visual values as zero (if the scale includes zero) or the minimum value (if the scale does not include zero).\n\n- `\"break-paths-show-path-domains\"` (default) — This is equivalent to `\"break-paths-show-domains\"` for path-based marks (line/area/trail) and `\"filter\"` for non-path marks.\n\n__Note__: If any channel's scale has an output for invalid values defined in `config.scale.invalid`, all values for the scales will be considered \"valid\" since they can produce a reasonable output for the scales. Thus, fields for such channels will not be filtered and will not cause path breaks." + }, + "limit": { + "anyOf": [ + { + "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "lineBreak": { + "anyOf": [ + { + "description": "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "lineHeight": { + "anyOf": [ + { + "description": "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "opacity": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.", + "maximum": 1, + "minimum": 0 + }, + "order": { + "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.", + "type": [ + "null", + "boolean" + ] + }, + "orient": { + "$ref": "#/definitions/Orientation", + "description": "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.\n- For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension.\n- For area, this property determines the orient property of the Vega output.\n- For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored." + }, + "outerRadius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "padAngle": { + "anyOf": [ + { + "description": "The angular padding applied to sides of the arc, in radians.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "radius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties.\n\n__Default value:__ `min(plot_width, plot_height)/2`", + "minimum": 0 + }, + "radius2": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The secondary (inner) radius in pixels of arc marks.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "radius2Offset": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Offset for radius2." + }, + "radiusOffset": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Offset for radius." + }, + "shape": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/SymbolShape" + }, + { + "type": "string" + } + ], + "description": "Shape of the point marks. Supported values include:\n- plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`.\n- the line symbol `\"stroke\"`\n- centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"`\n- a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "size": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default size for marks.\n- For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.\n- For `bar`, this represents the band size of the bar, in pixels.\n- For `text`, this represents the font size, in pixels.\n\n__Default value:__\n- `30` for point, circle, square marks; width/height's `step`\n- `2` for bar marks with discrete dimensions;\n- `5` for bar marks with continuous dimensions;\n- `11` for text marks.", + "minimum": 0 + }, + "smooth": { + "anyOf": [ + { + "description": "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "startAngle": { + "anyOf": [ + { + "description": "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "stroke": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)" + }, + "strokeCap": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeCap", + "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeDash": { + "anyOf": [ + { + "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeDashOffset": { + "anyOf": [ + { + "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeJoin": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeJoin", + "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeMiterLimit": { + "anyOf": [ + { + "description": "The miter limit at which to bevel a line join.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeOffset": { + "anyOf": [ + { + "description": "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeOpacity": { + "anyOf": [ + { + "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeWidth": { + "anyOf": [ + { + "description": "The stroke width, in pixels.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "style": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "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](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. __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": { + "anyOf": [ + { + "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "text": { + "anyOf": [ + { + "$ref": "#/definitions/Text", + "description": "Placeholder text if the `text` channel is not specified" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "theta": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians.", + "maximum": 360, + "minimum": 0 + }, + "theta2": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise." + }, + "theta2Offset": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Offset for theta2." + }, + "thetaOffset": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Offset for theta." + }, + "timeUnitBandPosition": { + "description": "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.", + "type": "number" + }, + "timeUnitBandSize": { + "description": "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.", + "type": "number" + }, + "tooltip": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "$ref": "#/definitions/TooltipContent" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "type": "null" + } + ], + "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used.\n- If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used.\n- If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite.\n\n__Default value:__ `null`" + }, + "url": { + "anyOf": [ + { + "$ref": "#/definitions/URI", + "description": "The URL of the image file for image marks." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "width": { + "anyOf": [ + { + "description": "Width of the marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "x": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot." + }, + "x2": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot." + }, + "x2Offset": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Offset for x2-position." + }, + "xOffset": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Offset for x-position." + }, + "y": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot." + }, + "y2": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot." + }, + "y2Offset": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Offset for y2-position." + }, + "yOffset": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Offset for y-position." + } + }, + "type": "object" + }, + "Padding": { + "anyOf": [ + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "bottom": { + "type": "number" + }, + "left": { + "type": "number" + }, + "right": { + "type": "number" + }, + "top": { + "type": "number" + } + }, + "type": "object" + } + ], + "minimum": 0 + }, + "ParameterExtent": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "field": { + "$ref": "#/definitions/FieldName", + "description": "If a selection parameter is specified, the field name to extract selected values for when the selection is [projected](https://vega.github.io/vega-lite/docs/selection.html#project) over multiple fields or encodings." + }, + "param": { + "$ref": "#/definitions/ParameterName", + "description": "The name of a parameter." + } + }, + "required": [ + "param" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "encoding": { + "$ref": "#/definitions/SingleDefUnitChannel", + "description": "If a selection parameter is specified, the encoding channel to extract selected values for when a selection is [projected](https://vega.github.io/vega-lite/docs/selection.html#project) over multiple fields or encodings." + }, + "param": { + "$ref": "#/definitions/ParameterName", + "description": "The name of a parameter." + } + }, + "required": [ + "param" + ], + "type": "object" + } + ] + }, + "ParameterName": { + "type": "string" + }, + "ParameterPredicate": { + "additionalProperties": false, + "properties": { + "empty": { + "description": "For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, + "param": { + "$ref": "#/definitions/ParameterName", + "description": "Filter using a parameter name." + } + }, + "required": [ + "param" + ], + "type": "object" + }, + "Parse": { + "additionalProperties": { + "$ref": "#/definitions/ParseValue" + }, + "type": "object" + }, + "ParseValue": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "const": "string", + "type": "string" + }, + { + "const": "boolean", + "type": "string" + }, + { + "const": "date", + "type": "string" + }, + { + "const": "number", + "type": "string" + } + ] + }, + "PivotTransform": { + "additionalProperties": false, + "properties": { + "groupby": { + "description": "The optional data fields to group by. If not specified, a single group containing all data objects will be used.", + "items": { + "$ref": "#/definitions/FieldName" + }, + "type": "array" + }, + "limit": { + "description": "An optional parameter indicating the maximum number of pivoted fields to generate. The default (`0`) applies no limit. The pivoted `pivot` names are sorted in ascending order prior to enforcing the limit. __Default value:__ `0`", + "type": "number" + }, + "op": { + "$ref": "#/definitions/AggregateOp", + "description": "The aggregation operation to apply to grouped `value` field values. __Default value:__ `sum`" + }, + "pivot": { + "$ref": "#/definitions/FieldName", + "description": "The data field to pivot on. The unique values of this field become new field names in the output stream." + }, + "value": { + "$ref": "#/definitions/FieldName", + "description": "The data field to populate pivoted fields. The aggregate values of this field become the values of the new pivoted fields." + } + }, + "required": [ + "pivot", + "value" + ], + "type": "object" + }, + "Point": { + "additionalProperties": false, + "description": "Point geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.2", + "properties": { + "bbox": { + "$ref": "#/definitions/BBox", + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. https://tools.ietf.org/html/rfc7946#section-5" + }, + "coordinates": { + "$ref": "#/definitions/Position" + }, + "type": { + "const": "Point", + "description": "Specifies the type of GeoJSON object.", + "type": "string" + } + }, + "required": [ + "coordinates", + "type" + ], + "type": "object" + }, + "PointSelectionConfig": { + "additionalProperties": false, + "properties": { + "clear": { + "anyOf": [ + { + "$ref": "#/definitions/Stream" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ], + "description": "Clears the selection, emptying it of all values. This property can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable clear.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear` examples ](https://vega.github.io/vega-lite/docs/selection.html#clear) in the documentation." + }, + "encodings": { + "description": "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ The [projection with `encodings` and `fields` section](https://vega.github.io/vega-lite/docs/selection.html#project) in the documentation.", + "items": { + "$ref": "#/definitions/SingleDefUnitChannel" + }, + "type": "array" + }, + "fields": { + "description": "An array of field names whose values must match for a data tuple to fall within the selection.\n\n__See also:__ The [projection with `encodings` and `fields` section](https://vega.github.io/vega-lite/docs/selection.html#project) in the documentation.", + "items": { + "$ref": "#/definitions/FieldName" + }, + "type": "array" + }, + "nearest": { + "description": "When true, an invisible voronoi diagram is computed to accelerate discrete selection. The data value _nearest_ the mouse cursor is added to the selection.\n\n__Default value:__ `false`, which means that data values must be interacted with directly (e.g., clicked on) to be added to the selection.\n\n__See also:__ [`nearest` examples](https://vega.github.io/vega-lite/docs/selection.html#nearest) documentation.", + "type": "boolean" + }, + "on": { + "anyOf": [ + { + "$ref": "#/definitions/Stream" + }, + { + "type": "string" + } + ], + "description": "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection. For interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters).\n\n__See also:__ [`on` examples](https://vega.github.io/vega-lite/docs/selection.html#on) in the documentation." + }, + "resolve": { + "$ref": "#/definitions/SelectionResolution", + "description": "With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\n\nOne of:\n- `\"global\"` -- only one brush exists for the entire SPLOM. When the user begins to drag, any previous brushes are cleared, and a new one is constructed.\n- `\"union\"` -- each cell contains its own brush, and points are highlighted if they lie within _any_ of these individual brushes.\n- `\"intersect\"` -- each cell contains its own brush, and points are highlighted only if they fall within _all_ of these individual brushes.\n\n__Default value:__ `global`.\n\n__See also:__ [`resolve` examples](https://vega.github.io/vega-lite/docs/selection.html#resolve) in the documentation." + }, + "toggle": { + "description": "Controls whether data values should be toggled (inserted or removed from a point selection) or only ever inserted into point selections.\n\nOne of:\n- `true` -- the default behavior, which corresponds to `\"event.shiftKey\"`. As a result, data values are toggled when the user interacts with the shift-key pressed.\n- `false` -- disables toggling behaviour; the selection will only ever contain a single data value corresponding to the most recent interaction.\n- A [Vega expression](https://vega.github.io/vega/docs/expressions/) which is re-evaluated as the user interacts. If the expression evaluates to `true`, the data value is toggled into or out of the point selection. If the expression evaluates to `false`, the point selection is first cleared, and the data value is then inserted. For example, setting the value to the Vega expression `\"true\"` will toggle data values without the user pressing the shift-key.\n\n__Default value:__ `true`\n\n__See also:__ [`toggle` examples](https://vega.github.io/vega-lite/docs/selection.html#toggle) in the documentation.", + "type": [ + "string", + "boolean" + ] + }, + "type": { + "const": "point", + "description": "Determines the default event processing and data query for the selection. Vega-Lite currently supports two selection types:\n\n- `\"point\"` -- to select multiple discrete data values; the first value is selected on `click` and additional values toggled on shift-click.\n- `\"interval\"` -- to select a continuous range of data values on `drag`.", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "PointSelectionConfigWithoutType": { + "additionalProperties": false, + "properties": { + "clear": { + "anyOf": [ + { + "$ref": "#/definitions/Stream" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ], + "description": "Clears the selection, emptying it of all values. This property can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable clear.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear` examples ](https://vega.github.io/vega-lite/docs/selection.html#clear) in the documentation." + }, + "encodings": { + "description": "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ The [projection with `encodings` and `fields` section](https://vega.github.io/vega-lite/docs/selection.html#project) in the documentation.", + "items": { + "$ref": "#/definitions/SingleDefUnitChannel" + }, + "type": "array" + }, + "fields": { + "description": "An array of field names whose values must match for a data tuple to fall within the selection.\n\n__See also:__ The [projection with `encodings` and `fields` section](https://vega.github.io/vega-lite/docs/selection.html#project) in the documentation.", + "items": { + "$ref": "#/definitions/FieldName" + }, + "type": "array" + }, + "nearest": { + "description": "When true, an invisible voronoi diagram is computed to accelerate discrete selection. The data value _nearest_ the mouse cursor is added to the selection.\n\n__Default value:__ `false`, which means that data values must be interacted with directly (e.g., clicked on) to be added to the selection.\n\n__See also:__ [`nearest` examples](https://vega.github.io/vega-lite/docs/selection.html#nearest) documentation.", + "type": "boolean" + }, + "on": { + "anyOf": [ + { + "$ref": "#/definitions/Stream" + }, + { + "type": "string" + } + ], + "description": "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection. For interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters).\n\n__See also:__ [`on` examples](https://vega.github.io/vega-lite/docs/selection.html#on) in the documentation." + }, + "resolve": { + "$ref": "#/definitions/SelectionResolution", + "description": "With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\n\nOne of:\n- `\"global\"` -- only one brush exists for the entire SPLOM. When the user begins to drag, any previous brushes are cleared, and a new one is constructed.\n- `\"union\"` -- each cell contains its own brush, and points are highlighted if they lie within _any_ of these individual brushes.\n- `\"intersect\"` -- each cell contains its own brush, and points are highlighted only if they fall within _all_ of these individual brushes.\n\n__Default value:__ `global`.\n\n__See also:__ [`resolve` examples](https://vega.github.io/vega-lite/docs/selection.html#resolve) in the documentation." + }, + "toggle": { + "description": "Controls whether data values should be toggled (inserted or removed from a point selection) or only ever inserted into point selections.\n\nOne of:\n- `true` -- the default behavior, which corresponds to `\"event.shiftKey\"`. As a result, data values are toggled when the user interacts with the shift-key pressed.\n- `false` -- disables toggling behaviour; the selection will only ever contain a single data value corresponding to the most recent interaction.\n- A [Vega expression](https://vega.github.io/vega/docs/expressions/) which is re-evaluated as the user interacts. If the expression evaluates to `true`, the data value is toggled into or out of the point selection. If the expression evaluates to `false`, the point selection is first cleared, and the data value is then inserted. For example, setting the value to the Vega expression `\"true\"` will toggle data values without the user pressing the shift-key.\n\n__Default value:__ `true`\n\n__See also:__ [`toggle` examples](https://vega.github.io/vega-lite/docs/selection.html#toggle) in the documentation.", + "type": [ + "string", + "boolean" + ] + } + }, + "type": "object" + }, + "PolarDef": { + "anyOf": [ + { + "$ref": "#/definitions/PositionFieldDefBase" + }, + { + "$ref": "#/definitions/PositionDatumDefBase" + }, + { + "$ref": "#/definitions/PositionValueDef" + } + ] + }, + "Polygon": { + "additionalProperties": false, + "description": "Polygon geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.6", + "properties": { + "bbox": { + "$ref": "#/definitions/BBox", + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. https://tools.ietf.org/html/rfc7946#section-5" + }, + "coordinates": { + "items": { + "items": { + "$ref": "#/definitions/Position" + }, + "type": "array" + }, + "type": "array" + }, + "type": { + "const": "Polygon", + "description": "Specifies the type of GeoJSON object.", + "type": "string" + } + }, + "required": [ + "coordinates", + "type" + ], + "type": "object" + }, + "Position": { + "description": "A Position is an array of coordinates. https://tools.ietf.org/html/rfc7946#section-3.1.1 Array should contain between two and three elements. The previous GeoJSON specification allowed more elements (e.g., which could be used to represent M values), but the current specification only allows X, Y, and (optionally) Z to be defined.", + "items": { + "type": "number" + }, + "type": "array" + }, + "Position2Def": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/DatumDef" + }, + { + "$ref": "#/definitions/PositionValueDef" + } + ] + }, + "PositionDatumDef": { + "additionalProperties": false, + "properties": { + "axis": { + "anyOf": [ + { + "$ref": "#/definitions/Axis" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of axis's gridlines, ticks and labels. If `null`, the axis for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [axis properties](https://vega.github.io/vega-lite/docs/axis.html) are applied.\n\n__See also:__ [`axis`](https://vega.github.io/vega-lite/docs/axis.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "impute": { + "anyOf": [ + { + "$ref": "#/definitions/ImputeParams" + }, + { + "type": "null" + } + ], + "description": "An object defining the properties of the Impute Operation to be applied. The field value of the other positional channel is taken as `key` of the `Impute` Operation. The field of the `color` channel if specified is used as `groupby` of the `Impute` Operation.\n\n__See also:__ [`impute`](https://vega.github.io/vega-lite/docs/impute.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "stack": { + "anyOf": [ + { + "$ref": "#/definitions/StackOffset" + }, + { + "type": "null" + }, + { + "type": "boolean" + } + ], + "description": "Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values:\n- `\"zero\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart).\n- `\"normalize\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized) and pie charts [with percentage tooltip](https://vega.github.io/vega-lite/docs/arc.html#tooltip)).
\n-`\"center\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)).\n- `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "PositionDatumDefBase": { + "additionalProperties": false, + "properties": { + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "stack": { + "anyOf": [ + { + "$ref": "#/definitions/StackOffset" + }, + { + "type": "null" + }, + { + "type": "boolean" + } + ], + "description": "Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values:\n- `\"zero\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart).\n- `\"normalize\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized) and pie charts [with percentage tooltip](https://vega.github.io/vega-lite/docs/arc.html#tooltip)).
\n-`\"center\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)).\n- `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "PositionDef": { + "anyOf": [ + { + "$ref": "#/definitions/PositionFieldDef" + }, + { + "$ref": "#/definitions/PositionDatumDef" + }, + { + "$ref": "#/definitions/PositionValueDef" + } + ] + }, + "PositionFieldDef": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "axis": { + "anyOf": [ + { + "$ref": "#/definitions/Axis" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of axis's gridlines, ticks and labels. If `null`, the axis for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [axis properties](https://vega.github.io/vega-lite/docs/axis.html) are applied.\n\n__See also:__ [`axis`](https://vega.github.io/vega-lite/docs/axis.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "const": "binned", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "impute": { + "anyOf": [ + { + "$ref": "#/definitions/ImputeParams" + }, + { + "type": "null" + } + ], + "description": "An object defining the properties of the Impute Operation to be applied. The field value of the other positional channel is taken as `key` of the `Impute` Operation. The field of the `color` channel if specified is used as `groupby` of the `Impute` Operation.\n\n__See also:__ [`impute`](https://vega.github.io/vega-lite/docs/impute.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "stack": { + "anyOf": [ + { + "$ref": "#/definitions/StackOffset" + }, + { + "type": "null" + }, + { + "type": "boolean" + } + ], + "description": "Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values:\n- `\"zero\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart).\n- `\"normalize\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized) and pie charts [with percentage tooltip](https://vega.github.io/vega-lite/docs/arc.html#tooltip)).
\n-`\"center\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)).\n- `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "PositionFieldDefBase": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "const": "binned", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "stack": { + "anyOf": [ + { + "$ref": "#/definitions/StackOffset" + }, + { + "type": "null" + }, + { + "type": "boolean" + } + ], + "description": "Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values:\n- `\"zero\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart).\n- `\"normalize\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized) and pie charts [with percentage tooltip](https://vega.github.io/vega-lite/docs/arc.html#tooltip)).
\n-`\"center\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)).\n- `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "PositionValueDef": { + "$ref": "#/definitions/ValueDef<(number|\"width\"|\"height\"|ExprRef)>" + }, + "Predicate": { + "anyOf": [ + { + "$ref": "#/definitions/FieldEqualPredicate" + }, + { + "$ref": "#/definitions/FieldRangePredicate" + }, + { + "$ref": "#/definitions/FieldOneOfPredicate" + }, + { + "$ref": "#/definitions/FieldLTPredicate" + }, + { + "$ref": "#/definitions/FieldGTPredicate" + }, + { + "$ref": "#/definitions/FieldLTEPredicate" + }, + { + "$ref": "#/definitions/FieldGTEPredicate" + }, + { + "$ref": "#/definitions/FieldValidPredicate" + }, + { + "$ref": "#/definitions/ParameterPredicate" + }, + { + "type": "string" + } + ] + }, + "PrimitiveValue": { + "type": [ + "number", + "string", + "boolean", + "null" + ] + }, + "Projection": { + "additionalProperties": false, + "properties": { + "center": { + "anyOf": [ + { + "$ref": "#/definitions/Vector2", + "description": "The projection's center, a two-element array of longitude and latitude in degrees.\n\n__Default value:__ `[0, 0]`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "clipAngle": { + "anyOf": [ + { + "description": "The projection's clipping circle radius to the specified angle in degrees. If `null`, switches to [antimeridian](http://bl.ocks.org/mbostock/3788999) cutting rather than small-circle clipping.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "clipExtent": { + "anyOf": [ + { + "$ref": "#/definitions/Vector2>", + "description": "The projection's viewport clip extent to the specified bounds in pixels. The extent bounds are specified as an array `[[x0, y0], [x1, y1]]`, where `x0` is the left-side of the viewport, `y0` is the top, `x1` is the right and `y1` is the bottom. If `null`, no viewport clipping is performed." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "coefficient": { + "anyOf": [ + { + "description": "The coefficient parameter for the `hammer` projection.\n\n__Default value:__ `2`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "distance": { + "anyOf": [ + { + "description": "For the `satellite` projection, the distance from the center of the sphere to the point of view, as a proportion of the sphere’s radius. The recommended maximum clip angle for a given `distance` is acos(1 / distance) converted to degrees. If tilt is also applied, then more conservative clipping may be necessary.\n\n__Default value:__ `2.0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "extent": { + "anyOf": [ + { + "$ref": "#/definitions/Vector2>" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fit": { + "anyOf": [ + { + "$ref": "#/definitions/Fit" + }, + { + "items": { + "$ref": "#/definitions/Fit" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fraction": { + "anyOf": [ + { + "description": "The fraction parameter for the `bottomley` projection.\n\n__Default value:__ `0.5`, corresponding to a sin(ψ) where ψ = π/6.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "lobes": { + "anyOf": [ + { + "description": "The number of lobes in projections that support multi-lobe views: `berghaus`, `gingery`, or `healpix`. The default value varies based on the projection type.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "parallel": { + "anyOf": [ + { + "description": "The parallel parameter for projections that support it: `armadillo`, `bonne`, `craig`, `cylindricalEqualArea`, `cylindricalStereographic`, `hammerRetroazimuthal`, `loximuthal`, or `rectangularPolyconic`. The default value varies based on the projection type.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "parallels": { + "anyOf": [ + { + "description": "For conic projections, the [two standard parallels](https://en.wikipedia.org/wiki/Map_projection#Conic) that define the map layout. The default depends on the specific conic projection used.", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "pointRadius": { + "anyOf": [ + { + "description": "The default radius (in pixels) to use when drawing GeoJSON `Point` and `MultiPoint` geometries. This parameter sets a constant default value. To modify the point radius in response to data, see the corresponding parameter of the GeoPath and GeoShape transforms.\n\n__Default value:__ `4.5`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "precision": { + "anyOf": [ + { + "description": "The threshold for the projection's [adaptive resampling](http://bl.ocks.org/mbostock/3795544) to the specified value in pixels. This value corresponds to the [Douglas–Peucker distance](http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm). If precision is not specified, returns the projection's current resampling precision which defaults to `√0.5 ≅ 0.70710…`.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "radius": { + "anyOf": [ + { + "description": "The radius parameter for the `airy` or `gingery` projection. The default value varies based on the projection type.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ratio": { + "anyOf": [ + { + "description": "The ratio parameter for the `hill`, `hufnagel`, or `wagner` projections. The default value varies based on the projection type.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "reflectX": { + "anyOf": [ + { + "description": "Sets whether or not the x-dimension is reflected (negated) in the output.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "reflectY": { + "anyOf": [ + { + "description": "Sets whether or not the y-dimension is reflected (negated) in the output.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "rotate": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/Vector2" + }, + { + "$ref": "#/definitions/Vector3" + } + ], + "description": "The projection's three-axis rotation to the specified angles, which must be a two- or three-element array of numbers [`lambda`, `phi`, `gamma`] specifying the rotation angles in degrees about each spherical axis. (These correspond to yaw, pitch and roll.)\n\n__Default value:__ `[0, 0, 0]`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "scale": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The projection’s scale (zoom) factor, overriding automatic fitting. The default scale is projection-specific. The scale factor corresponds linearly to the distance between projected points; however, scale factor values are not equivalent across projections." + }, + "size": { + "anyOf": [ + { + "$ref": "#/definitions/Vector2", + "description": "Used in conjunction with fit, provides the width and height in pixels of the area to which the projection should be automatically fit." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "spacing": { + "anyOf": [ + { + "description": "The spacing parameter for the `lagrange` projection.\n\n__Default value:__ `0.5`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "tilt": { + "anyOf": [ + { + "description": "The tilt angle (in degrees) for the `satellite` projection.\n\n__Default value:__ `0`.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "translate": { + "anyOf": [ + { + "$ref": "#/definitions/Vector2" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The projection’s translation offset as a two-element array `[tx, ty]`." + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/ProjectionType" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The cartographic projection to use. This value is case-insensitive, for example `\"albers\"` and `\"Albers\"` indicate the same projection type. You can find all valid projection types [in the documentation](https://vega.github.io/vega-lite/docs/projection.html#projection-types).\n\n__Default value:__ `equalEarth`" + } + }, + "type": "object" + }, + "ProjectionConfig": { + "$ref": "#/definitions/Projection", + "description": "Any property of Projection can be in config" + }, + "ProjectionType": { + "enum": [ + "albers", + "albersUsa", + "azimuthalEqualArea", + "azimuthalEquidistant", + "conicConformal", + "conicEqualArea", + "conicEquidistant", + "equalEarth", + "equirectangular", + "gnomonic", + "identity", + "mercator", + "naturalEarth1", + "orthographic", + "stereographic", + "transverseMercator" + ], + "type": "string" + }, + "QuantileTransform": { + "additionalProperties": false, + "properties": { + "as": { + "description": "The output field names for the probability and quantile values.\n\n__Default value:__ `[\"prob\", \"value\"]`", + "items": { + "$ref": "#/definitions/FieldName" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "groupby": { + "description": "The data fields to group by. If not specified, a single group containing all data objects will be used.", + "items": { + "$ref": "#/definitions/FieldName" + }, + "type": "array" + }, + "probs": { + "description": "An array of probabilities in the range (0, 1) for which to compute quantile values. If not specified, the *step* parameter will be used.", + "items": { + "type": "number" + }, + "type": "array" + }, + "quantile": { + "$ref": "#/definitions/FieldName", + "description": "The data field for which to perform quantile estimation." + }, + "step": { + "description": "A probability step size (default 0.01) for sampling quantile values. All values from one-half the step size up to 1 (exclusive) will be sampled. This parameter is only used if the *probs* parameter is not provided.", + "type": "number" + } + }, + "required": [ + "quantile" + ], + "type": "object" + }, + "RadialGradient": { + "additionalProperties": false, + "properties": { + "gradient": { + "const": "radial", + "description": "The type of gradient. Use `\"radial\"` for a radial gradient.", + "type": "string" + }, + "id": { + "type": "string" + }, + "r1": { + "description": "The radius length, in normalized [0, 1] coordinates, of the inner circle for the gradient.\n\n__Default value:__ `0`", + "type": "number" + }, + "r2": { + "description": "The radius length, in normalized [0, 1] coordinates, of the outer circle for the gradient.\n\n__Default value:__ `0.5`", + "type": "number" + }, + "stops": { + "description": "An array of gradient stops defining the gradient color sequence.", + "items": { + "$ref": "#/definitions/GradientStop" + }, + "type": "array" + }, + "x1": { + "description": "The x-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle for the gradient.\n\n__Default value:__ `0.5`", + "type": "number" + }, + "x2": { + "description": "The x-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle for the gradient.\n\n__Default value:__ `0.5`", + "type": "number" + }, + "y1": { + "description": "The y-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle for the gradient.\n\n__Default value:__ `0.5`", + "type": "number" + }, + "y2": { + "description": "The y-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle for the gradient.\n\n__Default value:__ `0.5`", + "type": "number" + } + }, + "required": [ + "gradient", + "stops" + ], + "type": "object" + }, + "RangeConfig": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/definitions/RangeScheme" + }, + { + "type": "array" + } + ] + }, + "properties": { + "category": { + "anyOf": [ + { + "$ref": "#/definitions/RangeScheme" + }, + { + "items": { + "$ref": "#/definitions/Color" + }, + "type": "array" + } + ], + "description": "Default [color scheme](https://vega.github.io/vega/docs/schemes/) for categorical data." + }, + "diverging": { + "anyOf": [ + { + "$ref": "#/definitions/RangeScheme" + }, + { + "items": { + "$ref": "#/definitions/Color" + }, + "type": "array" + } + ], + "description": "Default [color scheme](https://vega.github.io/vega/docs/schemes/) for diverging quantitative ramps." + }, + "heatmap": { + "anyOf": [ + { + "$ref": "#/definitions/RangeScheme" + }, + { + "items": { + "$ref": "#/definitions/Color" + }, + "type": "array" + } + ], + "description": "Default [color scheme](https://vega.github.io/vega/docs/schemes/) for quantitative heatmaps." + }, + "ordinal": { + "anyOf": [ + { + "$ref": "#/definitions/RangeScheme" + }, + { + "items": { + "$ref": "#/definitions/Color" + }, + "type": "array" + } + ], + "description": "Default [color scheme](https://vega.github.io/vega/docs/schemes/) for rank-ordered data." + }, + "ramp": { + "anyOf": [ + { + "$ref": "#/definitions/RangeScheme" + }, + { + "items": { + "$ref": "#/definitions/Color" + }, + "type": "array" + } + ], + "description": "Default [color scheme](https://vega.github.io/vega/docs/schemes/) for sequential quantitative ramps." + }, + "symbol": { + "description": "Array of [symbol](https://vega.github.io/vega/docs/marks/symbol/) names or paths for the default shape palette.", + "items": { + "$ref": "#/definitions/SymbolShape" + }, + "type": "array" + } + }, + "type": "object" + }, + "RangeEnum": { + "enum": [ + "width", + "height", + "symbol", + "category", + "ordinal", + "ramp", + "diverging", + "heatmap" + ], + "type": "string" + }, + "RangeRaw": { + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/definitions/RangeRawArray" + } + ] + }, + "type": "array" + }, + "RangeRawArray": { + "items": { + "type": "number" + }, + "type": "array" + }, + "RangeScheme": { + "anyOf": [ + { + "$ref": "#/definitions/RangeEnum" + }, + { + "$ref": "#/definitions/RangeRaw" + }, + { + "additionalProperties": false, + "properties": { + "count": { + "type": "number" + }, + "extent": { + "items": { + "type": "number" + }, + "type": "array" + }, + "scheme": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ColorScheme" + } + ] + } + }, + "required": [ + "scheme" + ], + "type": "object" + } + ] + }, + "RectConfig": { + "additionalProperties": false, + "properties": { + "align": { + "anyOf": [ + { + "$ref": "#/definitions/Align" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\"left\"`, `\"right\"`, `\"center\"`.\n\n__Note:__ Expression reference is *not* supported for range marks." + }, + "angle": { + "anyOf": [ + { + "description": "The rotation angle of the text, in degrees.", + "maximum": 360, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "aria": { + "anyOf": [ + { + "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ariaRole": { + "anyOf": [ + { + "description": "Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"role\" attribute. Warning: this property is experimental and may be changed in the future.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ariaRoleDescription": { + "anyOf": [ + { + "description": "A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"aria-roledescription\" attribute. Warning: this property is experimental and may be changed in the future.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "aspect": { + "anyOf": [ + { + "description": "Whether to keep aspect ratio of image marks.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "baseline": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "For text marks, the vertical text baseline. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, `\"line-bottom\"`, or an expression reference that provides one of the valid values. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Note:__ Expression reference is *not* supported for range marks." + }, + "binSpacing": { + "description": "Offset between bars for binned field. The ideal value for this is either 0 (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).\n\n__Default value:__ `1`", + "minimum": 0, + "type": "number" + }, + "blend": { + "anyOf": [ + { + "$ref": "#/definitions/Blend", + "description": "The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `\"source-over\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "color": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default color.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`." + }, + "continuousBandSize": { + "description": "The default size of the bars on continuous scales.\n\n__Default value:__ `5`", + "minimum": 0, + "type": "number" + }, + "cornerRadius": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusBottomLeft": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusBottomRight": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusTopLeft": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusTopRight": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cursor": { + "anyOf": [ + { + "$ref": "#/definitions/Cursor", + "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "description": { + "anyOf": [ + { + "description": "A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dir": { + "anyOf": [ + { + "$ref": "#/definitions/TextDirection", + "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "discreteBandSize": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/RelativeBandSize" + } + ], + "description": "The default size of the bars with discrete dimensions. If unspecified, the default size is `step-2`, which provides 2 pixel offset between bars.", + "minimum": 0 + }, + "dx": { + "anyOf": [ + { + "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dy": { + "anyOf": [ + { + "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ellipsis": { + "anyOf": [ + { + "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "endAngle": { + "anyOf": [ + { + "description": "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fill": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)" + }, + "fillOpacity": { + "anyOf": [ + { + "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "filled": { + "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\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": { + "anyOf": [ + { + "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontSize": { + "anyOf": [ + { + "description": "The font size, in pixels.\n\n__Default value:__ `11`", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle", + "description": "The font style (e.g., `\"italic\"`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight", + "description": "The font weight. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "height": { + "anyOf": [ + { + "description": "Height of the marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "href": { + "anyOf": [ + { + "$ref": "#/definitions/URI", + "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "innerRadius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "interpolate": { + "anyOf": [ + { + "$ref": "#/definitions/Interpolate", + "description": "The line interpolation method to use for line and area marks. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function.\n- `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "invalid": { + "anyOf": [ + { + "$ref": "#/definitions/MarkInvalidDataMode" + }, + { + "type": "null" + } + ], + "description": "Invalid data mode, which defines how the marks and corresponding scales should represent invalid values (`null` and `NaN` in continuous scales *without* defined output for invalid values).\n\n- `\"filter\"` — *Exclude* all invalid values from the visualization's *marks* and *scales*. For path marks (for line, area, trail), this option will create paths that connect valid points, as if the data rows with invalid values do not exist.\n\n- `\"break-paths-filter-domains\"` — Break path marks (for line, area, trail) at invalid values. For non-path marks, this is equivalent to `\"filter\"`. All *scale* domains will *exclude* these filtered data points.\n\n- `\"break-paths-show-domains\"` — Break paths (for line, area, trail) at invalid values. Hide invalid values for non-path marks. All *scale* domains will *include* these filtered data points (for both path and non-path marks).\n\n- `\"show\"` or `null` — Show all data points in the marks and scale domains. Each scale will use the output for invalid values defined in `config.scale.invalid` or, if unspecified, by default invalid values will produce the same visual values as zero (if the scale includes zero) or the minimum value (if the scale does not include zero).\n\n- `\"break-paths-show-path-domains\"` (default) — This is equivalent to `\"break-paths-show-domains\"` for path-based marks (line/area/trail) and `\"filter\"` for non-path marks.\n\n__Note__: If any channel's scale has an output for invalid values defined in `config.scale.invalid`, all values for the scales will be considered \"valid\" since they can produce a reasonable output for the scales. Thus, fields for such channels will not be filtered and will not cause path breaks." + }, + "limit": { + "anyOf": [ + { + "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "lineBreak": { + "anyOf": [ + { + "description": "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "lineHeight": { + "anyOf": [ + { + "description": "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "minBandSize": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The minimum band size for bar and rectangle marks. __Default value:__ `0.25`" + }, + "opacity": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.", + "maximum": 1, + "minimum": 0 + }, + "order": { + "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.", + "type": [ + "null", + "boolean" + ] + }, + "orient": { + "$ref": "#/definitions/Orientation", + "description": "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.\n- For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension.\n- For area, this property determines the orient property of the Vega output.\n- For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored." + }, + "outerRadius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "padAngle": { + "anyOf": [ + { + "description": "The angular padding applied to sides of the arc, in radians.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "radius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties.\n\n__Default value:__ `min(plot_width, plot_height)/2`", + "minimum": 0 + }, + "radius2": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The secondary (inner) radius in pixels of arc marks.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "shape": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/SymbolShape" + }, + { + "type": "string" + } + ], + "description": "Shape of the point marks. Supported values include:\n- plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`.\n- the line symbol `\"stroke\"`\n- centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"`\n- a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "size": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default size for marks.\n- For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.\n- For `bar`, this represents the band size of the bar, in pixels.\n- For `text`, this represents the font size, in pixels.\n\n__Default value:__\n- `30` for point, circle, square marks; width/height's `step`\n- `2` for bar marks with discrete dimensions;\n- `5` for bar marks with continuous dimensions;\n- `11` for text marks.", + "minimum": 0 + }, + "smooth": { + "anyOf": [ + { + "description": "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "startAngle": { + "anyOf": [ + { + "description": "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "stroke": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)" + }, + "strokeCap": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeCap", + "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeDash": { + "anyOf": [ + { + "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeDashOffset": { + "anyOf": [ + { + "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeJoin": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeJoin", + "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeMiterLimit": { + "anyOf": [ + { + "description": "The miter limit at which to bevel a line join.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeOffset": { + "anyOf": [ + { + "description": "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeOpacity": { + "anyOf": [ + { + "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeWidth": { + "anyOf": [ + { + "description": "The stroke width, in pixels.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "tension": { + "anyOf": [ + { + "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "text": { + "anyOf": [ + { + "$ref": "#/definitions/Text", + "description": "Placeholder text if the `text` channel is not specified" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "theta": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians.", + "maximum": 360, + "minimum": 0 + }, + "theta2": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise." + }, + "timeUnitBandPosition": { + "description": "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.", + "type": "number" + }, + "timeUnitBandSize": { + "description": "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.", + "type": "number" + }, + "tooltip": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "$ref": "#/definitions/TooltipContent" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "type": "null" + } + ], + "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used.\n- If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used.\n- If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite.\n\n__Default value:__ `null`" + }, + "url": { + "anyOf": [ + { + "$ref": "#/definitions/URI", + "description": "The URL of the image file for image marks." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "width": { + "anyOf": [ + { + "description": "Width of the marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "x": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot." + }, + "x2": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot." + }, + "y": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot." + }, + "y2": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot." + } + }, + "type": "object" + }, + "RegressionTransform": { + "additionalProperties": false, + "properties": { + "as": { + "description": "The output field names for the smoothed points generated by the regression transform.\n\n__Default value:__ The field names of the input x and y values.", + "items": { + "$ref": "#/definitions/FieldName" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "extent": { + "description": "A [min, max] domain over the independent (x) field for the starting and ending points of the generated trend line.", + "items": { + "type": "number" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "groupby": { + "description": "The data fields to group by. If not specified, a single group containing all data objects will be used.", + "items": { + "$ref": "#/definitions/FieldName" + }, + "type": "array" + }, + "method": { + "description": "The functional form of the regression model. One of `\"linear\"`, `\"log\"`, `\"exp\"`, `\"pow\"`, `\"quad\"`, or `\"poly\"`.\n\n__Default value:__ `\"linear\"`", + "enum": [ + "linear", + "log", + "exp", + "pow", + "quad", + "poly" + ], + "type": "string" + }, + "on": { + "$ref": "#/definitions/FieldName", + "description": "The data field of the independent variable to use a predictor." + }, + "order": { + "description": "The polynomial order (number of coefficients) for the 'poly' method.\n\n__Default value:__ `3`", + "type": "number" + }, + "params": { + "description": "A boolean flag indicating if the transform should return the regression model parameters (one object per group), rather than trend line points. The resulting objects include a `coef` array of fitted coefficient values (starting with the intercept term and then including terms of increasing order) and an `rSquared` value (indicating the total variance explained by the model).\n\n__Default value:__ `false`", + "type": "boolean" + }, + "regression": { + "$ref": "#/definitions/FieldName", + "description": "The data field of the dependent variable to predict." + } + }, + "required": [ + "regression", + "on" + ], + "type": "object" + }, + "RelativeBandSize": { + "additionalProperties": false, + "properties": { + "band": { + "description": "The relative band size. For example `0.5` means half of the band scale's band width.", + "type": "number" + } + }, + "required": [ + "band" + ], + "type": "object" + }, + "RepeatMapping": { + "additionalProperties": false, + "properties": { + "column": { + "description": "An array of fields to be repeated horizontally.", + "items": { + "type": "string" + }, + "type": "array" + }, + "row": { + "description": "An array of fields to be repeated vertically.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "RepeatRef": { + "additionalProperties": false, + "description": "Reference to a repeated value.", + "properties": { + "repeat": { + "enum": [ + "row", + "column", + "repeat", + "layer" + ], + "type": "string" + } + }, + "required": [ + "repeat" + ], + "type": "object" + }, + "RepeatSpec": { + "anyOf": [ + { + "$ref": "#/definitions/NonLayerRepeatSpec" + }, + { + "$ref": "#/definitions/LayerRepeatSpec" + } + ] + }, + "Resolve": { + "additionalProperties": false, + "description": "Defines how scales, axes, and legends from different specs should be combined. Resolve is a mapping from `scale`, `axis`, and `legend` to a mapping from channels to resolutions. Scales and guides can be resolved to be `\"independent\"` or `\"shared\"`.", + "properties": { + "axis": { + "$ref": "#/definitions/AxisResolveMap" + }, + "legend": { + "$ref": "#/definitions/LegendResolveMap" + }, + "scale": { + "$ref": "#/definitions/ScaleResolveMap" + } + }, + "type": "object" + }, + "ResolveMode": { + "enum": [ + "independent", + "shared" + ], + "type": "string" + }, + "RowCol": { + "additionalProperties": false, + "properties": { + "column": { + "$ref": "#/definitions/LayoutAlign" + }, + "row": { + "$ref": "#/definitions/LayoutAlign" + } + }, + "type": "object" + }, + "RowCol": { + "additionalProperties": false, + "properties": { + "column": { + "type": "boolean" + }, + "row": { + "type": "boolean" + } + }, + "type": "object" + }, + "RowCol": { + "additionalProperties": false, + "properties": { + "column": { + "type": "number" + }, + "row": { + "type": "number" + } + }, + "type": "object" + }, + "RowColumnEncodingFieldDef": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "align": { + "$ref": "#/definitions/LayoutAlign", + "description": "The alignment to apply to row/column facet's subplot. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\n- For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\n- For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\n__Default value:__ `\"all\"`." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "center": { + "description": "Boolean flag indicating if facet's subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`", + "type": "boolean" + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "header": { + "anyOf": [ + { + "$ref": "#/definitions/Header" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of a facet's header." + }, + "sort": { + "anyOf": [ + { + "$ref": "#/definitions/SortArray" + }, + { + "$ref": "#/definitions/SortOrder" + }, + { + "$ref": "#/definitions/EncodingSortField" + }, + { + "type": "null" + } + ], + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` is not supported for `row` and `column`." + }, + "spacing": { + "description": "The spacing in pixels between facet's sub-views.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)", + "type": "number" + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "SampleTransform": { + "additionalProperties": false, + "properties": { + "sample": { + "description": "The maximum number of data objects to include in the sample.\n\n__Default value:__ `1000`", + "type": "number" + } + }, + "required": [ + "sample" + ], + "type": "object" + }, + "Scale": { + "additionalProperties": false, + "properties": { + "align": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The alignment of the steps within the scale range.\n\nThis value must lie in the range `[0,1]`. A value of `0.5` indicates that the steps should be centered within the range. A value of `0` or `1` may be used to shift the bands to one side, say to position them adjacent to an axis.\n\n__Default value:__ `0.5`" + }, + "base": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The logarithm base of the `log` scale (default `10`)." + }, + "bins": { + "$ref": "#/definitions/ScaleBins", + "description": "Bin boundaries can be provided to scales as either an explicit array of bin boundaries or as a bin specification object. The legal values are:\n- An [array](../types/#Array) literal of bin boundary values. For example, `[0, 5, 10, 15, 20]`. The array must include both starting and ending boundaries. The previous example uses five values to indicate a total of four bin intervals: [0-5), [5-10), [10-15), [15-20]. Array literals may include signal references as elements.\n- A [bin specification object](https://vega.github.io/vega-lite/docs/scale.html#bins) that indicates the bin _step_ size, and optionally the _start_ and _stop_ boundaries.\n- An array of bin boundaries over the scale domain. If provided, axes and legends will use the bin boundaries to inform the choice of tick marks and text labels." + }, + "clamp": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "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)." + }, + "constant": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant determining the slope of the symlog function around zero. Only used for `symlog` scales.\n\n__Default value:__ `1`" + }, + "domain": { + "anyOf": [ + { + "items": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "type": "array" + }, + { + "const": "unaggregated", + "type": "string" + }, + { + "$ref": "#/definitions/ParameterExtent" + }, + { + "$ref": "#/definitions/DomainUnionWith" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Customized domain values in the form of constant values or dynamic values driven by a parameter.\n\n1) Constant `domain` for _quantitative_ fields can take one of the following forms:\n\n- A two-element array with minimum and maximum values. To create a diverging scale, this two-element array can be combined with the `domainMid` property.\n- An array with more than two entries, for [Piecewise quantitative scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise).\n- A string value `\"unaggregated\"`, if the input field is aggregated, to indicate that the domain should include the raw data values prior to the aggregation.\n\n2) Constant `domain` for _temporal_ fields can be a two-element array with 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\n3) Constant `domain` for _ordinal_ and _nominal_ fields can be an array that lists valid input values.\n\n4) To combine (union) specified constant domain with the field's values, `domain` can be an object with a `unionWith` property that specify constant domain to be combined. For example, `domain: {unionWith: [0, 100]}` for a quantitative scale means that the scale domain always includes `[0, 100]`, but will include other values in the fields beyond `[0, 100]`.\n\n5) Domain can also takes an object defining a field or encoding of a parameter that [interactively determines](https://vega.github.io/vega-lite/docs/selection.html#scale-domains) the scale domain." + }, + "domainMax": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Sets the maximum value in the scale domain, overriding the `domain` property. This property is only intended for use with scales having continuous domains." + }, + "domainMid": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Inserts a single mid-point value into a two-element domain. The mid-point value must lie between the domain minimum and maximum values. This property can be useful for setting a midpoint for [diverging color scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise). The domainMid property is only intended for use with scales supporting continuous, piecewise domains." + }, + "domainMin": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Sets the minimum value in the scale domain, overriding the domain property. This property is only intended for use with scales having continuous domains." + }, + "domainRaw": { + "$ref": "#/definitions/ExprRef", + "description": "An expression for an array of raw values that, if non-null, directly overrides the _domain_ property. This is useful for supporting interactions such as panning or zooming a scale. The scale may be initially determined using a data-driven domain, then modified in response to user input by setting the rawDomain value." + }, + "exponent": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The exponent of the `pow` scale." + }, + "interpolate": { + "anyOf": [ + { + "$ref": "#/definitions/ScaleInterpolateEnum" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/ScaleInterpolateParams" + } + ], + "description": "The interpolation method for range values. By default, a general interpolator for numbers, dates, strings and colors (in HCL space) is used. For color ranges, this property allows interpolation in alternative color spaces. Legal values include `rgb`, `hsl`, `hsl-long`, `lab`, `hcl`, `hcl-long`, `cubehelix` and `cubehelix-long` ('-long' variants use longer paths in polar coordinate spaces). If object-valued, this property accepts an object with a string-valued _type_ property and an optional numeric _gamma_ property applicable to rgb and cubehelix interpolators. For more, see the [d3-interpolate documentation](https://github.com/d3/d3-interpolate).\n\n* __Default value:__ `hcl`" + }, + "nice": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "$ref": "#/definitions/TimeInterval" + }, + { + "$ref": "#/definitions/TimeIntervalStep" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "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 without explicit domain bounds; `false` otherwise." + }, + "padding": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "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`. For _band and point_ scales, see `paddingInner` and `paddingOuter`. By default, Vega-Lite sets padding such that _width/height = number of unique values * step_.", + "minimum": 0 + }, + "paddingInner": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "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 + }, + "paddingOuter": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "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].\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. By default, Vega-Lite sets outer padding such that _width/height = number of unique values * step_.", + "maximum": 1, + "minimum": 0 + }, + "range": { + "anyOf": [ + { + "$ref": "#/definitions/RangeEnum" + }, + { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "type": "array" + }, + { + "$ref": "#/definitions/FieldRange" + } + ], + "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 or an object with a `field` property representing the range values. For example, if a field `color` contains CSS color names, we can set `range` to `{field: \"color\"}`.\n\n__Notes:__\n\n1) For 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`)." + }, + "rangeMax": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Sets the maximum value in the scale range, overriding the `range` property or the default range. This property is only intended for use with scales having continuous ranges." + }, + "rangeMin": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Sets the minimum value in the scale range, overriding the `range` property or the default range. This property is only intended for use with scales having continuous ranges." + }, + "reverse": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "If true, reverses the order of the scale range. __Default value:__ `false`." + }, + "round": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "If `true`, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid.\n\n__Default value:__ `false`." + }, + "scheme": { + "anyOf": [ + { + "$ref": "#/definitions/ColorScheme" + }, + { + "$ref": "#/definitions/SchemeParams" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A string indicating a color [scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme) name (e.g., `\"category10\"` or `\"blues\"`) 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 color scales.\n\nTo set a custom scheme, instead set the list of values [as the scale range](https://vega.github.io/vega-lite/docs/scale.html#2-setting-the-range-property-to-an-array-of-valid-css-color-strings).\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**](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), [`\"symlog\"`](https://vega.github.io/vega-lite/docs/scale.html#symlog), [`\"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).\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-ordinal\"`](https://vega.github.io/vega-lite/docs/scale.html#bin-ordinal), [`\"quantile\"`](https://vega.github.io/vega-lite/docs/scale.html#quantile), [`\"quantize\"`](https://vega.github.io/vega-lite/docs/scale.html#quantize) and [`\"threshold\"`](https://vega.github.io/vega-lite/docs/scale.html#threshold).\n\n__Default value:__ please see the [scale type table](https://vega.github.io/vega-lite/docs/scale.html#type)." + }, + "zero": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "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`." + } + }, + "type": "object" + }, + "ScaleBinParams": { + "additionalProperties": false, + "properties": { + "start": { + "description": "The starting (lowest-valued) bin boundary.\n\n__Default value:__ The lowest value of the scale domain will be used.", + "type": "number" + }, + "step": { + "description": "The step size defining the bin interval width.", + "type": "number" + }, + "stop": { + "description": "The stopping (highest-valued) bin boundary.\n\n__Default value:__ The highest value of the scale domain will be used.", + "type": "number" + } + }, + "required": [ + "step" + ], + "type": "object" + }, + "ScaleBins": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ScaleBinParams" + } + ] + }, + "ScaleConfig": { + "additionalProperties": false, + "properties": { + "bandPaddingInner": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default inner padding for `x` and `y` band scales.\n\n__Default value:__\n- `nestedOffsetPaddingInner` for x/y scales with nested x/y offset scales.\n- `barBandPaddingInner` for bar marks (`0.1` by default)\n- `rectBandPaddingInner` for rect and other marks (`0` by default)", + "maximum": 1, + "minimum": 0 + }, + "bandPaddingOuter": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default outer padding for `x` and `y` band scales.\n\n__Default value:__ `paddingInner/2` (which makes _width/height = number of unique values * step_)", + "maximum": 1, + "minimum": 0 + }, + "bandWithNestedOffsetPaddingInner": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default inner padding for `x` and `y` band scales with nested `xOffset` and `yOffset` encoding.\n\n__Default value:__ `0.2`", + "maximum": 1, + "minimum": 0 + }, + "bandWithNestedOffsetPaddingOuter": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default outer padding for `x` and `y` band scales with nested `xOffset` and `yOffset` encoding.\n\n__Default value:__ `0.2`", + "maximum": 1, + "minimum": 0 + }, + "barBandPaddingInner": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default inner padding for `x` and `y` band-ordinal scales of `\"bar\"` marks.\n\n__Default value:__ `0.1`", + "maximum": 1, + "minimum": 0 + }, + "clamp": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "If true, values that exceed the data domain are clamped to either the minimum or maximum range value" + }, + "continuousPadding": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default padding for continuous x/y scales.\n\n__Default:__ The bar width for continuous x-scale of a vertical bar and continuous y-scale of a horizontal bar.; `0` otherwise.", + "minimum": 0 + }, + "invalid": { + "$ref": "#/definitions/ScaleInvalidDataConfig", + "description": "An object that defines scale outputs per channel for invalid values (nulls and NaNs on a continuous scale).\n- The keys in this object are the scale channels.\n- The values is either `\"zero-or-min\"` (use zero if the scale includes zero or min value otherwise) or a value definition `{value: ...}`.\n\n_Example:_ Setting this `config.scale.invalid` property to `{color: {value: '#aaa'}}` will make the visualization color all invalid values with '#aaa'.\n\nSee [https://vega.github.io/vega-lite/docs/invalid-data.html](Invalid Data Docs) for more details." + }, + "maxBandSize": { + "description": "The default max value for mapping quantitative fields to bar's size/bandSize.\n\nIf undefined (default), we will use the axis's size (width or height) - 1.", + "minimum": 0, + "type": "number" + }, + "maxFontSize": { + "description": "The default max value for mapping quantitative fields to text's size/fontSize scale.\n\n__Default value:__ `40`", + "minimum": 0, + "type": "number" + }, + "maxOpacity": { + "description": "Default max opacity for mapping a field to opacity.\n\n__Default value:__ `0.8`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "maxSize": { + "description": "Default max value for point size scale.", + "minimum": 0, + "type": "number" + }, + "maxStrokeWidth": { + "description": "Default max strokeWidth for the scale of strokeWidth for rule and line marks and of size for trail marks.\n\n__Default value:__ `4`", + "minimum": 0, + "type": "number" + }, + "minBandSize": { + "description": "The default min value for mapping quantitative fields to bar and tick's size/bandSize scale.\n\n__Default value:__ `2`", + "minimum": 0, + "type": "number" + }, + "minFontSize": { + "description": "The default min value for mapping quantitative fields to text's size/fontSize scale.\n\n__Default value:__ `8`", + "minimum": 0, + "type": "number" + }, + "minOpacity": { + "description": "Default minimum opacity for mapping a field to opacity.\n\n__Default value:__ `0.3`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "minSize": { + "description": "Default minimum value for point size scale.\n\n__Default value:__ `9`", + "minimum": 0, + "type": "number" + }, + "minStrokeWidth": { + "description": "Default minimum strokeWidth for the scale of strokeWidth for rule and line marks and of size for trail marks.\n\n__Default value:__ `1`", + "minimum": 0, + "type": "number" + }, + "offsetBandPaddingInner": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default padding inner for xOffset/yOffset's band scales.\n\n__Default Value:__ `0`" + }, + "offsetBandPaddingOuter": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default padding outer for xOffset/yOffset's band scales.\n\n__Default Value:__ `0`" + }, + "pointPadding": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default outer padding for `x` and `y` point-ordinal scales.\n\n__Default value:__ `0.5` (which makes _width/height = number of unique values * step_)", + "maximum": 1, + "minimum": 0 + }, + "quantileCount": { + "description": "Default range cardinality for [`quantile`](https://vega.github.io/vega-lite/docs/scale.html#quantile) scale.\n\n__Default value:__ `4`", + "minimum": 0, + "type": "number" + }, + "quantizeCount": { + "description": "Default range cardinality for [`quantize`](https://vega.github.io/vega-lite/docs/scale.html#quantize) scale.\n\n__Default value:__ `4`", + "minimum": 0, + "type": "number" + }, + "rectBandPaddingInner": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default inner padding for `x` and `y` band-ordinal scales of `\"rect\"` marks.\n\n__Default value:__ `0`", + "maximum": 1, + "minimum": 0 + }, + "round": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "If true, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid. (Only available for `x`, `y`, and `size` scales.)" + }, + "tickBandPaddingInner": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default inner padding for `x` and `y` band-ordinal scales of `\"tick\"` marks.\n\n__Default value:__ `0.25`", + "maximum": 1, + "minimum": 0 + }, + "useUnaggregatedDomain": { + "description": "Use the source data range before aggregation as scale domain instead of aggregated data for aggregate axis.\n\nThis is equivalent to setting `domain` to `\"unaggregate\"` for aggregated _quantitative_ fields by default.\n\nThis property only works with aggregate functions that produce values within the raw data domain (`\"mean\"`, `\"average\"`, `\"median\"`, `\"q1\"`, `\"q3\"`, `\"min\"`, `\"max\"`). For other aggregations that produce values outside of the raw data domain (e.g. `\"count\"`, `\"sum\"`), this property is ignored.\n\n__Default value:__ `false`", + "type": "boolean" + }, + "xReverse": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Reverse x-scale by default (useful for right-to-left charts)." + }, + "zero": { + "description": "Default `scale.zero` for [`continuous`](https://vega.github.io/vega-lite/docs/scale.html#continuous) scales except for (1) x/y-scales of non-ranged bar or area charts and (2) size scales.\n\n__Default value:__ `true`", + "type": "boolean" + } + }, + "type": "object" + }, + "ScaleDatumDef": { + "additionalProperties": false, + "properties": { + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "ScaleFieldDef": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "ScaleInterpolateEnum": { + "enum": [ + "rgb", + "lab", + "hcl", + "hsl", + "hsl-long", + "hcl-long", + "cubehelix", + "cubehelix-long" + ], + "type": "string" + }, + "ScaleInterpolateParams": { + "additionalProperties": false, + "properties": { + "gamma": { + "type": "number" + }, + "type": { + "enum": [ + "rgb", + "cubehelix", + "cubehelix-long" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "ScaleInvalidDataConfig": { + "additionalProperties": false, + "properties": { + "angle": { + "$ref": "#/definitions/ScaleInvalidDataShowAs<\"angle\">" + }, + "color": { + "$ref": "#/definitions/ScaleInvalidDataShowAs<\"color\">" + }, + "fill": { + "$ref": "#/definitions/ScaleInvalidDataShowAs<\"fill\">" + }, + "fillOpacity": { + "$ref": "#/definitions/ScaleInvalidDataShowAs<\"fillOpacity\">" + }, + "opacity": { + "$ref": "#/definitions/ScaleInvalidDataShowAs<\"opacity\">" + }, + "radius": { + "$ref": "#/definitions/ScaleInvalidDataShowAs<\"radius\">" + }, + "shape": { + "$ref": "#/definitions/ScaleInvalidDataShowAs<\"shape\">" + }, + "size": { + "$ref": "#/definitions/ScaleInvalidDataShowAs<\"size\">" + }, + "stroke": { + "$ref": "#/definitions/ScaleInvalidDataShowAs<\"stroke\">" + }, + "strokeDash": { + "$ref": "#/definitions/ScaleInvalidDataShowAs<\"strokeDash\">" + }, + "strokeOpacity": { + "$ref": "#/definitions/ScaleInvalidDataShowAs<\"strokeOpacity\">" + }, + "strokeWidth": { + "$ref": "#/definitions/ScaleInvalidDataShowAs<\"strokeWidth\">" + }, + "theta": { + "$ref": "#/definitions/ScaleInvalidDataShowAs<\"theta\">" + }, + "x": { + "$ref": "#/definitions/ScaleInvalidDataShowAs<\"x\">" + }, + "xOffset": { + "$ref": "#/definitions/ScaleInvalidDataShowAs<\"xOffset\">" + }, + "y": { + "$ref": "#/definitions/ScaleInvalidDataShowAs<\"y\">" + }, + "yOffset": { + "$ref": "#/definitions/ScaleInvalidDataShowAs<\"yOffset\">" + } + }, + "type": "object" + }, + "ScaleInvalidDataShowAs<\"angle\">": { + "anyOf": [ + { + "$ref": "#/definitions/ScaleInvalidDataShowAsValue<\"angle\">" + }, + { + "const": "zero-or-min", + "type": "string" + } + ] + }, + "ScaleInvalidDataShowAs<\"color\">": { + "anyOf": [ + { + "$ref": "#/definitions/ScaleInvalidDataShowAsValue<\"color\">" + }, + { + "const": "zero-or-min", + "type": "string" + } + ] + }, + "ScaleInvalidDataShowAs<\"fill\">": { + "anyOf": [ + { + "$ref": "#/definitions/ScaleInvalidDataShowAsValue<\"fill\">" + }, + { + "const": "zero-or-min", + "type": "string" + } + ] + }, + "ScaleInvalidDataShowAs<\"fillOpacity\">": { + "anyOf": [ + { + "$ref": "#/definitions/ScaleInvalidDataShowAsValue<\"fillOpacity\">" + }, + { + "const": "zero-or-min", + "type": "string" + } + ] + }, + "ScaleInvalidDataShowAs<\"opacity\">": { + "anyOf": [ + { + "$ref": "#/definitions/ScaleInvalidDataShowAsValue<\"opacity\">" + }, + { + "const": "zero-or-min", + "type": "string" + } + ] + }, + "ScaleInvalidDataShowAs<\"radius\">": { + "anyOf": [ + { + "$ref": "#/definitions/ScaleInvalidDataShowAsValue<\"radius\">" + }, + { + "const": "zero-or-min", + "type": "string" + } + ] + }, + "ScaleInvalidDataShowAs<\"shape\">": { + "anyOf": [ + { + "$ref": "#/definitions/ScaleInvalidDataShowAsValue<\"shape\">" + }, + { + "const": "zero-or-min", + "type": "string" + } + ] + }, + "ScaleInvalidDataShowAs<\"size\">": { + "anyOf": [ + { + "$ref": "#/definitions/ScaleInvalidDataShowAsValue<\"size\">" + }, + { + "const": "zero-or-min", + "type": "string" + } + ] + }, + "ScaleInvalidDataShowAs<\"stroke\">": { + "anyOf": [ + { + "$ref": "#/definitions/ScaleInvalidDataShowAsValue<\"stroke\">" + }, + { + "const": "zero-or-min", + "type": "string" + } + ] + }, + "ScaleInvalidDataShowAs<\"strokeDash\">": { + "anyOf": [ + { + "$ref": "#/definitions/ScaleInvalidDataShowAsValue<\"strokeDash\">" + }, + { + "const": "zero-or-min", + "type": "string" + } + ] + }, + "ScaleInvalidDataShowAs<\"strokeOpacity\">": { + "anyOf": [ + { + "$ref": "#/definitions/ScaleInvalidDataShowAsValue<\"strokeOpacity\">" + }, + { + "const": "zero-or-min", + "type": "string" + } + ] + }, + "ScaleInvalidDataShowAs<\"strokeWidth\">": { + "anyOf": [ + { + "$ref": "#/definitions/ScaleInvalidDataShowAsValue<\"strokeWidth\">" + }, + { + "const": "zero-or-min", + "type": "string" + } + ] + }, + "ScaleInvalidDataShowAs<\"theta\">": { + "anyOf": [ + { + "$ref": "#/definitions/ScaleInvalidDataShowAsValue<\"theta\">" + }, + { + "const": "zero-or-min", + "type": "string" + } + ] + }, + "ScaleInvalidDataShowAs<\"x\">": { + "anyOf": [ + { + "$ref": "#/definitions/ScaleInvalidDataShowAsValue<\"x\">" + }, + { + "const": "zero-or-min", + "type": "string" + } + ] + }, + "ScaleInvalidDataShowAs<\"xOffset\">": { + "anyOf": [ + { + "$ref": "#/definitions/ScaleInvalidDataShowAsValue<\"xOffset\">" + }, + { + "const": "zero-or-min", + "type": "string" + } + ] + }, + "ScaleInvalidDataShowAs<\"y\">": { + "anyOf": [ + { + "$ref": "#/definitions/ScaleInvalidDataShowAsValue<\"y\">" + }, + { + "const": "zero-or-min", + "type": "string" + } + ] + }, + "ScaleInvalidDataShowAs<\"yOffset\">": { + "anyOf": [ + { + "$ref": "#/definitions/ScaleInvalidDataShowAsValue<\"yOffset\">" + }, + { + "const": "zero-or-min", + "type": "string" + } + ] + }, + "ScaleInvalidDataShowAsValue<\"angle\">": { + "additionalProperties": false, + "properties": { + "value": { + "description": "The rotation angle of the text, in degrees.", + "maximum": 360, + "minimum": 0, + "type": "number" + } + }, + "type": "object" + }, + "ScaleInvalidDataShowAsValue<\"color\">": { + "additionalProperties": false, + "properties": { + "value": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + } + ], + "description": "Default color.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`." + } + }, + "type": "object" + }, + "ScaleInvalidDataShowAsValue<\"fill\">": { + "additionalProperties": false, + "properties": { + "value": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "null" + } + ], + "description": "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)" + } + }, + "type": "object" + }, + "ScaleInvalidDataShowAsValue<\"fillOpacity\">": { + "additionalProperties": false, + "properties": { + "value": { + "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "type": "object" + }, + "ScaleInvalidDataShowAsValue<\"opacity\">": { + "additionalProperties": false, + "properties": { + "value": { + "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.", + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "type": "object" + }, + "ScaleInvalidDataShowAsValue<\"radius\">": { + "additionalProperties": false, + "properties": { + "value": { + "description": "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties.\n\n__Default value:__ `min(plot_width, plot_height)/2`", + "minimum": 0, + "type": "number" + } + }, + "type": "object" + }, + "ScaleInvalidDataShowAsValue<\"shape\">": { + "additionalProperties": false, + "properties": { + "value": { + "anyOf": [ + { + "$ref": "#/definitions/SymbolShape" + }, + { + "type": "string" + } + ], + "description": "Shape of the point marks. Supported values include:\n- plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`.\n- the line symbol `\"stroke\"`\n- centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"`\n- a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`" + } + }, + "type": "object" + }, + "ScaleInvalidDataShowAsValue<\"size\">": { + "additionalProperties": false, + "properties": { + "value": { + "description": "Default size for marks.\n- For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.\n- For `bar`, this represents the band size of the bar, in pixels.\n- For `text`, this represents the font size, in pixels.\n\n__Default value:__\n- `30` for point, circle, square marks; width/height's `step`\n- `2` for bar marks with discrete dimensions;\n- `5` for bar marks with continuous dimensions;\n- `11` for text marks.", + "minimum": 0, + "type": "number" + } + }, + "type": "object" + }, + "ScaleInvalidDataShowAsValue<\"stroke\">": { + "additionalProperties": false, + "properties": { + "value": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "null" + } + ], + "description": "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)" + } + }, + "type": "object" + }, + "ScaleInvalidDataShowAsValue<\"strokeDash\">": { + "additionalProperties": false, + "properties": { + "value": { + "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.", + "items": { + "type": "number" + }, + "type": "array" + } + }, + "type": "object" + }, + "ScaleInvalidDataShowAsValue<\"strokeOpacity\">": { + "additionalProperties": false, + "properties": { + "value": { + "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "type": "object" + }, + "ScaleInvalidDataShowAsValue<\"strokeWidth\">": { + "additionalProperties": false, + "properties": { + "value": { + "description": "The stroke width, in pixels.", + "minimum": 0, + "type": "number" + } + }, + "type": "object" + }, + "ScaleInvalidDataShowAsValue<\"theta\">": { + "additionalProperties": false, + "properties": { + "value": { + "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians.", + "maximum": 360, + "minimum": 0, + "type": "number" + } + }, + "type": "object" + }, + "ScaleInvalidDataShowAsValue<\"x\">": { + "additionalProperties": false, + "properties": { + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + } + ], + "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot." + } + }, + "type": "object" + }, + "ScaleInvalidDataShowAsValue<\"xOffset\">": { + "additionalProperties": false, + "properties": { + "value": { + "description": "Offset for x-position.", + "type": "number" + } + }, + "type": "object" + }, + "ScaleInvalidDataShowAsValue<\"y\">": { + "additionalProperties": false, + "properties": { + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "height", + "type": "string" + } + ], + "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot." + } + }, + "type": "object" + }, + "ScaleInvalidDataShowAsValue<\"yOffset\">": { + "additionalProperties": false, + "properties": { + "value": { + "description": "Offset for y-position.", + "type": "number" + } + }, + "type": "object" + }, + "ScaleResolveMap": { + "additionalProperties": false, + "properties": { + "angle": { + "$ref": "#/definitions/ResolveMode" + }, + "color": { + "$ref": "#/definitions/ResolveMode" + }, + "fill": { + "$ref": "#/definitions/ResolveMode" + }, + "fillOpacity": { + "$ref": "#/definitions/ResolveMode" + }, + "opacity": { + "$ref": "#/definitions/ResolveMode" + }, + "radius": { + "$ref": "#/definitions/ResolveMode" + }, + "shape": { + "$ref": "#/definitions/ResolveMode" + }, + "size": { + "$ref": "#/definitions/ResolveMode" + }, + "stroke": { + "$ref": "#/definitions/ResolveMode" + }, + "strokeDash": { + "$ref": "#/definitions/ResolveMode" + }, + "strokeOpacity": { + "$ref": "#/definitions/ResolveMode" + }, + "strokeWidth": { + "$ref": "#/definitions/ResolveMode" + }, + "theta": { + "$ref": "#/definitions/ResolveMode" + }, + "x": { + "$ref": "#/definitions/ResolveMode" + }, + "xOffset": { + "$ref": "#/definitions/ResolveMode" + }, + "y": { + "$ref": "#/definitions/ResolveMode" + }, + "yOffset": { + "$ref": "#/definitions/ResolveMode" + } + }, + "type": "object" + }, + "ScaleType": { + "enum": [ + "linear", + "log", + "pow", + "sqrt", + "symlog", + "identity", + "sequential", + "time", + "utc", + "quantile", + "quantize", + "threshold", + "bin-ordinal", + "ordinal", + "point", + "band" + ], + "type": "string" + }, + "SchemeParams": { + "additionalProperties": false, + "properties": { + "count": { + "description": "The number of colors to use in the scheme. This can be useful for scale types such as `\"quantize\"`, which use the length of the scale range to determine the number of discrete bins for the scale domain.", + "type": "number" + }, + "extent": { + "description": "The extent of the color range to use. For example `[0.2, 1]` will rescale the color scheme such that color values in the range _[0, 0.2)_ are excluded from the scheme.", + "items": { + "type": "number" + }, + "type": "array" + }, + "name": { + "$ref": "#/definitions/ColorScheme", + "description": "A color scheme name for ordinal scales (e.g., `\"category10\"` or `\"blues\"`).\n\nFor the full list of supported schemes, please refer to the [Vega Scheme](https://vega.github.io/vega/docs/schemes/#reference) reference." + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "SecondaryFieldDef": { + "additionalProperties": false, + "description": "A field definition of a secondary channel that shares a scale with another primary channel. For example, `x2`, `xError` and `xError2` share the same scale with `x`.", + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.", + "type": "null" + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": "object" + }, + "SelectionConfig": { + "additionalProperties": false, + "properties": { + "interval": { + "$ref": "#/definitions/IntervalSelectionConfigWithoutType", + "description": "The default definition for an [`interval`](https://vega.github.io/vega-lite/docs/parameter.html#select) selection. All properties and transformations for an interval selection definition (except `type`) may be specified here.\n\nFor instance, setting `interval` to `{\"translate\": false}` disables the ability to move interval selections by default." + }, + "point": { + "$ref": "#/definitions/PointSelectionConfigWithoutType", + "description": "The default definition for a [`point`](https://vega.github.io/vega-lite/docs/parameter.html#select) selection. All properties and transformations for a point selection definition (except `type`) may be specified here.\n\nFor instance, setting `point` to `{\"on\": \"dblclick\"}` populates point selections on double-click by default." + } + }, + "type": "object" + }, + "SelectionInit": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + } + ] + }, + "SelectionInitInterval": { + "anyOf": [ + { + "$ref": "#/definitions/Vector2" + }, + { + "$ref": "#/definitions/Vector2" + }, + { + "$ref": "#/definitions/Vector2" + }, + { + "$ref": "#/definitions/Vector2" + } + ] + }, + "SelectionInitIntervalMapping": { + "$ref": "#/definitions/Dict" + }, + "SelectionInitMapping": { + "$ref": "#/definitions/Dict" + }, + "SelectionParameter": { + "additionalProperties": false, + "properties": { + "bind": { + "anyOf": [ + { + "$ref": "#/definitions/Binding" + }, + { + "additionalProperties": { + "$ref": "#/definitions/Binding" + }, + "type": "object" + }, + { + "$ref": "#/definitions/LegendBinding" + }, + { + "const": "scales", + "type": "string" + } + ], + "description": "When set, a selection is populated by input elements (also known as dynamic query widgets) or by interacting with the corresponding legend. Direct manipulation interaction is disabled by default; to re-enable it, set the selection's [`on`](https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties) property.\n\nLegend bindings are restricted to selections that only specify a single field or encoding.\n\nQuery widget binding takes the form of Vega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind) or can be a mapping between projected field/encodings and binding definitions.\n\n__See also:__ [`bind`](https://vega.github.io/vega-lite/docs/bind.html) documentation." + }, + "name": { + "$ref": "#/definitions/ParameterName", + "description": "Required. A unique name for the selection parameter. Selection names should be valid JavaScript identifiers: they should contain only alphanumeric characters (or \"$\", or \"_\") and may not start with a digit. Reserved keywords that may not be used as parameter names are \"datum\", \"event\", \"item\", and \"parent\"." + }, + "select": { + "anyOf": [ + { + "$ref": "#/definitions/SelectionType" + }, + { + "$ref": "#/definitions/PointSelectionConfig" + }, + { + "$ref": "#/definitions/IntervalSelectionConfig" + } + ], + "description": "Determines the default event processing and data query for the selection. Vega-Lite currently supports two selection types:\n\n- `\"point\"` -- to select multiple discrete data values; the first value is selected on `click` and additional values toggled on shift-click.\n- `\"interval\"` -- to select a continuous range of data values on `drag`." + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/SelectionInit" + }, + { + "items": { + "$ref": "#/definitions/SelectionInitMapping" + }, + "type": "array" + }, + { + "$ref": "#/definitions/SelectionInitIntervalMapping" + } + ], + "description": "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/selection.html#project) and initial values.\n\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/value.html) documentation." + } + }, + "required": [ + "name", + "select" + ], + "type": "object" + }, + "SelectionResolution": { + "enum": [ + "global", + "union", + "intersect" + ], + "type": "string" + }, + "SelectionType": { + "enum": [ + "point", + "interval" + ], + "type": "string" + }, + "SequenceGenerator": { + "additionalProperties": false, + "properties": { + "name": { + "description": "Provide a placeholder name and bind data at runtime.", + "type": "string" + }, + "sequence": { + "$ref": "#/definitions/SequenceParams", + "description": "Generate a sequence of numbers." + } + }, + "required": [ + "sequence" + ], + "type": "object" + }, + "SequenceParams": { + "additionalProperties": false, + "properties": { + "as": { + "$ref": "#/definitions/FieldName", + "description": "The name of the generated sequence field.\n\n__Default value:__ `\"data\"`" + }, + "start": { + "description": "The starting value of the sequence (inclusive).", + "type": "number" + }, + "step": { + "description": "The step value between sequence entries.\n\n__Default value:__ `1`", + "type": "number" + }, + "stop": { + "description": "The ending value of the sequence (exclusive).", + "type": "number" + } + }, + "required": [ + "start", + "stop" + ], + "type": "object" + }, + "SequentialMultiHue": { + "enum": [ + "turbo", + "viridis", + "inferno", + "magma", + "plasma", + "cividis", + "bluegreen", + "bluegreen-3", + "bluegreen-4", + "bluegreen-5", + "bluegreen-6", + "bluegreen-7", + "bluegreen-8", + "bluegreen-9", + "bluepurple", + "bluepurple-3", + "bluepurple-4", + "bluepurple-5", + "bluepurple-6", + "bluepurple-7", + "bluepurple-8", + "bluepurple-9", + "goldgreen", + "goldgreen-3", + "goldgreen-4", + "goldgreen-5", + "goldgreen-6", + "goldgreen-7", + "goldgreen-8", + "goldgreen-9", + "goldorange", + "goldorange-3", + "goldorange-4", + "goldorange-5", + "goldorange-6", + "goldorange-7", + "goldorange-8", + "goldorange-9", + "goldred", + "goldred-3", + "goldred-4", + "goldred-5", + "goldred-6", + "goldred-7", + "goldred-8", + "goldred-9", + "greenblue", + "greenblue-3", + "greenblue-4", + "greenblue-5", + "greenblue-6", + "greenblue-7", + "greenblue-8", + "greenblue-9", + "orangered", + "orangered-3", + "orangered-4", + "orangered-5", + "orangered-6", + "orangered-7", + "orangered-8", + "orangered-9", + "purplebluegreen", + "purplebluegreen-3", + "purplebluegreen-4", + "purplebluegreen-5", + "purplebluegreen-6", + "purplebluegreen-7", + "purplebluegreen-8", + "purplebluegreen-9", + "purpleblue", + "purpleblue-3", + "purpleblue-4", + "purpleblue-5", + "purpleblue-6", + "purpleblue-7", + "purpleblue-8", + "purpleblue-9", + "purplered", + "purplered-3", + "purplered-4", + "purplered-5", + "purplered-6", + "purplered-7", + "purplered-8", + "purplered-9", + "redpurple", + "redpurple-3", + "redpurple-4", + "redpurple-5", + "redpurple-6", + "redpurple-7", + "redpurple-8", + "redpurple-9", + "yellowgreenblue", + "yellowgreenblue-3", + "yellowgreenblue-4", + "yellowgreenblue-5", + "yellowgreenblue-6", + "yellowgreenblue-7", + "yellowgreenblue-8", + "yellowgreenblue-9", + "yellowgreen", + "yellowgreen-3", + "yellowgreen-4", + "yellowgreen-5", + "yellowgreen-6", + "yellowgreen-7", + "yellowgreen-8", + "yellowgreen-9", + "yelloworangebrown", + "yelloworangebrown-3", + "yelloworangebrown-4", + "yelloworangebrown-5", + "yelloworangebrown-6", + "yelloworangebrown-7", + "yelloworangebrown-8", + "yelloworangebrown-9", + "yelloworangered", + "yelloworangered-3", + "yelloworangered-4", + "yelloworangered-5", + "yelloworangered-6", + "yelloworangered-7", + "yelloworangered-8", + "yelloworangered-9", + "darkblue", + "darkblue-3", + "darkblue-4", + "darkblue-5", + "darkblue-6", + "darkblue-7", + "darkblue-8", + "darkblue-9", + "darkgold", + "darkgold-3", + "darkgold-4", + "darkgold-5", + "darkgold-6", + "darkgold-7", + "darkgold-8", + "darkgold-9", + "darkgreen", + "darkgreen-3", + "darkgreen-4", + "darkgreen-5", + "darkgreen-6", + "darkgreen-7", + "darkgreen-8", + "darkgreen-9", + "darkmulti", + "darkmulti-3", + "darkmulti-4", + "darkmulti-5", + "darkmulti-6", + "darkmulti-7", + "darkmulti-8", + "darkmulti-9", + "darkred", + "darkred-3", + "darkred-4", + "darkred-5", + "darkred-6", + "darkred-7", + "darkred-8", + "darkred-9", + "lightgreyred", + "lightgreyred-3", + "lightgreyred-4", + "lightgreyred-5", + "lightgreyred-6", + "lightgreyred-7", + "lightgreyred-8", + "lightgreyred-9", + "lightgreyteal", + "lightgreyteal-3", + "lightgreyteal-4", + "lightgreyteal-5", + "lightgreyteal-6", + "lightgreyteal-7", + "lightgreyteal-8", + "lightgreyteal-9", + "lightmulti", + "lightmulti-3", + "lightmulti-4", + "lightmulti-5", + "lightmulti-6", + "lightmulti-7", + "lightmulti-8", + "lightmulti-9", + "lightorange", + "lightorange-3", + "lightorange-4", + "lightorange-5", + "lightorange-6", + "lightorange-7", + "lightorange-8", + "lightorange-9", + "lighttealblue", + "lighttealblue-3", + "lighttealblue-4", + "lighttealblue-5", + "lighttealblue-6", + "lighttealblue-7", + "lighttealblue-8", + "lighttealblue-9" + ], + "type": "string" + }, + "SequentialSingleHue": { + "enum": [ + "blues", + "tealblues", + "teals", + "greens", + "browns", + "greys", + "purples", + "warmgreys", + "reds", + "oranges" + ], + "type": "string" + }, + "ShapeDef": { + "$ref": "#/definitions/MarkPropDef<(string|null),TypeForShape>" + }, + "SharedEncoding": { + "additionalProperties": false, + "properties": { + "angle": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "condition": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef" + }, + { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + "type": "array" + } + ], + "description": "A field definition or one or more value definition(s) with a parameter predicate." + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "anyOf": [ + { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + ], + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "color": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "condition": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef" + }, + { + "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>" + }, + "type": "array" + } + ], + "description": "A field definition or one or more value definition(s) with a parameter predicate." + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "anyOf": [ + { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + ], + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "string" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "description": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "const": "binned", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "condition": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(string|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(string|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef" + }, + { + "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>" + }, + "type": "array" + } + ], + "description": "A field definition or one or more value definition(s) with a parameter predicate." + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "format": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/Dict" + } + ], + "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format." + }, + "formatType": { + "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.", + "type": "string" + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "detail": { + "anyOf": [ + { + "$ref": "#/definitions/FieldDefWithoutScale" + }, + { + "items": { + "$ref": "#/definitions/FieldDefWithoutScale" + }, + "type": "array" + } + ], + "description": "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": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "condition": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef" + }, + { + "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>" + }, + "type": "array" + } + ], + "description": "A field definition or one or more value definition(s) with a parameter predicate." + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "anyOf": [ + { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + ], + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "string" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "fillOpacity": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "condition": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef" + }, + { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + "type": "array" + } + ], + "description": "A field definition or one or more value definition(s) with a parameter predicate." + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "anyOf": [ + { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + ], + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "href": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "const": "binned", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "condition": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(string|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(string|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef" + }, + { + "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>" + }, + "type": "array" + } + ], + "description": "A field definition or one or more value definition(s) with a parameter predicate." + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "format": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/Dict" + } + ], + "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format." + }, + "formatType": { + "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.", + "type": "string" + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "key": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "const": "binned", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "latitude": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.", + "type": "null" + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "anyOf": [ + { + "const": "quantitative", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.", + "type": "string" + }, + { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + ], + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "latitude2": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.", + "type": "null" + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "longitude": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.", + "type": "null" + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "anyOf": [ + { + "const": "quantitative", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.", + "type": "string" + }, + { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + ], + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "longitude2": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.", + "type": "null" + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "opacity": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "condition": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef" + }, + { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + "type": "array" + } + ], + "description": "A field definition or one or more value definition(s) with a parameter predicate." + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "anyOf": [ + { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + ], + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "order": { + "anyOf": [ + { + "$ref": "#/definitions/OrderFieldDef" + }, + { + "items": { + "$ref": "#/definitions/OrderFieldDef" + }, + "type": "array" + }, + { + "$ref": "#/definitions/OrderValueDef" + }, + { + "$ref": "#/definitions/OrderOnlyDef" + } + ], + "description": "Order of the marks.\n- For stacked marks, this `order` channel encodes [stack order](https://vega.github.io/vega-lite/docs/stack.html#order).\n- For line and trail marks, this `order` channel encodes order of data points in the lines. This can be useful for creating [a connected scatterplot](https://vega.github.io/vega-lite/examples/connected_scatterplot.html). Setting `order` to `{\"value\": null}` makes the line marks use the original order in the data sources.\n- Otherwise, this `order` channel encodes layer order of the marks.\n\n__Note__: In aggregate plots, `order` field should be `aggregate`d to avoid creating additional aggregation grouping." + }, + "radius": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "const": "binned", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "stack": { + "anyOf": [ + { + "$ref": "#/definitions/StackOffset" + }, + { + "type": "null" + }, + { + "type": "boolean" + } + ], + "description": "Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values:\n- `\"zero\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart).\n- `\"normalize\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized) and pie charts [with percentage tooltip](https://vega.github.io/vega-lite/docs/arc.html#tooltip)).
\n-`\"center\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)).\n- `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "anyOf": [ + { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + ], + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "radius2": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.", + "type": "null" + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "shape": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "condition": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef" + }, + { + "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>" + }, + "type": "array" + } + ], + "description": "A field definition or one or more value definition(s) with a parameter predicate." + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "anyOf": [ + { + "$ref": "#/definitions/TypeForShape", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + ], + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "size": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "condition": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef" + }, + { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + "type": "array" + } + ], + "description": "A field definition or one or more value definition(s) with a parameter predicate." + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "anyOf": [ + { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + ], + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "stroke": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "condition": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef" + }, + { + "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>" + }, + "type": "array" + } + ], + "description": "A field definition or one or more value definition(s) with a parameter predicate." + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "anyOf": [ + { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + ], + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "string" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "strokeDash": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "condition": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(number[]|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(number[]|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef" + }, + { + "$ref": "#/definitions/ConditionalValueDef<(number[]|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(number[]|ExprRef)>" + }, + "type": "array" + } + ], + "description": "A field definition or one or more value definition(s) with a parameter predicate." + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "anyOf": [ + { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + ], + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "strokeOpacity": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "condition": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef" + }, + { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + "type": "array" + } + ], + "description": "A field definition or one or more value definition(s) with a parameter predicate." + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "anyOf": [ + { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + ], + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "strokeWidth": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "condition": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef" + }, + { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + "type": "array" + } + ], + "description": "A field definition or one or more value definition(s) with a parameter predicate." + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "legend": { + "anyOf": [ + { + "$ref": "#/definitions/Legend" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "anyOf": [ + { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + ], + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "text": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "const": "binned", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "condition": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(Text|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(Text|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalStringFieldDef" + }, + { + "$ref": "#/definitions/ConditionalValueDef<(Text|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(Text|ExprRef)>" + }, + "type": "array" + } + ], + "description": "A field definition or one or more value definition(s) with a parameter predicate." + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "format": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/Dict" + } + ], + "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format." + }, + "formatType": { + "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.", + "type": "string" + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "anyOf": [ + { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + ], + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "theta": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "const": "binned", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "stack": { + "anyOf": [ + { + "$ref": "#/definitions/StackOffset" + }, + { + "type": "null" + }, + { + "type": "boolean" + } + ], + "description": "Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values:\n- `\"zero\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart).\n- `\"normalize\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized) and pie charts [with percentage tooltip](https://vega.github.io/vega-lite/docs/arc.html#tooltip)).
\n-`\"center\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)).\n- `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "anyOf": [ + { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + ], + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "theta2": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.", + "type": "null" + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "tooltip": { + "anyOf": [ + { + "$ref": "#/definitions/StringFieldDefWithCondition" + }, + { + "$ref": "#/definitions/StringValueDefWithCondition" + }, + { + "items": { + "$ref": "#/definitions/StringFieldDef" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "The tooltip text to show upon mouse hover. Specifying `tooltip` encoding overrides [the `tooltip` property in the mark definition](https://vega.github.io/vega-lite/docs/mark.html#mark-def).\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite." + }, + "url": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "const": "binned", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "condition": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalValueDef<(string|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(string|ExprRef)>" + }, + "type": "array" + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef" + }, + { + "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>" + }, + "type": "array" + } + ], + "description": "A field definition or one or more value definition(s) with a parameter predicate." + } + ], + "description": "One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "format": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/Dict" + } + ], + "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format." + }, + "formatType": { + "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.", + "type": "string" + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "x": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "axis": { + "anyOf": [ + { + "$ref": "#/definitions/Axis" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of axis's gridlines, ticks and labels. If `null`, the axis for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [axis properties](https://vega.github.io/vega-lite/docs/axis.html) are applied.\n\n__See also:__ [`axis`](https://vega.github.io/vega-lite/docs/axis.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "const": "binned", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "impute": { + "anyOf": [ + { + "$ref": "#/definitions/ImputeParams" + }, + { + "type": "null" + } + ], + "description": "An object defining the properties of the Impute Operation to be applied. The field value of the other positional channel is taken as `key` of the `Impute` Operation. The field of the `color` channel if specified is used as `groupby` of the `Impute` Operation.\n\n__See also:__ [`impute`](https://vega.github.io/vega-lite/docs/impute.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "stack": { + "anyOf": [ + { + "$ref": "#/definitions/StackOffset" + }, + { + "type": "null" + }, + { + "type": "boolean" + } + ], + "description": "Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values:\n- `\"zero\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart).\n- `\"normalize\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized) and pie charts [with percentage tooltip](https://vega.github.io/vega-lite/docs/arc.html#tooltip)).
\n-`\"center\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)).\n- `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "anyOf": [ + { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + ], + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "x2": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.", + "type": "null" + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "xError": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.", + "type": "null" + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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." + }, + "value": { + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).", + "type": "number" + } + }, + "type": "object" + }, + "xError2": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.", + "type": "null" + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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." + }, + "value": { + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).", + "type": "number" + } + }, + "type": "object" + }, + "xOffset": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "anyOf": [ + { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + ], + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).", + "type": "number" + } + }, + "type": "object" + }, + "y": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "axis": { + "anyOf": [ + { + "$ref": "#/definitions/Axis" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of axis's gridlines, ticks and labels. If `null`, the axis for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [axis properties](https://vega.github.io/vega-lite/docs/axis.html) are applied.\n\n__See also:__ [`axis`](https://vega.github.io/vega-lite/docs/axis.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "const": "binned", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "impute": { + "anyOf": [ + { + "$ref": "#/definitions/ImputeParams" + }, + { + "type": "null" + } + ], + "description": "An object defining the properties of the Impute Operation to be applied. The field value of the other positional channel is taken as `key` of the `Impute` Operation. The field of the `color` channel if specified is used as `groupby` of the `Impute` Operation.\n\n__See also:__ [`impute`](https://vega.github.io/vega-lite/docs/impute.html) documentation." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "stack": { + "anyOf": [ + { + "$ref": "#/definitions/StackOffset" + }, + { + "type": "null" + }, + { + "type": "boolean" + } + ], + "description": "Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values:\n- `\"zero\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart).\n- `\"normalize\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized) and pie charts [with percentage tooltip](https://vega.github.io/vega-lite/docs/arc.html#tooltip)).
\n-`\"center\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)).\n- `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "anyOf": [ + { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + ], + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "y2": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.", + "type": "null" + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "yError": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.", + "type": "null" + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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." + }, + "value": { + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).", + "type": "number" + } + }, + "type": "object" + }, + "yError2": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.", + "type": "null" + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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." + }, + "value": { + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).", + "type": "number" + } + }, + "type": "object" + }, + "yOffset": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "datum": { + "anyOf": [ + { + "$ref": "#/definitions/PrimitiveValue" + }, + { + "$ref": "#/definitions/DateTime" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "A constant value in data domain." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "scale": { + "anyOf": [ + { + "$ref": "#/definitions/Scale" + }, + { + "type": "null" + } + ], + "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." + }, + "sort": { + "$ref": "#/definitions/Sort", + "description": "Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `\"ascending\"` or `\"descending\"`.\n\nFor discrete fields, `sort` can be one of the following:\n- `\"ascending\"` or `\"descending\"` -- for sorting by the values' natural order in JavaScript.\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\"x\"` or `\"y\"`) with an optional minus prefix for descending sort (e.g., `\"-x\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\"sort\": \"-x\"` is equivalent to `\"sort\": {\"encoding\": \"x\", \"order\": \"descending\"}`.\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\"month\"` and `\"day\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\"Mon\"`, `\"Tue\"`).\n- `null` indicating no sort.\n\n__Default value:__ `\"ascending\"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "anyOf": [ + { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + { + "$ref": "#/definitions/Type", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + ], + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + }, + "value": { + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).", + "type": "number" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "SingleDefUnitChannel": { + "enum": [ + "x", + "y", + "xOffset", + "yOffset", + "x2", + "y2", + "longitude", + "latitude", + "longitude2", + "latitude2", + "theta", + "theta2", + "radius", + "radius2", + "color", + "fill", + "stroke", + "opacity", + "fillOpacity", + "strokeOpacity", + "strokeWidth", + "strokeDash", + "size", + "angle", + "shape", + "key", + "text", + "href", + "url", + "description" + ], + "type": "string" + }, + "SingleTimeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/LocalSingleTimeUnit" + }, + { + "$ref": "#/definitions/UtcSingleTimeUnit" + } + ] + }, + "Sort": { + "anyOf": [ + { + "$ref": "#/definitions/SortArray" + }, + { + "$ref": "#/definitions/AllSortString" + }, + { + "$ref": "#/definitions/EncodingSortField" + }, + { + "$ref": "#/definitions/SortByEncoding" + }, + { + "type": "null" + } + ] + }, + "SortArray": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "items": { + "type": "boolean" + }, + "type": "array" + }, + { + "items": { + "$ref": "#/definitions/DateTime" + }, + "type": "array" + } + ] + }, + "SortByChannel": { + "enum": [ + "x", + "y", + "color", + "fill", + "stroke", + "strokeWidth", + "size", + "shape", + "fillOpacity", + "strokeOpacity", + "opacity", + "text" + ], + "type": "string" + }, + "SortByChannelDesc": { + "enum": [ + "-x", + "-y", + "-color", + "-fill", + "-stroke", + "-strokeWidth", + "-size", + "-shape", + "-fillOpacity", + "-strokeOpacity", + "-opacity", + "-text" + ], + "type": "string" + }, + "SortByEncoding": { + "additionalProperties": false, + "properties": { + "encoding": { + "$ref": "#/definitions/SortByChannel", + "description": "The [encoding channel](https://vega.github.io/vega-lite/docs/encoding.html#channels) to sort by (e.g., `\"x\"`, `\"y\"`)" + }, + "order": { + "anyOf": [ + { + "$ref": "#/definitions/SortOrder" + }, + { + "type": "null" + } + ], + "description": "The sort order. One of `\"ascending\"` (default), `\"descending\"`, or `null` (no not sort)." + } + }, + "required": [ + "encoding" + ], + "type": "object" + }, + "SortField": { + "additionalProperties": false, + "description": "A sort definition for transform", + "properties": { + "field": { + "$ref": "#/definitions/FieldName", + "description": "The name of the field to sort." + }, + "order": { + "anyOf": [ + { + "$ref": "#/definitions/SortOrder" + }, + { + "type": "null" + } + ], + "description": "Whether to sort the field in ascending or descending order. One of `\"ascending\"` (default), `\"descending\"`, or `null` (no not sort)." + } + }, + "required": [ + "field" + ], + "type": "object" + }, + "SortOrder": { + "enum": [ + "ascending", + "descending" + ], + "type": "string" + }, + "SphereGenerator": { + "additionalProperties": false, + "properties": { + "name": { + "description": "Provide a placeholder name and bind data at runtime.", + "type": "string" + }, + "sphere": { + "anyOf": [ + { + "const": true, + "type": "boolean" + }, + { + "additionalProperties": false, + "type": "object" + } + ], + "description": "Generate sphere GeoJSON data for the full globe." + } + }, + "required": [ + "sphere" + ], + "type": "object" + }, + "StackOffset": { + "enum": [ + "zero", + "center", + "normalize" + ], + "type": "string" + }, + "StackTransform": { + "additionalProperties": false, + "properties": { + "as": { + "anyOf": [ + { + "$ref": "#/definitions/FieldName" + }, + { + "items": { + "$ref": "#/definitions/FieldName" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + } + ], + "description": "Output field names. This can be either a string or an array of strings with two elements denoting the name for the fields for stack start and stack end respectively. If a single string(e.g., `\"val\"`) is provided, the end field will be `\"val_end\"`." + }, + "groupby": { + "description": "The data fields to group by.", + "items": { + "$ref": "#/definitions/FieldName" + }, + "type": "array" + }, + "offset": { + "description": "Mode for stacking marks. One of `\"zero\"` (default), `\"center\"`, or `\"normalize\"`. The `\"zero\"` offset will stack starting at `0`. The `\"center\"` offset will center the stacks. The `\"normalize\"` offset will compute percentage values for each stack point, with output values in the range `[0,1]`.\n\n__Default value:__ `\"zero\"`", + "enum": [ + "zero", + "center", + "normalize" + ], + "type": "string" + }, + "sort": { + "description": "Field that determines the order of leaves in the stacked charts.", + "items": { + "$ref": "#/definitions/SortField" + }, + "type": "array" + }, + "stack": { + "$ref": "#/definitions/FieldName", + "description": "The field which is stacked." + } + }, + "required": [ + "stack", + "groupby", + "as" + ], + "type": "object" + }, + "StandardType": { + "enum": [ + "quantitative", + "ordinal", + "temporal", + "nominal" + ], + "type": "string" + }, + "Step": { + "additionalProperties": false, + "properties": { + "for": { + "$ref": "#/definitions/StepFor", + "description": "Whether to apply the step to position scale or offset scale when there are both `x` and `xOffset` or both `y` and `yOffset` encodings." + }, + "step": { + "description": "The size (width/height) per discrete step.", + "type": "number" + } + }, + "required": [ + "step" + ], + "type": "object" + }, + "StepFor": { + "enum": [ + "position", + "offset" + ], + "type": "string" + }, + "Stream": { + "anyOf": [ + { + "$ref": "#/definitions/EventStream" + }, + { + "$ref": "#/definitions/DerivedStream" + }, + { + "$ref": "#/definitions/MergedStream" + } + ] + }, + "StringFieldDef": { + "additionalProperties": false, + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "const": "binned", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "format": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/Dict" + } + ], + "description": "When used with the default `\"number\"` and `\"time\"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `\"number\"` (e.g., for quantitative fields), this is D3's [number format pattern](https://github.com/d3/d3-format#locale_format).\n- If the format type is `\"time\"` (e.g., for temporal fields), this is D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__ Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format." + }, + "formatType": { + "description": "The format type for labels. One of `\"number\"`, `\"time\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__\n- `\"time\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\n- `\"number\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.", + "type": "string" + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "StringFieldDefWithCondition": { + "$ref": "#/definitions/FieldOrDatumDefWithCondition" + }, + "StringValueDefWithCondition": { + "$ref": "#/definitions/ValueDefWithCondition" + }, + "StrokeCap": { + "enum": [ + "butt", + "round", + "square" + ], + "type": "string" + }, + "StrokeJoin": { + "enum": [ + "miter", + "round", + "bevel" + ], + "type": "string" + }, + "StyleConfigIndex": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/definitions/AnyMarkConfig" + }, + { + "$ref": "#/definitions/Axis" + } + ] + }, + "properties": { + "arc": { + "$ref": "#/definitions/RectConfig", + "description": "Arc-specific Config" + }, + "area": { + "$ref": "#/definitions/AreaConfig", + "description": "Area-Specific Config" + }, + "bar": { + "$ref": "#/definitions/BarConfig", + "description": "Bar-Specific Config" + }, + "circle": { + "$ref": "#/definitions/MarkConfig", + "description": "Circle-Specific Config" + }, + "geoshape": { + "$ref": "#/definitions/MarkConfig", + "description": "Geoshape-Specific Config" + }, + "group-subtitle": { + "$ref": "#/definitions/MarkConfig", + "description": "Default style for chart subtitles" + }, + "group-title": { + "$ref": "#/definitions/MarkConfig", + "description": "Default style for chart titles" + }, + "guide-label": { + "$ref": "#/definitions/MarkConfig", + "description": "Default style for axis, legend, and header labels." + }, + "guide-title": { + "$ref": "#/definitions/MarkConfig", + "description": "Default style for axis, legend, and header titles." + }, + "image": { + "$ref": "#/definitions/RectConfig", + "description": "Image-specific Config" + }, + "line": { + "$ref": "#/definitions/LineConfig", + "description": "Line-Specific Config" + }, + "mark": { + "$ref": "#/definitions/MarkConfig", + "description": "Mark Config" + }, + "point": { + "$ref": "#/definitions/MarkConfig", + "description": "Point-Specific Config" + }, + "rect": { + "$ref": "#/definitions/RectConfig", + "description": "Rect-Specific Config" + }, + "rule": { + "$ref": "#/definitions/MarkConfig", + "description": "Rule-Specific Config" + }, + "square": { + "$ref": "#/definitions/MarkConfig", + "description": "Square-Specific Config" + }, + "text": { + "$ref": "#/definitions/MarkConfig", + "description": "Text-Specific Config" + }, + "tick": { + "$ref": "#/definitions/TickConfig", + "description": "Tick-Specific Config" + }, + "trail": { + "$ref": "#/definitions/LineConfig", + "description": "Trail-Specific Config" + } + }, + "type": "object" + }, + "SymbolShape": { + "type": "string" + }, + "Text": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ] + }, + "TextBaseline": { + "anyOf": [ + { + "const": "alphabetic", + "type": "string" + }, + { + "$ref": "#/definitions/Baseline" + }, + { + "const": "line-top", + "type": "string" + }, + { + "const": "line-bottom", + "type": "string" + } + ] + }, + "TextDef": { + "anyOf": [ + { + "$ref": "#/definitions/FieldOrDatumDefWithCondition" + }, + { + "$ref": "#/definitions/FieldOrDatumDefWithCondition" + }, + { + "$ref": "#/definitions/ValueDefWithCondition" + } + ] + }, + "TextDirection": { + "enum": [ + "ltr", + "rtl" + ], + "type": "string" + }, + "TickConfig": { + "additionalProperties": false, + "properties": { + "align": { + "anyOf": [ + { + "$ref": "#/definitions/Align" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\"left\"`, `\"right\"`, `\"center\"`.\n\n__Note:__ Expression reference is *not* supported for range marks." + }, + "angle": { + "anyOf": [ + { + "description": "The rotation angle of the text, in degrees.", + "maximum": 360, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "aria": { + "anyOf": [ + { + "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ariaRole": { + "anyOf": [ + { + "description": "Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"role\" attribute. Warning: this property is experimental and may be changed in the future.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ariaRoleDescription": { + "anyOf": [ + { + "description": "A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the \"aria-roledescription\" attribute. Warning: this property is experimental and may be changed in the future.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "aspect": { + "anyOf": [ + { + "description": "Whether to keep aspect ratio of image marks.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "bandSize": { + "description": "The width of the ticks.\n\n__Default value:__ 3/4 of step (width step for horizontal ticks and height step for vertical ticks).", + "minimum": 0, + "type": "number" + }, + "baseline": { + "anyOf": [ + { + "$ref": "#/definitions/TextBaseline" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "For text marks, the vertical text baseline. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, `\"line-bottom\"`, or an expression reference that provides one of the valid values. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Note:__ Expression reference is *not* supported for range marks." + }, + "blend": { + "anyOf": [ + { + "$ref": "#/definitions/Blend", + "description": "The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `\"source-over\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "color": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default color.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`." + }, + "cornerRadius": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusBottomLeft": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusBottomRight": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusTopLeft": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cornerRadiusTopRight": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cursor": { + "anyOf": [ + { + "$ref": "#/definitions/Cursor", + "description": "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "description": { + "anyOf": [ + { + "description": "A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the [\"aria-label\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dir": { + "anyOf": [ + { + "$ref": "#/definitions/TextDirection", + "description": "The direction of the text. One of `\"ltr\"` (left-to-right) or `\"rtl\"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `\"ltr\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dx": { + "anyOf": [ + { + "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dy": { + "anyOf": [ + { + "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "ellipsis": { + "anyOf": [ + { + "description": "The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `\"…\"`", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "endAngle": { + "anyOf": [ + { + "description": "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fill": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)" + }, + "fillOpacity": { + "anyOf": [ + { + "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "filled": { + "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\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": { + "anyOf": [ + { + "description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontSize": { + "anyOf": [ + { + "description": "The font size, in pixels.\n\n__Default value:__ `11`", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle", + "description": "The font style (e.g., `\"italic\"`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight", + "description": "The font weight. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "height": { + "anyOf": [ + { + "description": "Height of the marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "href": { + "anyOf": [ + { + "$ref": "#/definitions/URI", + "description": "A URL to load upon mouse click. If defined, the mark acts as a hyperlink." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "innerRadius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "interpolate": { + "anyOf": [ + { + "$ref": "#/definitions/Interpolate", + "description": "The line interpolation method to use for line and area marks. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function.\n- `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "invalid": { + "anyOf": [ + { + "$ref": "#/definitions/MarkInvalidDataMode" + }, + { + "type": "null" + } + ], + "description": "Invalid data mode, which defines how the marks and corresponding scales should represent invalid values (`null` and `NaN` in continuous scales *without* defined output for invalid values).\n\n- `\"filter\"` — *Exclude* all invalid values from the visualization's *marks* and *scales*. For path marks (for line, area, trail), this option will create paths that connect valid points, as if the data rows with invalid values do not exist.\n\n- `\"break-paths-filter-domains\"` — Break path marks (for line, area, trail) at invalid values. For non-path marks, this is equivalent to `\"filter\"`. All *scale* domains will *exclude* these filtered data points.\n\n- `\"break-paths-show-domains\"` — Break paths (for line, area, trail) at invalid values. Hide invalid values for non-path marks. All *scale* domains will *include* these filtered data points (for both path and non-path marks).\n\n- `\"show\"` or `null` — Show all data points in the marks and scale domains. Each scale will use the output for invalid values defined in `config.scale.invalid` or, if unspecified, by default invalid values will produce the same visual values as zero (if the scale includes zero) or the minimum value (if the scale does not include zero).\n\n- `\"break-paths-show-path-domains\"` (default) — This is equivalent to `\"break-paths-show-domains\"` for path-based marks (line/area/trail) and `\"filter\"` for non-path marks.\n\n__Note__: If any channel's scale has an output for invalid values defined in `config.scale.invalid`, all values for the scales will be considered \"valid\" since they can produce a reasonable output for the scales. Thus, fields for such channels will not be filtered and will not cause path breaks." + }, + "limit": { + "anyOf": [ + { + "description": "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "lineBreak": { + "anyOf": [ + { + "description": "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "lineHeight": { + "anyOf": [ + { + "description": "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "opacity": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.", + "maximum": 1, + "minimum": 0 + }, + "order": { + "description": "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.", + "type": [ + "null", + "boolean" + ] + }, + "orient": { + "$ref": "#/definitions/Orientation", + "description": "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.\n- For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension.\n- For area, this property determines the orient property of the Vega output.\n- For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored." + }, + "outerRadius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "padAngle": { + "anyOf": [ + { + "description": "The angular padding applied to sides of the arc, in radians.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "radius": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties.\n\n__Default value:__ `min(plot_width, plot_height)/2`", + "minimum": 0 + }, + "radius2": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The secondary (inner) radius in pixels of arc marks.\n\n__Default value:__ `0`", + "minimum": 0 + }, + "shape": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/SymbolShape" + }, + { + "type": "string" + } + ], + "description": "Shape of the point marks. Supported values include:\n- plotting shapes: `\"circle\"`, `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, `\"triangle-down\"`, `\"triangle-right\"`, or `\"triangle-left\"`.\n- the line symbol `\"stroke\"`\n- centered directional shapes `\"arrow\"`, `\"wedge\"`, or `\"triangle\"`\n- a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `\"circle\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "size": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default size for marks.\n- For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.\n- For `bar`, this represents the band size of the bar, in pixels.\n- For `text`, this represents the font size, in pixels.\n\n__Default value:__\n- `30` for point, circle, square marks; width/height's `step`\n- `2` for bar marks with discrete dimensions;\n- `5` for bar marks with continuous dimensions;\n- `11` for text marks.", + "minimum": 0 + }, + "smooth": { + "anyOf": [ + { + "description": "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "startAngle": { + "anyOf": [ + { + "description": "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "stroke": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)" + }, + "strokeCap": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeCap", + "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeDash": { + "anyOf": [ + { + "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeDashOffset": { + "anyOf": [ + { + "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeJoin": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeJoin", + "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeMiterLimit": { + "anyOf": [ + { + "description": "The miter limit at which to bevel a line join.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeOffset": { + "anyOf": [ + { + "description": "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeOpacity": { + "anyOf": [ + { + "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeWidth": { + "anyOf": [ + { + "description": "The stroke width, in pixels.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "tension": { + "anyOf": [ + { + "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "text": { + "anyOf": [ + { + "$ref": "#/definitions/Text", + "description": "Placeholder text if the `text` channel is not specified" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "theta": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)\n\n- For text marks, polar coordinate angle in radians.", + "maximum": 360, + "minimum": 0 + }, + "theta2": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise." + }, + "thickness": { + "description": "Thickness of the tick mark.\n\n__Default value:__ `1`", + "minimum": 0, + "type": "number" + }, + "timeUnitBandPosition": { + "description": "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.", + "type": "number" + }, + "timeUnitBandSize": { + "description": "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.", + "type": "number" + }, + "tooltip": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "$ref": "#/definitions/TooltipContent" + }, + { + "$ref": "#/definitions/ExprRef" + }, + { + "type": "null" + } + ], + "description": "The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{\"content\": \"encoding\"}`, then all fields from `encoding` will be used.\n- If `tooltip` is `{\"content\": \"data\"}`, then all fields that appear in the highlighted data point will be used.\n- If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite.\n\n__Default value:__ `null`" + }, + "url": { + "anyOf": [ + { + "$ref": "#/definitions/URI", + "description": "The URL of the image file for image marks." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "width": { + "anyOf": [ + { + "description": "Width of the marks.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "x": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot." + }, + "x2": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"` for the width of the plot." + }, + "y": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot." + }, + "y2": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"` for the height of the plot." + } + }, + "type": "object" + }, + "TickCount": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/TimeInterval" + }, + { + "$ref": "#/definitions/TimeIntervalStep" + } + ] + }, + "TimeInterval": { + "enum": [ + "millisecond", + "second", + "minute", + "hour", + "day", + "week", + "month", + "year" + ], + "type": "string" + }, + "TimeIntervalStep": { + "additionalProperties": false, + "properties": { + "interval": { + "$ref": "#/definitions/TimeInterval" + }, + "step": { + "type": "number" + } + }, + "required": [ + "interval", + "step" + ], + "type": "object" + }, + "TimeLocale": { + "additionalProperties": false, + "description": "Locale definition for formatting dates and times.", + "properties": { + "date": { + "description": "The date (%x) format specifier (e.g., \"%m/%d/%Y\").", + "type": "string" + }, + "dateTime": { + "description": "The date and time (%c) format specifier (e.g., \"%a %b %e %X %Y\").", + "type": "string" + }, + "days": { + "$ref": "#/definitions/Vector7", + "description": "The full names of the weekdays, starting with Sunday." + }, + "months": { + "$ref": "#/definitions/Vector12", + "description": "The full names of the months (starting with January)." + }, + "periods": { + "$ref": "#/definitions/Vector2", + "description": "The A.M. and P.M. equivalents (e.g., [\"AM\", \"PM\"])." + }, + "shortDays": { + "$ref": "#/definitions/Vector7", + "description": "The abbreviated names of the weekdays, starting with Sunday." + }, + "shortMonths": { + "$ref": "#/definitions/Vector12", + "description": "The abbreviated names of the months (starting with January)." + }, + "time": { + "description": "The time (%X) format specifier (e.g., \"%H:%M:%S\").", + "type": "string" + } + }, + "required": [ + "dateTime", + "date", + "time", + "periods", + "days", + "shortDays", + "months", + "shortMonths" + ], + "type": "object" + }, + "TimeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/SingleTimeUnit" + }, + { + "$ref": "#/definitions/MultiTimeUnit" + } + ] + }, + "TimeUnitParams": { + "additionalProperties": false, + "description": "Time Unit Params for encoding predicate, which can specified if the data is already \"binned\".", + "properties": { + "binned": { + "description": "Whether the data has already been binned to this time unit. If true, Vega-Lite will only format the data, marks, and guides, without applying the timeUnit transform to re-bin the data again.", + "type": "boolean" + }, + "maxbins": { + "description": "If no `unit` is specified, maxbins is used to infer time units.", + "type": "number" + }, + "step": { + "description": "The number of steps between bins, in terms of the least significant unit provided.", + "type": "number" + }, + "unit": { + "$ref": "#/definitions/TimeUnit", + "description": "Defines how date-time values should be binned." + }, + "utc": { + "description": "True to use UTC timezone. Equivalent to using a `utc` prefixed `TimeUnit`.", + "type": "boolean" + } + }, + "type": "object" + }, + "TimeUnitTransform": { + "additionalProperties": false, + "properties": { + "as": { + "$ref": "#/definitions/FieldName", + "description": "The output field to write the timeUnit value." + }, + "field": { + "$ref": "#/definitions/FieldName", + "description": "The data field to apply time unit." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitTransformParams" + } + ], + "description": "The timeUnit." + } + }, + "required": [ + "timeUnit", + "field", + "as" + ], + "type": "object" + }, + "TimeUnitTransformParams": { + "additionalProperties": false, + "properties": { + "maxbins": { + "description": "If no `unit` is specified, maxbins is used to infer time units.", + "type": "number" + }, + "step": { + "description": "The number of steps between bins, in terms of the least significant unit provided.", + "type": "number" + }, + "unit": { + "$ref": "#/definitions/TimeUnit", + "description": "Defines how date-time values should be binned." + }, + "utc": { + "description": "True to use UTC timezone. Equivalent to using a `utc` prefixed `TimeUnit`.", + "type": "boolean" + } + }, + "type": "object" + }, + "TitleAnchor": { + "enum": [ + null, + "start", + "middle", + "end" + ], + "type": [ + "null", + "string" + ] + }, + "TitleConfig": { + "$ref": "#/definitions/BaseTitleNoValueRefs" + }, + "TitleFrame": { + "enum": [ + "bounds", + "group" + ], + "type": "string" + }, + "TitleOrient": { + "enum": [ + "none", + "left", + "right", + "top", + "bottom" + ], + "type": "string" + }, + "TitleParams": { + "additionalProperties": false, + "properties": { + "align": { + "$ref": "#/definitions/Align", + "description": "Horizontal text alignment for title text. One of `\"left\"`, `\"center\"`, or `\"right\"`." + }, + "anchor": { + "$ref": "#/definitions/TitleAnchor", + "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. `\"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": { + "anyOf": [ + { + "description": "Angle in degrees of title and subtitle text.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "aria": { + "anyOf": [ + { + "description": "A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the \"aria-hidden\" attribute will be set on the output SVG group, removing the title from the ARIA accessibility tree.\n\n__Default value:__ `true`", + "type": "boolean" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "baseline": { + "$ref": "#/definitions/TextBaseline", + "description": "Vertical text baseline for title and subtitle text. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, or `\"line-bottom\"`. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone." + }, + "color": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "Text color for title text." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dx": { + "anyOf": [ + { + "description": "Delta offset for title and subtitle text x-coordinate.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "dy": { + "anyOf": [ + { + "description": "Delta offset for title and subtitle text y-coordinate.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "font": { + "anyOf": [ + { + "description": "Font name for title text.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontSize": { + "anyOf": [ + { + "description": "Font size in pixels for title text.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle", + "description": "Font style for title text." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "fontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight", + "description": "Font weight for title text. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "frame": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/TitleFrame" + }, + { + "type": "string" + } + ], + "description": "The reference frame for the anchor position, one of `\"bounds\"` (to anchor relative to the full bounding box) or `\"group\"` (to anchor relative to the group width or height)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "limit": { + "anyOf": [ + { + "description": "The maximum allowed length in pixels of title and subtitle text.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "lineHeight": { + "anyOf": [ + { + "description": "Line height in pixels for multi-line title text or title text with `\"line-top\"` or `\"line-bottom\"` baseline.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "offset": { + "anyOf": [ + { + "description": "The orthogonal offset in pixels by which to displace the title group from its position along the edge of the chart.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "orient": { + "anyOf": [ + { + "$ref": "#/definitions/TitleOrient", + "description": "Default title orientation (`\"top\"`, `\"bottom\"`, `\"left\"`, or `\"right\"`)" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "style": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "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\"`." + }, + "subtitle": { + "$ref": "#/definitions/Text", + "description": "The subtitle Text." + }, + "subtitleColor": { + "anyOf": [ + { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Color" + } + ], + "description": "Text color for subtitle text." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "subtitleFont": { + "anyOf": [ + { + "description": "Font name for subtitle text.", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "subtitleFontSize": { + "anyOf": [ + { + "description": "Font size in pixels for subtitle text.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "subtitleFontStyle": { + "anyOf": [ + { + "$ref": "#/definitions/FontStyle", + "description": "Font style for subtitle text." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "subtitleFontWeight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight", + "description": "Font weight for subtitle text. This can be either a string (e.g `\"bold\"`, `\"normal\"`) or a number (`100`, `200`, `300`, ..., `900` where `\"normal\"` = `400` and `\"bold\"` = `700`)." + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "subtitleLineHeight": { + "anyOf": [ + { + "description": "Line height in pixels for multi-line subtitle text.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "subtitlePadding": { + "anyOf": [ + { + "description": "The padding in pixels between title and subtitle text.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "text": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The title text." + }, + "zindex": { + "description": "The integer z-index indicating the layering of the title group relative to other axis, mark and legend groups.\n\n__Default value:__ `0`.", + "minimum": 0, + "type": "number" + } + }, + "required": [ + "text" + ], + "type": "object" + }, + "TooltipContent": { + "additionalProperties": false, + "properties": { + "content": { + "enum": [ + "encoding", + "data" + ], + "type": "string" + } + }, + "required": [ + "content" + ], + "type": "object" + }, + "TopLevelConcatSpec": { + "additionalProperties": false, + "properties": { + "$schema": { + "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v5.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.", + "format": "uri", + "type": "string" + }, + "align": { + "anyOf": [ + { + "$ref": "#/definitions/LayoutAlign" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\n- For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\n- For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`." + }, + "autosize": { + "anyOf": [ + { + "$ref": "#/definitions/AutosizeType" + }, + { + "$ref": "#/definitions/AutoSizeParams" + } + ], + "description": "How the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`" + }, + "background": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ `\"white\"`" + }, + "bounds": { + "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`", + "enum": [ + "full", + "flush" + ], + "type": "string" + }, + "center": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`" + }, + "columns": { + "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for:\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).", + "type": "number" + }, + "concat": { + "description": "A list of views to be concatenated.", + "items": { + "$ref": "#/definitions/NonNormalizedSpec" + }, + "type": "array" + }, + "config": { + "$ref": "#/definitions/Config", + "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification." + }, + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Data" + }, + { + "type": "null" + } + ], + "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent." + }, + "datasets": { + "$ref": "#/definitions/Datasets", + "description": "A global data store for named datasets. This is a mapping from names to inline datasets. 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." + }, + "description": { + "description": "Description of this mark for commenting purpose.", + "type": "string" + }, + "name": { + "description": "Name of the visualization for later reference.", + "type": "string" + }, + "padding": { + "anyOf": [ + { + "$ref": "#/definitions/Padding" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`" + }, + "params": { + "description": "Dynamic variables or selections that parameterize a visualization.", + "items": { + "$ref": "#/definitions/TopLevelParameter" + }, + "type": "array" + }, + "resolve": { + "$ref": "#/definitions/Resolve", + "description": "Scale, axis, and legend resolutions for view composition specifications." + }, + "spacing": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)" + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/TitleParams" + } + ], + "description": "Title for the plot." + }, + "transform": { + "description": "An array of data transformations such as filter and new field calculation.", + "items": { + "$ref": "#/definitions/Transform" + }, + "type": "array" + }, + "usermeta": { + "$ref": "#/definitions/Dict", + "description": "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata." + } + }, + "required": [ + "concat" + ], + "type": "object" + }, + "TopLevelHConcatSpec": { + "additionalProperties": false, + "properties": { + "$schema": { + "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v5.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.", + "format": "uri", + "type": "string" + }, + "autosize": { + "anyOf": [ + { + "$ref": "#/definitions/AutosizeType" + }, + { + "$ref": "#/definitions/AutoSizeParams" + } + ], + "description": "How the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`" + }, + "background": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ `\"white\"`" + }, + "bounds": { + "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`", + "enum": [ + "full", + "flush" + ], + "type": "string" + }, + "center": { + "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`", + "type": "boolean" + }, + "config": { + "$ref": "#/definitions/Config", + "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification." + }, + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Data" + }, + { + "type": "null" + } + ], + "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent." + }, + "datasets": { + "$ref": "#/definitions/Datasets", + "description": "A global data store for named datasets. This is a mapping from names to inline datasets. 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." + }, + "description": { + "description": "Description of this mark for commenting purpose.", + "type": "string" + }, + "hconcat": { + "description": "A list of views to be concatenated and put into a row.", + "items": { + "$ref": "#/definitions/NonNormalizedSpec" + }, + "type": "array" + }, + "name": { + "description": "Name of the visualization for later reference.", + "type": "string" + }, + "padding": { + "anyOf": [ + { + "$ref": "#/definitions/Padding" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`" + }, + "params": { + "description": "Dynamic variables or selections that parameterize a visualization.", + "items": { + "$ref": "#/definitions/TopLevelParameter" + }, + "type": "array" + }, + "resolve": { + "$ref": "#/definitions/Resolve", + "description": "Scale, axis, and legend resolutions for view composition specifications." + }, + "spacing": { + "description": "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`", + "type": "number" + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/TitleParams" + } + ], + "description": "Title for the plot." + }, + "transform": { + "description": "An array of data transformations such as filter and new field calculation.", + "items": { + "$ref": "#/definitions/Transform" + }, + "type": "array" + }, + "usermeta": { + "$ref": "#/definitions/Dict", + "description": "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata." + } + }, + "required": [ + "hconcat" + ], + "type": "object" + }, + "TopLevelVConcatSpec": { + "additionalProperties": false, + "properties": { + "$schema": { + "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v5.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.", + "format": "uri", + "type": "string" + }, + "autosize": { + "anyOf": [ + { + "$ref": "#/definitions/AutosizeType" + }, + { + "$ref": "#/definitions/AutoSizeParams" + } + ], + "description": "How the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`" + }, + "background": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ `\"white\"`" + }, + "bounds": { + "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`", + "enum": [ + "full", + "flush" + ], + "type": "string" + }, + "center": { + "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`", + "type": "boolean" + }, + "config": { + "$ref": "#/definitions/Config", + "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification." + }, + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Data" + }, + { + "type": "null" + } + ], + "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent." + }, + "datasets": { + "$ref": "#/definitions/Datasets", + "description": "A global data store for named datasets. This is a mapping from names to inline datasets. 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." + }, + "description": { + "description": "Description of this mark for commenting purpose.", + "type": "string" + }, + "name": { + "description": "Name of the visualization for later reference.", + "type": "string" + }, + "padding": { + "anyOf": [ + { + "$ref": "#/definitions/Padding" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`" + }, + "params": { + "description": "Dynamic variables or selections that parameterize a visualization.", + "items": { + "$ref": "#/definitions/TopLevelParameter" + }, + "type": "array" + }, + "resolve": { + "$ref": "#/definitions/Resolve", + "description": "Scale, axis, and legend resolutions for view composition specifications." + }, + "spacing": { + "description": "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`", + "type": "number" + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/TitleParams" + } + ], + "description": "Title for the plot." + }, + "transform": { + "description": "An array of data transformations such as filter and new field calculation.", + "items": { + "$ref": "#/definitions/Transform" + }, + "type": "array" + }, + "usermeta": { + "$ref": "#/definitions/Dict", + "description": "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata." + }, + "vconcat": { + "description": "A list of views to be concatenated and put into a column.", + "items": { + "$ref": "#/definitions/NonNormalizedSpec" + }, + "type": "array" + } + }, + "required": [ + "vconcat" + ], + "type": "object" + }, + "TopLevelLayerSpec": { + "additionalProperties": false, + "properties": { + "$schema": { + "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v5.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.", + "format": "uri", + "type": "string" + }, + "autosize": { + "anyOf": [ + { + "$ref": "#/definitions/AutosizeType" + }, + { + "$ref": "#/definitions/AutoSizeParams" + } + ], + "description": "How the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`" + }, + "background": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ `\"white\"`" + }, + "config": { + "$ref": "#/definitions/Config", + "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification." + }, + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Data" + }, + { + "type": "null" + } + ], + "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent." + }, + "datasets": { + "$ref": "#/definitions/Datasets", + "description": "A global data store for named datasets. This is a mapping from names to inline datasets. 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." + }, + "description": { + "description": "Description of this mark for commenting purpose.", + "type": "string" + }, + "encoding": { + "$ref": "#/definitions/SharedEncoding", + "description": "A shared key-value mapping between encoding channels and definition of fields in the underlying layers." + }, + "height": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "container", + "type": "string" + }, + { + "$ref": "#/definitions/Step" + } + ], + "description": "The height of a visualization.\n\n- For a plot with a continuous y-field, height should be a number.\n- For a plot with either a discrete y-field or no y-field, height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step. (No y-field is equivalent to having one discrete step.)\n- To enable responsive sizing on height, it should be set to `\"container\"`.\n\n__Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous y-field and `config.view.discreteHeight` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view and the `\"container\"` option cannot be used.\n\n__See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation." + }, + "layer": { + "description": "Layer or single view specifications to be layered.\n\n__Note__: Specifications inside `layer` cannot use `row` and `column` channels as layering facet specifications is not allowed. Instead, use the [facet operator](https://vega.github.io/vega-lite/docs/facet.html) and place a layer inside a facet.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/LayerSpec" + }, + { + "$ref": "#/definitions/UnitSpec" + } + ] + }, + "type": "array" + }, + "name": { + "description": "Name of the visualization for later reference.", + "type": "string" + }, + "padding": { + "anyOf": [ + { + "$ref": "#/definitions/Padding" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`" + }, + "params": { + "description": "Dynamic variables or selections that parameterize a visualization.", + "items": { + "$ref": "#/definitions/TopLevelParameter" + }, + "type": "array" + }, + "projection": { + "$ref": "#/definitions/Projection", + "description": "An object defining properties of the geographic projection shared by underlying layers." + }, + "resolve": { + "$ref": "#/definitions/Resolve", + "description": "Scale, axis, and legend resolutions for view composition specifications." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/TitleParams" + } + ], + "description": "Title for the plot." + }, + "transform": { + "description": "An array of data transformations such as filter and new field calculation.", + "items": { + "$ref": "#/definitions/Transform" + }, + "type": "array" + }, + "usermeta": { + "$ref": "#/definitions/Dict", + "description": "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata." + }, + "view": { + "$ref": "#/definitions/ViewBackground", + "description": "An object defining the view background's fill and stroke.\n\n__Default value:__ none (transparent)" + }, + "width": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "container", + "type": "string" + }, + { + "$ref": "#/definitions/Step" + } + ], + "description": "The width of a visualization.\n\n- For a plot with a continuous x-field, width should be a number.\n- For a plot with either a discrete x-field or no x-field, width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step. (No x-field is equivalent to having one discrete step.)\n- To enable responsive sizing on width, it should be set to `\"container\"`.\n\n__Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous x-field and `config.view.discreteWidth` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view and the `\"container\"` option cannot be used.\n\n__See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation." + } + }, + "required": [ + "layer" + ], + "type": "object" + }, + "TopLevelRepeatSpec": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "$schema": { + "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v5.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.", + "format": "uri", + "type": "string" + }, + "align": { + "anyOf": [ + { + "$ref": "#/definitions/LayoutAlign" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\n- For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\n- For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`." + }, + "autosize": { + "anyOf": [ + { + "$ref": "#/definitions/AutosizeType" + }, + { + "$ref": "#/definitions/AutoSizeParams" + } + ], + "description": "How the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`" + }, + "background": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ `\"white\"`" + }, + "bounds": { + "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`", + "enum": [ + "full", + "flush" + ], + "type": "string" + }, + "center": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`" + }, + "columns": { + "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for:\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).", + "type": "number" + }, + "config": { + "$ref": "#/definitions/Config", + "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification." + }, + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Data" + }, + { + "type": "null" + } + ], + "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent." + }, + "datasets": { + "$ref": "#/definitions/Datasets", + "description": "A global data store for named datasets. This is a mapping from names to inline datasets. 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." + }, + "description": { + "description": "Description of this mark for commenting purpose.", + "type": "string" + }, + "name": { + "description": "Name of the visualization for later reference.", + "type": "string" + }, + "padding": { + "anyOf": [ + { + "$ref": "#/definitions/Padding" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`" + }, + "params": { + "description": "Dynamic variables or selections that parameterize a visualization.", + "items": { + "$ref": "#/definitions/TopLevelParameter" + }, + "type": "array" + }, + "repeat": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "$ref": "#/definitions/RepeatMapping" + } + ], + "description": "Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If `\"repeat\"` is an array, the field can be referred to as `{\"repeat\": \"repeat\"}`. The repeated views are laid out in a wrapped row. You can set the number of columns to control the wrapping. 2) An object that maps `\"row\"` and/or `\"column\"` to the listed fields to be repeated along the particular orientations. The objects `{\"repeat\": \"row\"}` and `{\"repeat\": \"column\"}` can be used to refer to the repeated field respectively." + }, + "resolve": { + "$ref": "#/definitions/Resolve", + "description": "Scale, axis, and legend resolutions for view composition specifications." + }, + "spacing": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)" + }, + "spec": { + "$ref": "#/definitions/NonNormalizedSpec", + "description": "A specification of the view that gets repeated." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/TitleParams" + } + ], + "description": "Title for the plot." + }, + "transform": { + "description": "An array of data transformations such as filter and new field calculation.", + "items": { + "$ref": "#/definitions/Transform" + }, + "type": "array" + }, + "usermeta": { + "$ref": "#/definitions/Dict", + "description": "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata." + } + }, + "required": [ + "repeat", + "spec" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "$schema": { + "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v5.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.", + "format": "uri", + "type": "string" + }, + "align": { + "anyOf": [ + { + "$ref": "#/definitions/LayoutAlign" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\n- For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\n- For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`." + }, + "autosize": { + "anyOf": [ + { + "$ref": "#/definitions/AutosizeType" + }, + { + "$ref": "#/definitions/AutoSizeParams" + } + ], + "description": "How the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`" + }, + "background": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ `\"white\"`" + }, + "bounds": { + "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`", + "enum": [ + "full", + "flush" + ], + "type": "string" + }, + "center": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`" + }, + "columns": { + "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for:\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).", + "type": "number" + }, + "config": { + "$ref": "#/definitions/Config", + "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification." + }, + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Data" + }, + { + "type": "null" + } + ], + "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent." + }, + "datasets": { + "$ref": "#/definitions/Datasets", + "description": "A global data store for named datasets. This is a mapping from names to inline datasets. 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." + }, + "description": { + "description": "Description of this mark for commenting purpose.", + "type": "string" + }, + "name": { + "description": "Name of the visualization for later reference.", + "type": "string" + }, + "padding": { + "anyOf": [ + { + "$ref": "#/definitions/Padding" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`" + }, + "params": { + "description": "Dynamic variables or selections that parameterize a visualization.", + "items": { + "$ref": "#/definitions/TopLevelParameter" + }, + "type": "array" + }, + "repeat": { + "$ref": "#/definitions/LayerRepeatMapping", + "description": "Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If `\"repeat\"` is an array, the field can be referred to as `{\"repeat\": \"repeat\"}`. The repeated views are laid out in a wrapped row. You can set the number of columns to control the wrapping. 2) An object that maps `\"row\"` and/or `\"column\"` to the listed fields to be repeated along the particular orientations. The objects `{\"repeat\": \"row\"}` and `{\"repeat\": \"column\"}` can be used to refer to the repeated field respectively." + }, + "resolve": { + "$ref": "#/definitions/Resolve", + "description": "Scale, axis, and legend resolutions for view composition specifications." + }, + "spacing": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)" + }, + "spec": { + "anyOf": [ + { + "$ref": "#/definitions/LayerSpec" + }, + { + "$ref": "#/definitions/UnitSpecWithFrame" + } + ], + "description": "A specification of the view that gets repeated." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/TitleParams" + } + ], + "description": "Title for the plot." + }, + "transform": { + "description": "An array of data transformations such as filter and new field calculation.", + "items": { + "$ref": "#/definitions/Transform" + }, + "type": "array" + }, + "usermeta": { + "$ref": "#/definitions/Dict", + "description": "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata." + } + }, + "required": [ + "repeat", + "spec" + ], + "type": "object" + } + ] + }, + "TopLevelFacetSpec": { + "additionalProperties": false, + "properties": { + "$schema": { + "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v5.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.", + "format": "uri", + "type": "string" + }, + "align": { + "anyOf": [ + { + "$ref": "#/definitions/LayoutAlign" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\n- For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\n- For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`." + }, + "autosize": { + "anyOf": [ + { + "$ref": "#/definitions/AutosizeType" + }, + { + "$ref": "#/definitions/AutoSizeParams" + } + ], + "description": "How the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`" + }, + "background": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ `\"white\"`" + }, + "bounds": { + "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`", + "enum": [ + "full", + "flush" + ], + "type": "string" + }, + "center": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`" + }, + "columns": { + "description": "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for:\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).", + "type": "number" + }, + "config": { + "$ref": "#/definitions/Config", + "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification." + }, + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Data" + }, + { + "type": "null" + } + ], + "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent." + }, + "datasets": { + "$ref": "#/definitions/Datasets", + "description": "A global data store for named datasets. This is a mapping from names to inline datasets. 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." + }, + "description": { + "description": "Description of this mark for commenting purpose.", + "type": "string" + }, + "facet": { + "anyOf": [ + { + "$ref": "#/definitions/FacetFieldDef" + }, + { + "$ref": "#/definitions/FacetMapping" + } + ], + "description": "Definition for how to facet the data. One of: 1) [a field definition for faceting the plot by one field](https://vega.github.io/vega-lite/docs/facet.html#field-def) 2) [An object that maps `row` and `column` channels to their field definitions](https://vega.github.io/vega-lite/docs/facet.html#mapping)" + }, + "name": { + "description": "Name of the visualization for later reference.", + "type": "string" + }, + "padding": { + "anyOf": [ + { + "$ref": "#/definitions/Padding" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`" + }, + "params": { + "description": "Dynamic variables or selections that parameterize a visualization.", + "items": { + "$ref": "#/definitions/TopLevelParameter" + }, + "type": "array" + }, + "resolve": { + "$ref": "#/definitions/Resolve", + "description": "Scale, axis, and legend resolutions for view composition specifications." + }, + "spacing": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)" + }, + "spec": { + "anyOf": [ + { + "$ref": "#/definitions/LayerSpec" + }, + { + "$ref": "#/definitions/UnitSpecWithFrame" + } + ], + "description": "A specification of the view that gets faceted." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/TitleParams" + } + ], + "description": "Title for the plot." + }, + "transform": { + "description": "An array of data transformations such as filter and new field calculation.", + "items": { + "$ref": "#/definitions/Transform" + }, + "type": "array" + }, + "usermeta": { + "$ref": "#/definitions/Dict", + "description": "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata." + } + }, + "required": [ + "data", + "facet", + "spec" + ], + "type": "object" + }, + "TopLevelParameter": { + "anyOf": [ + { + "$ref": "#/definitions/VariableParameter" + }, + { + "$ref": "#/definitions/TopLevelSelectionParameter" + } + ] + }, + "TopLevelSelectionParameter": { + "additionalProperties": false, + "properties": { + "bind": { + "anyOf": [ + { + "$ref": "#/definitions/Binding" + }, + { + "additionalProperties": { + "$ref": "#/definitions/Binding" + }, + "type": "object" + }, + { + "$ref": "#/definitions/LegendBinding" + }, + { + "const": "scales", + "type": "string" + } + ], + "description": "When set, a selection is populated by input elements (also known as dynamic query widgets) or by interacting with the corresponding legend. Direct manipulation interaction is disabled by default; to re-enable it, set the selection's [`on`](https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties) property.\n\nLegend bindings are restricted to selections that only specify a single field or encoding.\n\nQuery widget binding takes the form of Vega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind) or can be a mapping between projected field/encodings and binding definitions.\n\n__See also:__ [`bind`](https://vega.github.io/vega-lite/docs/bind.html) documentation." + }, + "name": { + "$ref": "#/definitions/ParameterName", + "description": "Required. A unique name for the selection parameter. Selection names should be valid JavaScript identifiers: they should contain only alphanumeric characters (or \"$\", or \"_\") and may not start with a digit. Reserved keywords that may not be used as parameter names are \"datum\", \"event\", \"item\", and \"parent\"." + }, + "select": { + "anyOf": [ + { + "$ref": "#/definitions/SelectionType" + }, + { + "$ref": "#/definitions/PointSelectionConfig" + }, + { + "$ref": "#/definitions/IntervalSelectionConfig" + } + ], + "description": "Determines the default event processing and data query for the selection. Vega-Lite currently supports two selection types:\n\n- `\"point\"` -- to select multiple discrete data values; the first value is selected on `click` and additional values toggled on shift-click.\n- `\"interval\"` -- to select a continuous range of data values on `drag`." + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/SelectionInit" + }, + { + "items": { + "$ref": "#/definitions/SelectionInitMapping" + }, + "type": "array" + }, + { + "$ref": "#/definitions/SelectionInitIntervalMapping" + } + ], + "description": "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/selection.html#project) and initial values.\n\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/value.html) documentation." + }, + "views": { + "description": "By default, top-level selections are applied to every view in the visualization. If this property is specified, selections will only be applied to views with the given names.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "name", + "select" + ], + "type": "object" + }, + "TopLevelSpec": { + "anyOf": [ + { + "$ref": "#/definitions/TopLevelUnitSpec" + }, + { + "$ref": "#/definitions/TopLevelFacetSpec" + }, + { + "$ref": "#/definitions/TopLevelLayerSpec" + }, + { + "$ref": "#/definitions/TopLevelRepeatSpec" + }, + { + "$ref": "#/definitions/TopLevelConcatSpec" + }, + { + "$ref": "#/definitions/TopLevelVConcatSpec" + }, + { + "$ref": "#/definitions/TopLevelHConcatSpec" + } + ], + "description": "A Vega-Lite top-level specification. This is the root class for all Vega-Lite specifications. (The json schema is generated from this type.)" + }, + "TopLevelUnitSpec": { + "additionalProperties": false, + "properties": { + "$schema": { + "description": "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v5.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.", + "format": "uri", + "type": "string" + }, + "align": { + "anyOf": [ + { + "$ref": "#/definitions/LayoutAlign" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The alignment to apply to grid rows and columns. The supported string values are `\"all\"`, `\"each\"`, and `\"none\"`.\n\n- For `\"none\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\n- For `\"each\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\n- For `\"all\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{\"row\": string, \"column\": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `\"all\"`." + }, + "autosize": { + "anyOf": [ + { + "$ref": "#/definitions/AutosizeType" + }, + { + "$ref": "#/definitions/AutoSizeParams" + } + ], + "description": "How the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`" + }, + "background": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ `\"white\"`" + }, + "bounds": { + "description": "The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `\"full\"`", + "enum": [ + "full", + "flush" + ], + "type": "string" + }, + "center": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{\"row\": boolean, \"column\": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`" + }, + "config": { + "$ref": "#/definitions/Config", + "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification." + }, + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Data" + }, + { + "type": "null" + } + ], + "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent." + }, + "datasets": { + "$ref": "#/definitions/Datasets", + "description": "A global data store for named datasets. This is a mapping from names to inline datasets. 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." + }, + "description": { + "description": "Description of this mark for commenting purpose.", + "type": "string" + }, + "encoding": { + "$ref": "#/definitions/FacetedEncoding", + "description": "A key-value mapping between encoding channels and definition of fields." + }, + "height": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "container", + "type": "string" + }, + { + "$ref": "#/definitions/Step" + } + ], + "description": "The height of a visualization.\n\n- For a plot with a continuous y-field, height should be a number.\n- For a plot with either a discrete y-field or no y-field, height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step. (No y-field is equivalent to having one discrete step.)\n- To enable responsive sizing on height, it should be set to `\"container\"`.\n\n__Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous y-field and `config.view.discreteHeight` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view and the `\"container\"` option cannot be used.\n\n__See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation." + }, + "mark": { + "$ref": "#/definitions/AnyMark", + "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`, `\"area\"`, `\"point\"`, `\"rule\"`, `\"geoshape\"`, and `\"text\"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def)." + }, + "name": { + "description": "Name of the visualization for later reference.", + "type": "string" + }, + "padding": { + "anyOf": [ + { + "$ref": "#/definitions/Padding" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5, \"bottom\": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`" + }, + "params": { + "description": "An array of parameters that may either be simple variables, or more complex selections that map user input to data queries.", + "items": { + "$ref": "#/definitions/TopLevelParameter" + }, + "type": "array" + }, + "projection": { + "$ref": "#/definitions/Projection", + "description": "An object defining properties of geographic projection, which will be applied to `shape` path for `\"geoshape\"` marks and to `latitude` and `\"longitude\"` channels for other marks." + }, + "resolve": { + "$ref": "#/definitions/Resolve", + "description": "Scale, axis, and legend resolutions for view composition specifications." + }, + "spacing": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The spacing in pixels between sub-views of the composition operator. An object of the form `{\"row\": number, \"column\": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `\"spacing\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)" + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/TitleParams" + } + ], + "description": "Title for the plot." + }, + "transform": { + "description": "An array of data transformations such as filter and new field calculation.", + "items": { + "$ref": "#/definitions/Transform" + }, + "type": "array" + }, + "usermeta": { + "$ref": "#/definitions/Dict", + "description": "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata." + }, + "view": { + "$ref": "#/definitions/ViewBackground", + "description": "An object defining the view background's fill and stroke.\n\n__Default value:__ none (transparent)" + }, + "width": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "container", + "type": "string" + }, + { + "$ref": "#/definitions/Step" + } + ], + "description": "The width of a visualization.\n\n- For a plot with a continuous x-field, width should be a number.\n- For a plot with either a discrete x-field or no x-field, width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step. (No x-field is equivalent to having one discrete step.)\n- To enable responsive sizing on width, it should be set to `\"container\"`.\n\n__Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous x-field and `config.view.discreteWidth` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view and the `\"container\"` option cannot be used.\n\n__See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation." + } + }, + "required": [ + "data", + "mark" + ], + "type": "object" + }, + "TopoDataFormat": { + "additionalProperties": false, + "properties": { + "feature": { + "description": "The name of the TopoJSON object set to convert to a GeoJSON feature collection. For example, in a map of the world, there may be an object set named `\"countries\"`. Using the feature property, we can extract this set and generate a GeoJSON feature object for each country.", + "type": "string" + }, + "mesh": { + "description": "The name of the TopoJSON object set to convert to mesh. Similar to the `feature` option, `mesh` extracts a named TopoJSON object set. Unlike the `feature` option, the corresponding geo data is returned as a single, unified mesh instance, 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.", + "type": "string" + }, + "parse": { + "anyOf": [ + { + "$ref": "#/definitions/Parse" + }, + { + "type": "null" + } + ], + "description": "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.\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). For 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": { + "const": "topojson", + "description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\n\n__Default value:__ 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": "string" + } + }, + "type": "object" + }, + "Transform": { + "anyOf": [ + { + "$ref": "#/definitions/AggregateTransform" + }, + { + "$ref": "#/definitions/BinTransform" + }, + { + "$ref": "#/definitions/CalculateTransform" + }, + { + "$ref": "#/definitions/DensityTransform" + }, + { + "$ref": "#/definitions/ExtentTransform" + }, + { + "$ref": "#/definitions/FilterTransform" + }, + { + "$ref": "#/definitions/FlattenTransform" + }, + { + "$ref": "#/definitions/FoldTransform" + }, + { + "$ref": "#/definitions/ImputeTransform" + }, + { + "$ref": "#/definitions/JoinAggregateTransform" + }, + { + "$ref": "#/definitions/LoessTransform" + }, + { + "$ref": "#/definitions/LookupTransform" + }, + { + "$ref": "#/definitions/QuantileTransform" + }, + { + "$ref": "#/definitions/RegressionTransform" + }, + { + "$ref": "#/definitions/TimeUnitTransform" + }, + { + "$ref": "#/definitions/SampleTransform" + }, + { + "$ref": "#/definitions/StackTransform" + }, + { + "$ref": "#/definitions/WindowTransform" + }, + { + "$ref": "#/definitions/PivotTransform" + } + ] + }, + "Type": { + "description": "Data type based on level of measurement", + "enum": [ + "quantitative", + "ordinal", + "temporal", + "nominal", + "geojson" + ], + "type": "string" + }, + "TypeForShape": { + "enum": [ + "nominal", + "ordinal", + "geojson" + ], + "type": "string" + }, + "TypedFieldDef": { + "additionalProperties": false, + "description": "Definition object for a data field, its type and transformation of an encoding channel.", + "properties": { + "aggregate": { + "$ref": "#/definitions/Aggregate", + "description": "Aggregation function for the field (e.g., `\"mean\"`, `\"sum\"`, `\"median\"`, `\"min\"`, `\"max\"`, `\"count\"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation." + }, + "bandPosition": { + "description": "Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "bin": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/BinParams" + }, + { + "const": "binned", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." + }, + "field": { + "$ref": "#/definitions/Field", + "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." + }, + "timeUnit": { + "anyOf": [ + { + "$ref": "#/definitions/TimeUnit" + }, + { + "$ref": "#/definitions/BinnedTimeUnit" + }, + { + "$ref": "#/definitions/TimeUnitParams" + } + ], + "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "type": "null" + } + ], + "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`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) 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/usage/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": { + "$ref": "#/definitions/StandardType", + "description": "The type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`) for the encoded field or constant value (`datum`). It can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `\"nominal\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\n- `\"quantitative\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\"argmin\"` and `\"argmax\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\n- `\"temporal\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\n- `\"ordinal\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`):\n- `\"quantitative\"` if the datum is a number\n- `\"nominal\"` if the datum is a string\n- `\"temporal\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\n- Data values for a temporal field can be either a date-time string (e.g., `\"2015-03-07 12:32:17\"`, `\"17:01\"`, `\"2015-03-16\"`. `\"2015\"`) or a timestamp number (e.g., `1552199579097`).\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\"quantitative\"` (for using a linear bin scale) or [`\"ordinal\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\"temporal\"` (default, for using a temporal scale) or [`\"ordinal\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\"cat\"` using `{\"aggregate\": \"distinct\", \"field\": \"cat\"}`. The `\"type\"` of the aggregate output is `\"quantitative\"`.\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation." + } + }, + "type": "object" + }, + "URI": { + "format": "uri-reference", + "type": "string" + }, + "UnitSpec": { + "$ref": "#/definitions/GenericUnitSpec", + "description": "A unit specification, which can contain either [primitive marks or composite marks](https://vega.github.io/vega-lite/docs/mark.html#types)." + }, + "UnitSpecWithFrame": { + "additionalProperties": false, + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Data" + }, + { + "type": "null" + } + ], + "description": "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent." + }, + "description": { + "description": "Description of this mark for commenting purpose.", + "type": "string" + }, + "encoding": { + "$ref": "#/definitions/Encoding", + "description": "A key-value mapping between encoding channels and definition of fields." + }, + "height": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "container", + "type": "string" + }, + { + "$ref": "#/definitions/Step" + } + ], + "description": "The height of a visualization.\n\n- For a plot with a continuous y-field, height should be a number.\n- For a plot with either a discrete y-field or no y-field, height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step. (No y-field is equivalent to having one discrete step.)\n- To enable responsive sizing on height, it should be set to `\"container\"`.\n\n__Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous y-field and `config.view.discreteHeight` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view and the `\"container\"` option cannot be used.\n\n__See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation." + }, + "mark": { + "$ref": "#/definitions/AnyMark", + "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`, `\"area\"`, `\"point\"`, `\"rule\"`, `\"geoshape\"`, and `\"text\"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def)." + }, + "name": { + "description": "Name of the visualization for later reference.", + "type": "string" + }, + "params": { + "description": "An array of parameters that may either be simple variables, or more complex selections that map user input to data queries.", + "items": { + "$ref": "#/definitions/SelectionParameter" + }, + "type": "array" + }, + "projection": { + "$ref": "#/definitions/Projection", + "description": "An object defining properties of geographic projection, which will be applied to `shape` path for `\"geoshape\"` marks and to `latitude` and `\"longitude\"` channels for other marks." + }, + "title": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/TitleParams" + } + ], + "description": "Title for the plot." + }, + "transform": { + "description": "An array of data transformations such as filter and new field calculation.", + "items": { + "$ref": "#/definitions/Transform" + }, + "type": "array" + }, + "view": { + "$ref": "#/definitions/ViewBackground", + "description": "An object defining the view background's fill and stroke.\n\n__Default value:__ none (transparent)" + }, + "width": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "container", + "type": "string" + }, + { + "$ref": "#/definitions/Step" + } + ], + "description": "The width of a visualization.\n\n- For a plot with a continuous x-field, width should be a number.\n- For a plot with either a discrete x-field or no x-field, width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step. (No x-field is equivalent to having one discrete step.)\n- To enable responsive sizing on width, it should be set to `\"container\"`.\n\n__Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous x-field and `config.view.discreteWidth` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view and the `\"container\"` option cannot be used.\n\n__See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation." + } + }, + "required": [ + "mark" + ], + "type": "object" + }, + "UrlData": { + "additionalProperties": false, + "properties": { + "format": { + "$ref": "#/definitions/DataFormat", + "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 to ensure the loaded data is correctly parsed.", + "type": "string" + } + }, + "required": [ + "url" + ], + "type": "object" + }, + "UtcMultiTimeUnit": { + "enum": [ + "utcyearquarter", + "utcyearquartermonth", + "utcyearmonth", + "utcyearmonthdate", + "utcyearmonthdatehours", + "utcyearmonthdatehoursminutes", + "utcyearmonthdatehoursminutesseconds", + "utcyearweek", + "utcyearweekday", + "utcyearweekdayhours", + "utcyearweekdayhoursminutes", + "utcyearweekdayhoursminutesseconds", + "utcyeardayofyear", + "utcquartermonth", + "utcmonthdate", + "utcmonthdatehours", + "utcmonthdatehoursminutes", + "utcmonthdatehoursminutesseconds", + "utcweekday", + "utcweekdayhours", + "utcweekdayhoursminutes", + "utcweekdayhoursminutesseconds", + "utcdayhours", + "utcdayhoursminutes", + "utcdayhoursminutesseconds", + "utchoursminutes", + "utchoursminutesseconds", + "utcminutesseconds", + "utcsecondsmilliseconds" + ], + "type": "string" + }, + "UtcSingleTimeUnit": { + "enum": [ + "utcyear", + "utcquarter", + "utcmonth", + "utcweek", + "utcday", + "utcdayofyear", + "utcdate", + "utchours", + "utcminutes", + "utcseconds", + "utcmilliseconds" + ], + "type": "string" + }, + "ValueDef<(number|\"width\"|\"height\"|ExprRef)>": { + "additionalProperties": false, + "description": "Definition object for a constant value (primitive value or gradient definition) of an encoding channel.", + "properties": { + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "const": "width", + "type": "string" + }, + { + "const": "height", + "type": "string" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "required": [ + "value" + ], + "type": "object" + }, + "ValueDef": { + "additionalProperties": false, + "description": "Definition object for a constant value (primitive value or gradient definition) of an encoding channel.", + "properties": { + "value": { + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).", + "type": "number" + } + }, + "required": [ + "value" + ], + "type": "object" + }, + "ValueDefWithCondition": { + "additionalProperties": false, + "minProperties": 1, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef" + }, + { + "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>" + }, + "type": "array" + } + ], + "description": "A field definition or one or more value definition(s) with a parameter predicate." + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/Gradient" + }, + { + "type": "string" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "ValueDefWithCondition": { + "additionalProperties": false, + "minProperties": 1, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef" + }, + { + "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>" + }, + "type": "array" + } + ], + "description": "A field definition or one or more value definition(s) with a parameter predicate." + }, + "value": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "ValueDefWithCondition": { + "additionalProperties": false, + "minProperties": 1, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef" + }, + { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(number|ExprRef)>" + }, + "type": "array" + } + ], + "description": "A field definition or one or more value definition(s) with a parameter predicate." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "ValueDefWithCondition": { + "additionalProperties": false, + "minProperties": 1, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef" + }, + { + "$ref": "#/definitions/ConditionalValueDef<(number[]|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(number[]|ExprRef)>" + }, + "type": "array" + } + ], + "description": "A field definition or one or more value definition(s) with a parameter predicate." + }, + "value": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "ValueDefWithCondition,(string|null)>": { + "additionalProperties": false, + "minProperties": 1, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalMarkPropFieldOrDatumDef" + }, + { + "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(string|null|ExprRef)>" + }, + "type": "array" + } + ], + "description": "A field definition or one or more value definition(s) with a parameter predicate." + }, + "value": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "ValueDefWithCondition": { + "additionalProperties": false, + "minProperties": 1, + "properties": { + "condition": { + "anyOf": [ + { + "$ref": "#/definitions/ConditionalStringFieldDef" + }, + { + "$ref": "#/definitions/ConditionalValueDef<(Text|ExprRef)>" + }, + { + "items": { + "$ref": "#/definitions/ConditionalValueDef<(Text|ExprRef)>" + }, + "type": "array" + } + ], + "description": "A field definition or one or more value definition(s) with a parameter predicate." + }, + "value": { + "anyOf": [ + { + "$ref": "#/definitions/Text" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity)." + } + }, + "type": "object" + }, + "VariableParameter": { + "additionalProperties": false, + "properties": { + "bind": { + "$ref": "#/definitions/Binding", + "description": "Binds the parameter to an external input element such as a slider, selection list or radio button group." + }, + "expr": { + "$ref": "#/definitions/Expr", + "description": "An expression for the value of the parameter. This expression may include other parameters, in which case the parameter will automatically update in response to upstream parameter changes." + }, + "name": { + "$ref": "#/definitions/ParameterName", + "description": "A unique name for the variable parameter. Parameter names should be valid JavaScript identifiers: they should contain only alphanumeric characters (or \"$\", or \"_\") and may not start with a digit. Reserved keywords that may not be used as parameter names are \"datum\", \"event\", \"item\", and \"parent\"." + }, + "react": { + "description": "A boolean flag (default `true`) indicating if the update expression should be automatically re-evaluated when any upstream signal dependencies update. If `false`, the update expression will not register any dependencies on other signals, even for initialization.\n\n __Default value:__ `true`", + "type": "boolean" + }, + "value": { + "description": "The [initial value](http://vega.github.io/vega-lite/docs/value.html) of the parameter.\n\n__Default value:__ `undefined`" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "Vector10": { + "items": { + "type": "string" + }, + "maxItems": 10, + "minItems": 10, + "type": "array" + }, + "Vector12": { + "items": { + "type": "string" + }, + "maxItems": 12, + "minItems": 12, + "type": "array" + }, + "Vector2": { + "items": { + "$ref": "#/definitions/DateTime" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "Vector2>": { + "items": { + "$ref": "#/definitions/Vector2" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "Vector2": { + "items": { + "type": "boolean" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "Vector2": { + "items": { + "type": "number" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "Vector2": { + "items": { + "type": "string" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "Vector3": { + "items": { + "type": "number" + }, + "maxItems": 3, + "minItems": 3, + "type": "array" + }, + "Vector7": { + "items": { + "type": "string" + }, + "maxItems": 7, + "minItems": 7, + "type": "array" + }, + "ViewBackground": { + "additionalProperties": false, + "properties": { + "cornerRadius": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cursor": { + "$ref": "#/definitions/Cursor", + "description": "The mouse cursor used over the view. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used." + }, + "fill": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The fill color.\n\n__Default value:__ `undefined`" + }, + "fillOpacity": { + "anyOf": [ + { + "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "opacity": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.", + "maximum": 1, + "minimum": 0 + }, + "stroke": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The stroke color.\n\n__Default value:__ `\"#ddd\"`" + }, + "strokeCap": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeCap", + "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeDash": { + "anyOf": [ + { + "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeDashOffset": { + "anyOf": [ + { + "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeJoin": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeJoin", + "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeMiterLimit": { + "anyOf": [ + { + "description": "The miter limit at which to bevel a line join.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeOpacity": { + "anyOf": [ + { + "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeWidth": { + "anyOf": [ + { + "description": "The stroke width, in pixels.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "style": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ], + "description": "A string or array of strings indicating the name of custom styles to apply to the view background. 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.\n\n__Default value:__ `\"cell\"` __Note:__ Any specified view background properties will augment the default style." + } + }, + "type": "object" + }, + "ViewConfig": { + "additionalProperties": false, + "properties": { + "clip": { + "description": "Whether the view should be clipped.", + "type": "boolean" + }, + "continuousHeight": { + "description": "The default height when the plot has a continuous y-field for x or latitude, or has arc marks.\n\n__Default value:__ `200`", + "type": "number" + }, + "continuousWidth": { + "description": "The default width when the plot has a continuous field for x or longitude, or has arc marks.\n\n__Default value:__ `200`", + "type": "number" + }, + "cornerRadius": { + "anyOf": [ + { + "description": "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "cursor": { + "$ref": "#/definitions/Cursor", + "description": "The mouse cursor used over the view. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used." + }, + "discreteHeight": { + "anyOf": [ + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "step": { + "type": "number" + } + }, + "required": [ + "step" + ], + "type": "object" + } + ], + "description": "The default height when the plot has non arc marks and either a discrete y-field or no y-field. The height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step.\n\n__Default value:__ a step size based on `config.view.step`." + }, + "discreteWidth": { + "anyOf": [ + { + "type": "number" + }, + { + "additionalProperties": false, + "properties": { + "step": { + "type": "number" + } + }, + "required": [ + "step" + ], + "type": "object" + } + ], + "description": "The default width when the plot has non-arc marks and either a discrete x-field or no x-field. The width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step.\n\n__Default value:__ a step size based on `config.view.step`." + }, + "fill": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The fill color.\n\n__Default value:__ `undefined`" + }, + "fillOpacity": { + "anyOf": [ + { + "description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "opacity": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.", + "maximum": 1, + "minimum": 0 + }, + "step": { + "description": "Default step size for x-/y- discrete fields.", + "type": "number" + }, + "stroke": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "type": "null" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "The stroke color.\n\n__Default value:__ `\"#ddd\"`" + }, + "strokeCap": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeCap", + "description": "The stroke cap for line ending style. One of `\"butt\"`, `\"round\"`, or `\"square\"`.\n\n__Default value:__ `\"butt\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeDash": { + "anyOf": [ + { + "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.", + "items": { + "type": "number" + }, + "type": "array" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeDashOffset": { + "anyOf": [ + { + "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeJoin": { + "anyOf": [ + { + "$ref": "#/definitions/StrokeJoin", + "description": "The stroke line join method. One of `\"miter\"`, `\"round\"` or `\"bevel\"`.\n\n__Default value:__ `\"miter\"`" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeMiterLimit": { + "anyOf": [ + { + "description": "The miter limit at which to bevel a line join.", + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeOpacity": { + "anyOf": [ + { + "description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + }, + "strokeWidth": { + "anyOf": [ + { + "description": "The stroke width, in pixels.", + "minimum": 0, + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ] + } + }, + "type": "object" + }, + "WindowEventType": { + "anyOf": [ + { + "$ref": "#/definitions/EventType" + }, + { + "type": "string" + } + ] + }, + "WindowFieldDef": { + "additionalProperties": false, + "properties": { + "as": { + "$ref": "#/definitions/FieldName", + "description": "The output name for the window operation." + }, + "field": { + "$ref": "#/definitions/FieldName", + "description": "The data field for which to compute the aggregate or window function. This can be omitted for window functions that do not operate over a field such as `\"count\"`, `\"rank\"`, `\"dense_rank\"`." + }, + "op": { + "anyOf": [ + { + "$ref": "#/definitions/AggregateOp" + }, + { + "$ref": "#/definitions/WindowOnlyOp" + } + ], + "description": "The window or aggregation operation to apply within a window (e.g., `\"rank\"`, `\"lead\"`, `\"sum\"`, `\"average\"` or `\"count\"`). See the list of all supported operations [here](https://vega.github.io/vega-lite/docs/window.html#ops)." + }, + "param": { + "description": "Parameter values for the window functions. Parameter values can be omitted for operations that do not accept a parameter.\n\nSee the list of all supported operations and their parameters [here](https://vega.github.io/vega-lite/docs/transforms/window.html).", + "type": "number" + } + }, + "required": [ + "op", + "as" + ], + "type": "object" + }, + "WindowOnlyOp": { + "enum": [ + "row_number", + "rank", + "dense_rank", + "percent_rank", + "cume_dist", + "ntile", + "lag", + "lead", + "first_value", + "last_value", + "nth_value" + ], + "type": "string" + }, + "WindowTransform": { + "additionalProperties": false, + "properties": { + "frame": { + "description": "A frame specification as a two-element array indicating how the sliding window should proceed. The array entries should either be a number indicating the offset from the current data object, or null to indicate unbounded rows preceding or following the current data object. The default value is `[null, 0]`, indicating that the sliding window includes the current object and all preceding objects. The value `[-5, 5]` indicates that the window should include five objects preceding and five objects following the current object. Finally, `[null, null]` indicates that the window frame should always include all data objects. If you this frame and want to assign the same value to add objects, you can use the simpler [join aggregate transform](https://vega.github.io/vega-lite/docs/joinaggregate.html). The only operators affected are the aggregation operations and the `first_value`, `last_value`, and `nth_value` window operations. The other window operations are not affected by this.\n\n__Default value:__: `[null, 0]` (includes the current object and all preceding objects)", + "items": { + "type": [ + "null", + "number" + ] + }, + "type": "array" + }, + "groupby": { + "description": "The data fields for partitioning the data objects into separate windows. If unspecified, all data points will be in a single window.", + "items": { + "$ref": "#/definitions/FieldName" + }, + "type": "array" + }, + "ignorePeers": { + "description": "Indicates if the sliding window frame should ignore peer values (data that are considered identical by the sort criteria). The default is false, causing the window frame to expand to include all peer values. If set to true, the window frame 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.\n\n__Default value:__ `false`", + "type": "boolean" + }, + "sort": { + "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/SortField" + }, + "type": "array" + }, + "window": { + "description": "The definition of the fields in the window, and what calculations to use.", + "items": { + "$ref": "#/definitions/WindowFieldDef" + }, + "type": "array" + } + }, + "required": [ + "window" + ], + "type": "object" + } + } +} diff --git a/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/vega-themes.json b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/vega-themes.json new file mode 100644 index 0000000000000000000000000000000000000000..188a86f8b371c413d9eb3723b390e66d50592394 --- /dev/null +++ b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/schema/vega-themes.json @@ -0,0 +1,1187 @@ +{ + "carbong10": { + "config": { + "arc": { + "fill": "#6929c4" + }, + "area": { + "fill": "#6929c4" + }, + "axis": { + "grid": true, + "gridColor": "#e0e0e0", + "labelAngle": 0, + "labelColor": "#525252", + "labelFont": "IBM Plex Sans Condensed, system-ui, -apple-system, BlinkMacSystemFont, \".SFNSText-Regular\", sans-serif", + "labelFontSize": 12, + "labelFontWeight": 400, + "titleColor": "#161616", + "titleFontSize": 12, + "titleFontWeight": 600 + }, + "axisX": { + "titlePadding": 10 + }, + "axisY": { + "titlePadding": 2.5 + }, + "background": "#f4f4f4", + "circle": { + "fill": "#6929c4" + }, + "range": { + "category": [ + "#6929c4", + "#1192e8", + "#005d5d", + "#9f1853", + "#fa4d56", + "#570408", + "#198038", + "#002d9c", + "#ee538b", + "#b28600", + "#009d9a", + "#012749", + "#8a3800", + "#a56eff" + ], + "diverging": [ + "#750e13", + "#a2191f", + "#da1e28", + "#fa4d56", + "#ff8389", + "#ffb3b8", + "#ffd7d9", + "#fff1f1", + "#e5f6ff", + "#bae6ff", + "#82cfff", + "#33b1ff", + "#1192e8", + "#0072c3", + "#00539a", + "#003a6d" + ], + "heatmap": [ + "#f6f2ff", + "#e8daff", + "#d4bbff", + "#be95ff", + "#a56eff", + "#8a3ffc", + "#6929c4", + "#491d8b", + "#31135e", + "#1c0f30" + ] + }, + "rect": { + "fill": "#6929c4" + }, + "style": { + "guide-label": { + "fill": "#525252", + "font": "IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\".sfnstext-regular\",sans-serif", + "fontWeight": 400 + }, + "guide-title": { + "fill": "#525252", + "font": "IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\".sfnstext-regular\",sans-serif", + "fontWeight": 400 + } + }, + "title": { + "anchor": "start", + "color": "#161616", + "dy": -15, + "font": "IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\".sfnstext-regular\",sans-serif", + "fontSize": 16, + "fontWeight": 600 + }, + "view": { + "fill": "#ffffff", + "stroke": "#ffffff" + } + } + }, + "carbong100": { + "config": { + "arc": { + "fill": "#d4bbff" + }, + "area": { + "fill": "#d4bbff" + }, + "axis": { + "grid": true, + "gridColor": "#393939", + "labelAngle": 0, + "labelColor": "#c6c6c6", + "labelFont": "IBM Plex Sans Condensed, system-ui, -apple-system, BlinkMacSystemFont, \".SFNSText-Regular\", sans-serif", + "labelFontSize": 12, + "labelFontWeight": 400, + "titleColor": "#f4f4f4", + "titleFontSize": 12, + "titleFontWeight": 600 + }, + "axisX": { + "titlePadding": 10 + }, + "axisY": { + "titlePadding": 2.5 + }, + "background": "#161616", + "circle": { + "fill": "#d4bbff" + }, + "range": { + "category": [ + "#8a3ffc", + "#33b1ff", + "#007d79", + "#ff7eb6", + "#fa4d56", + "#fff1f1", + "#6fdc8c", + "#4589ff", + "#d12771", + "#d2a106", + "#08bdba", + "#bae6ff", + "#ba4e00", + "#d4bbff" + ], + "diverging": [ + "#750e13", + "#a2191f", + "#da1e28", + "#fa4d56", + "#ff8389", + "#ffb3b8", + "#ffd7d9", + "#fff1f1", + "#e5f6ff", + "#bae6ff", + "#82cfff", + "#33b1ff", + "#1192e8", + "#0072c3", + "#00539a", + "#003a6d" + ], + "heatmap": [ + "#f6f2ff", + "#e8daff", + "#d4bbff", + "#be95ff", + "#a56eff", + "#8a3ffc", + "#6929c4", + "#491d8b", + "#31135e", + "#1c0f30" + ] + }, + "rect": { + "fill": "#d4bbff" + }, + "style": { + "guide-label": { + "fill": "#c6c6c6", + "font": "IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\".sfnstext-regular\",sans-serif", + "fontWeight": 400 + }, + "guide-title": { + "fill": "#c6c6c6", + "font": "IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\".sfnstext-regular\",sans-serif", + "fontWeight": 400 + } + }, + "title": { + "anchor": "start", + "color": "#f4f4f4", + "dy": -15, + "font": "IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\".sfnstext-regular\",sans-serif", + "fontSize": 16, + "fontWeight": 600 + }, + "view": { + "fill": "#161616", + "stroke": "#161616" + } + } + }, + "carbong90": { + "config": { + "arc": { + "fill": "#d4bbff" + }, + "area": { + "fill": "#d4bbff" + }, + "axis": { + "grid": true, + "gridColor": "#525252", + "labelAngle": 0, + "labelColor": "#c6c6c6", + "labelFont": "IBM Plex Sans Condensed, system-ui, -apple-system, BlinkMacSystemFont, \".SFNSText-Regular\", sans-serif", + "labelFontSize": 12, + "labelFontWeight": 400, + "titleColor": "#f4f4f4", + "titleFontSize": 12, + "titleFontWeight": 600 + }, + "axisX": { + "titlePadding": 10 + }, + "axisY": { + "titlePadding": 2.5 + }, + "background": "#262626", + "circle": { + "fill": "#d4bbff" + }, + "range": { + "category": [ + "#8a3ffc", + "#33b1ff", + "#007d79", + "#ff7eb6", + "#fa4d56", + "#fff1f1", + "#6fdc8c", + "#4589ff", + "#d12771", + "#d2a106", + "#08bdba", + "#bae6ff", + "#ba4e00", + "#d4bbff" + ], + "diverging": [ + "#750e13", + "#a2191f", + "#da1e28", + "#fa4d56", + "#ff8389", + "#ffb3b8", + "#ffd7d9", + "#fff1f1", + "#e5f6ff", + "#bae6ff", + "#82cfff", + "#33b1ff", + "#1192e8", + "#0072c3", + "#00539a", + "#003a6d" + ], + "heatmap": [ + "#f6f2ff", + "#e8daff", + "#d4bbff", + "#be95ff", + "#a56eff", + "#8a3ffc", + "#6929c4", + "#491d8b", + "#31135e", + "#1c0f30" + ] + }, + "rect": { + "fill": "#d4bbff" + }, + "style": { + "guide-label": { + "fill": "#c6c6c6", + "font": "IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\".sfnstext-regular\",sans-serif", + "fontWeight": 400 + }, + "guide-title": { + "fill": "#c6c6c6", + "font": "IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\".sfnstext-regular\",sans-serif", + "fontWeight": 400 + } + }, + "title": { + "anchor": "start", + "color": "#f4f4f4", + "dy": -15, + "font": "IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\".sfnstext-regular\",sans-serif", + "fontSize": 16, + "fontWeight": 600 + }, + "view": { + "fill": "#161616", + "stroke": "#161616" + } + } + }, + "carbonwhite": { + "config": { + "arc": { + "fill": "#6929c4" + }, + "area": { + "fill": "#6929c4" + }, + "axis": { + "grid": true, + "gridColor": "#e0e0e0", + "labelAngle": 0, + "labelColor": "#525252", + "labelFont": "IBM Plex Sans Condensed, system-ui, -apple-system, BlinkMacSystemFont, \".SFNSText-Regular\", sans-serif", + "labelFontSize": 12, + "labelFontWeight": 400, + "titleColor": "#161616", + "titleFontSize": 12, + "titleFontWeight": 600 + }, + "axisX": { + "titlePadding": 10 + }, + "axisY": { + "titlePadding": 2.5 + }, + "background": "#ffffff", + "circle": { + "fill": "#6929c4" + }, + "range": { + "category": [ + "#6929c4", + "#1192e8", + "#005d5d", + "#9f1853", + "#fa4d56", + "#570408", + "#198038", + "#002d9c", + "#ee538b", + "#b28600", + "#009d9a", + "#012749", + "#8a3800", + "#a56eff" + ], + "diverging": [ + "#750e13", + "#a2191f", + "#da1e28", + "#fa4d56", + "#ff8389", + "#ffb3b8", + "#ffd7d9", + "#fff1f1", + "#e5f6ff", + "#bae6ff", + "#82cfff", + "#33b1ff", + "#1192e8", + "#0072c3", + "#00539a", + "#003a6d" + ], + "heatmap": [ + "#f6f2ff", + "#e8daff", + "#d4bbff", + "#be95ff", + "#a56eff", + "#8a3ffc", + "#6929c4", + "#491d8b", + "#31135e", + "#1c0f30" + ] + }, + "rect": { + "fill": "#6929c4" + }, + "style": { + "guide-label": { + "fill": "#525252", + "font": "IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\".sfnstext-regular\",sans-serif", + "fontWeight": 400 + }, + "guide-title": { + "fill": "#525252", + "font": "IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\".sfnstext-regular\",sans-serif", + "fontWeight": 400 + } + }, + "title": { + "anchor": "start", + "color": "#161616", + "dy": -15, + "font": "IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\".sfnstext-regular\",sans-serif", + "fontSize": 16, + "fontWeight": 600 + }, + "view": { + "fill": "#ffffff", + "stroke": "#ffffff" + } + } + }, + "dark": { + "config": { + "axis": { + "domainColor": "#fff", + "gridColor": "#888", + "tickColor": "#fff" + }, + "background": "#333", + "style": { + "guide-label": { + "fill": "#fff" + }, + "guide-title": { + "fill": "#fff" + } + }, + "title": { + "color": "#fff", + "subtitleColor": "#fff" + }, + "view": { + "stroke": "#888" + } + } + }, + "excel": { + "config": { + "arc": { + "fill": "#4572a7" + }, + "area": { + "fill": "#4572a7" + }, + "axis": { + "bandPosition": 0.5, + "grid": true, + "gridColor": "#000000", + "gridOpacity": 1, + "gridWidth": 0.5, + "labelPadding": 10, + "tickSize": 5, + "tickWidth": 0.5 + }, + "axisBand": { + "grid": false, + "tickExtra": true + }, + "background": "#fff", + "legend": { + "labelBaseline": "middle", + "labelFontSize": 11, + "symbolSize": 50, + "symbolType": "square" + }, + "line": { + "stroke": "#4572a7", + "strokeWidth": 2 + }, + "range": { + "category": [ + "#4572a7", + "#aa4643", + "#8aa453", + "#71598e", + "#4598ae", + "#d98445", + "#94aace", + "#d09393", + "#b9cc98", + "#a99cbc" + ] + }, + "rect": { + "fill": "#4572a7" + } + } + }, + "fivethirtyeight": { + "config": { + "arc": { + "fill": "#30a2da" + }, + "area": { + "fill": "#30a2da" + }, + "axis": { + "domainColor": "#cbcbcb", + "grid": true, + "gridColor": "#cbcbcb", + "gridWidth": 1, + "labelColor": "#999", + "labelFontSize": 10, + "labelPadding": 4, + "tickColor": "#cbcbcb", + "tickSize": 10, + "titleColor": "#333", + "titleFontSize": 14, + "titlePadding": 10 + }, + "axisBand": { + "grid": false + }, + "background": "#f0f0f0", + "bar": { + "binSpacing": 2, + "fill": "#30a2da", + "stroke": null + }, + "legend": { + "labelColor": "#333", + "labelFontSize": 11, + "padding": 1, + "symbolSize": 30, + "symbolType": "square", + "titleColor": "#333", + "titleFontSize": 14, + "titlePadding": 10 + }, + "line": { + "stroke": "#30a2da", + "strokeWidth": 2 + }, + "point": { + "filled": true, + "shape": "circle" + }, + "range": { + "category": [ + "#30a2da", + "#fc4f30", + "#e5ae38", + "#6d904f", + "#8b8b8b", + "#b96db8", + "#ff9e27", + "#56cc60", + "#52d2ca", + "#52689e", + "#545454", + "#9fe4f8" + ], + "diverging": [ + "#cc0020", + "#e77866", + "#f6e7e1", + "#d6e8ed", + "#91bfd9", + "#1d78b5" + ], + "heatmap": [ + "#d6e8ed", + "#cee0e5", + "#91bfd9", + "#549cc6", + "#1d78b5" + ] + }, + "rect": { + "fill": "#30a2da" + }, + "title": { + "anchor": "start", + "fontSize": 24, + "fontWeight": 600, + "offset": 20 + } + } + }, + "ggplot2": { + "config": { + "arc": { + "fill": "#000" + }, + "area": { + "fill": "#000" + }, + "axis": { + "domain": false, + "grid": true, + "gridColor": "#FFFFFF", + "gridOpacity": 1, + "labelColor": "#7F7F7F", + "labelPadding": 4, + "tickColor": "#7F7F7F", + "tickSize": 5.67, + "titleFontSize": 16, + "titleFontWeight": "normal" + }, + "legend": { + "labelBaseline": "middle", + "labelFontSize": 11, + "symbolSize": 40 + }, + "line": { + "stroke": "#000" + }, + "range": { + "category": [ + "#000000", + "#7F7F7F", + "#1A1A1A", + "#999999", + "#333333", + "#B0B0B0", + "#4D4D4D", + "#C9C9C9", + "#666666", + "#DCDCDC" + ] + }, + "rect": { + "fill": "#000" + } + } + }, + "googlecharts": { + "config": { + "arc": { + "fill": "#3366CC" + }, + "area": { + "fill": "#3366CC" + }, + "axis": { + "domain": false, + "grid": true, + "gridColor": "#ccc", + "tickColor": "#ccc" + }, + "background": "#fff", + "circle": { + "fill": "#3366CC" + }, + "padding": { + "bottom": 10, + "left": 10, + "right": 10, + "top": 10 + }, + "range": { + "category": [ + "#4285F4", + "#DB4437", + "#F4B400", + "#0F9D58", + "#AB47BC", + "#00ACC1", + "#FF7043", + "#9E9D24", + "#5C6BC0", + "#F06292", + "#00796B", + "#C2185B" + ], + "heatmap": [ + "#c6dafc", + "#5e97f6", + "#2a56c6" + ] + }, + "rect": { + "fill": "#3366CC" + }, + "style": { + "group-title": { + "font": "Arial, sans-serif", + "fontSize": 12 + }, + "guide-label": { + "font": "Arial, sans-serif", + "fontSize": 12 + }, + "guide-title": { + "font": "Arial, sans-serif", + "fontSize": 12 + } + }, + "title": { + "anchor": "start", + "dy": -3, + "font": "Arial, sans-serif", + "fontSize": 14, + "fontWeight": "bold" + } + } + }, + "latimes": { + "config": { + "arc": { + "fill": "#82c6df" + }, + "area": { + "fill": "#82c6df" + }, + "axis": { + "labelFont": "Benton Gothic, sans-serif", + "labelFontSize": 11.5, + "labelFontWeight": "normal", + "titleFont": "Benton Gothic Bold, sans-serif", + "titleFontSize": 13, + "titleFontWeight": "normal" + }, + "axisX": { + "labelAngle": 0, + "labelPadding": 4, + "tickSize": 3 + }, + "axisY": { + "labelBaseline": "middle", + "maxExtent": 45, + "minExtent": 45, + "tickSize": 2, + "titleAlign": "left", + "titleAngle": 0, + "titleX": -45, + "titleY": -11 + }, + "background": "#ffffff", + "legend": { + "labelFont": "Benton Gothic, sans-serif", + "labelFontSize": 11.5, + "symbolType": "square", + "titleFont": "Benton Gothic Bold, sans-serif", + "titleFontSize": 13, + "titleFontWeight": "normal" + }, + "line": { + "stroke": "#82c6df", + "strokeWidth": 2 + }, + "range": { + "category": [ + "#ec8431", + "#829eb1", + "#c89d29", + "#3580b1", + "#adc839", + "#ab7fb4" + ], + "diverging": [ + "#e68a4f", + "#f4bb6a", + "#f9e39c", + "#dadfe2", + "#a6b7c6", + "#849eae" + ], + "heatmap": [ + "#fbf2c7", + "#f9e39c", + "#f8d36e", + "#f4bb6a", + "#e68a4f", + "#d15a40", + "#ab4232" + ], + "ordinal": [ + "#fbf2c7", + "#f9e39c", + "#f8d36e", + "#f4bb6a", + "#e68a4f", + "#d15a40", + "#ab4232" + ], + "ramp": [ + "#fbf2c7", + "#f9e39c", + "#f8d36e", + "#f4bb6a", + "#e68a4f", + "#d15a40", + "#ab4232" + ] + }, + "rect": { + "fill": "#82c6df" + }, + "title": { + "anchor": "start", + "color": "#000000", + "font": "Benton Gothic Bold, sans-serif", + "fontSize": 22, + "fontWeight": "normal" + } + } + }, + "powerbi": { + "config": { + "arc": { + "fill": "#118DFF" + }, + "area": { + "fill": "#118DFF", + "line": true, + "opacity": 0.6 + }, + "axis": { + "domain": false, + "grid": false, + "labelColor": "#605E5C", + "labelFontSize": 12, + "ticks": false, + "titleColor": "#252423", + "titleFont": "wf_standard-font, helvetica, arial, sans-serif", + "titleFontSize": 16, + "titleFontWeight": "normal" + }, + "axisBand": { + "tickExtra": true + }, + "axisQuantitative": { + "grid": true, + "gridColor": "#C8C6C4", + "gridDash": [ + 1, + 5 + ], + "labelFlush": false, + "tickCount": 3 + }, + "axisX": { + "labelPadding": 5 + }, + "axisY": { + "labelPadding": 10 + }, + "background": "transparent", + "bar": { + "fill": "#118DFF" + }, + "font": "Segoe UI", + "header": { + "labelColor": "#605E5C", + "labelFont": "Segoe UI", + "labelFontSize": 13.333333333333332, + "titleColor": "#252423", + "titleFont": "wf_standard-font, helvetica, arial, sans-serif", + "titleFontSize": 16 + }, + "legend": { + "labelColor": "#605E5C", + "labelFont": "Segoe UI", + "labelFontSize": 13.333333333333332, + "symbolSize": 75, + "symbolType": "circle", + "titleColor": "#605E5C", + "titleFont": "Segoe UI", + "titleFontWeight": "bold" + }, + "line": { + "stroke": "#118DFF", + "strokeCap": "round", + "strokeJoin": "round", + "strokeWidth": 3 + }, + "point": { + "fill": "#118DFF", + "filled": true, + "size": 75 + }, + "range": { + "category": [ + "#118DFF", + "#12239E", + "#E66C37", + "#6B007B", + "#E044A7", + "#744EC2", + "#D9B300", + "#D64550" + ], + "diverging": [ + "#DEEFFF", + "#118DFF" + ], + "heatmap": [ + "#DEEFFF", + "#118DFF" + ], + "ordinal": [ + "#DEEFFF", + "#c7e4ff", + "#b0d9ff", + "#9aceff", + "#83c3ff", + "#6cb9ff", + "#55aeff", + "#3fa3ff", + "#2898ff", + "#118DFF" + ] + }, + "rect": { + "fill": "#118DFF" + }, + "text": { + "fill": "#605E5C", + "font": "Segoe UI", + "fontSize": 12 + }, + "view": { + "stroke": "transparent" + } + } + }, + "quartz": { + "config": { + "arc": { + "fill": "#ab5787" + }, + "area": { + "fill": "#ab5787" + }, + "axis": { + "domainColor": "#979797", + "domainWidth": 0.5, + "gridWidth": 0.2, + "labelColor": "#979797", + "tickColor": "#979797", + "tickWidth": 0.2, + "titleColor": "#979797" + }, + "axisBand": { + "grid": false + }, + "axisX": { + "grid": true, + "tickSize": 10 + }, + "axisY": { + "domain": false, + "grid": true, + "tickSize": 0 + }, + "background": "#f9f9f9", + "legend": { + "labelFontSize": 11, + "padding": 1, + "symbolSize": 30, + "symbolType": "square" + }, + "line": { + "stroke": "#ab5787" + }, + "range": { + "category": [ + "#ab5787", + "#51b2e5", + "#703c5c", + "#168dd9", + "#d190b6", + "#00609f", + "#d365ba", + "#154866", + "#666666", + "#c4c4c4" + ] + }, + "rect": { + "fill": "#ab5787" + } + } + }, + "urbaninstitute": { + "config": { + "arc": { + "fill": "#1696d2" + }, + "area": { + "fill": "#1696d2" + }, + "axisX": { + "domain": true, + "domainColor": "#000000", + "domainWidth": 1, + "grid": false, + "labelAngle": 0, + "labelFont": "Lato", + "labelFontSize": 12, + "tickColor": "#000000", + "tickSize": 5, + "titleFont": "Lato", + "titleFontSize": 12, + "titlePadding": 10 + }, + "axisY": { + "domain": false, + "domainWidth": 1, + "grid": true, + "gridColor": "#DEDDDD", + "gridWidth": 1, + "labelFont": "Lato", + "labelFontSize": 12, + "labelPadding": 8, + "ticks": false, + "titleAngle": 0, + "titleFont": "Lato", + "titleFontSize": 12, + "titlePadding": 10, + "titleX": 18, + "titleY": -10 + }, + "background": "#FFFFFF", + "legend": { + "labelFont": "Lato", + "labelFontSize": 12, + "offset": 10, + "orient": "right", + "symbolSize": 100, + "titleFont": "Lato", + "titleFontSize": 12, + "titlePadding": 10 + }, + "line": { + "color": "#1696d2", + "stroke": "#1696d2", + "strokeWidth": 5 + }, + "point": { + "filled": true + }, + "range": { + "category": [ + "#1696d2", + "#ec008b", + "#fdbf11", + "#000000", + "#d2d2d2", + "#55b748" + ], + "diverging": [ + "#ca5800", + "#fdbf11", + "#fdd870", + "#fff2cf", + "#cfe8f3", + "#73bfe2", + "#1696d2", + "#0a4c6a" + ], + "heatmap": [ + "#ca5800", + "#fdbf11", + "#fdd870", + "#fff2cf", + "#cfe8f3", + "#73bfe2", + "#1696d2", + "#0a4c6a" + ], + "ordinal": [ + "#cfe8f3", + "#a2d4ec", + "#73bfe2", + "#46abdb", + "#1696d2", + "#12719e" + ], + "ramp": [ + "#CFE8F3", + "#A2D4EC", + "#73BFE2", + "#46ABDB", + "#1696D2", + "#12719E", + "#0A4C6A", + "#062635" + ] + }, + "rect": { + "fill": "#1696d2" + }, + "style": { + "bar": { + "fill": "#1696d2", + "stroke": null + } + }, + "text": { + "align": "center", + "color": "#1696d2", + "font": "Lato", + "fontSize": 11, + "fontWeight": 400, + "size": 11 + }, + "title": { + "anchor": "start", + "font": "Lato", + "fontSize": 18 + }, + "trail": { + "color": "#1696d2", + "size": 1, + "stroke": "#1696d2", + "strokeWidth": 0 + }, + "view": { + "stroke": "transparent" + } + } + }, + "vox": { + "config": { + "arc": { + "fill": "#3e5c69" + }, + "area": { + "fill": "#3e5c69" + }, + "axis": { + "domainWidth": 0.5, + "grid": true, + "labelPadding": 2, + "tickSize": 5, + "tickWidth": 0.5, + "titleFontWeight": "normal" + }, + "axisBand": { + "grid": false + }, + "axisX": { + "gridWidth": 0.2 + }, + "axisY": { + "gridDash": [ + 3 + ], + "gridWidth": 0.4 + }, + "background": "#fff", + "legend": { + "labelFontSize": 11, + "padding": 1, + "symbolType": "square" + }, + "line": { + "stroke": "#3e5c69" + }, + "range": { + "category": [ + "#3e5c69", + "#6793a6", + "#182429", + "#0570b0", + "#3690c0", + "#74a9cf", + "#a6bddb", + "#e2ddf2" + ] + }, + "rect": { + "fill": "#3e5c69" + } + } + } +} \ No newline at end of file diff --git a/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/theme.py b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/theme.py new file mode 100644 index 0000000000000000000000000000000000000000..77f48082932028378a01a1a13f0fb2aba62d467c --- /dev/null +++ b/mplug_owl2/lib/python3.10/site-packages/altair/vegalite/v5/theme.py @@ -0,0 +1,125 @@ +"""Tools for enabling and registering chart themes.""" + +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Final, Literal, get_args + +from altair.utils.deprecation import deprecated_static_only +from altair.utils.plugin_registry import Plugin, PluginRegistry +from altair.vegalite.v5.schema._config import ThemeConfig +from altair.vegalite.v5.schema._typing import VegaThemes + +if TYPE_CHECKING: + import sys + from functools import partial + + if sys.version_info >= (3, 11): + from typing import LiteralString + else: + from typing_extensions import LiteralString + if sys.version_info >= (3, 10): + from typing import TypeAlias + else: + from typing_extensions import TypeAlias + + from altair.utils.plugin_registry import PluginEnabler + + +AltairThemes: TypeAlias = Literal["default", "opaque"] +VEGA_THEMES: list[LiteralString] = list(get_args(VegaThemes)) + + +# HACK: See for `LiteralString` requirement in `name` +# https://github.com/vega/altair/pull/3526#discussion_r1743350127 +class ThemeRegistry(PluginRegistry[Plugin[ThemeConfig], ThemeConfig]): + def enable( + self, + name: LiteralString | AltairThemes | VegaThemes | None = None, + **options: Any, + ) -> PluginEnabler[Plugin[ThemeConfig], ThemeConfig]: + """ + Enable a theme by name. + + This can be either called directly, or used as a context manager. + + Parameters + ---------- + name : string (optional) + The name of the theme to enable. If not specified, then use the + current active name. + **options : + Any additional parameters will be passed to the theme as keyword + arguments + + Returns + ------- + PluginEnabler: + An object that allows enable() to be used as a context manager + + Notes + ----- + Default `vega` themes can be previewed at https://vega.github.io/vega-themes/ + """ + return super().enable(name, **options) + + def get(self) -> partial[ThemeConfig] | Plugin[ThemeConfig] | None: + """Return the currently active theme.""" + return super().get() + + def names(self) -> list[str]: + """Return the names of the registered and entry points themes.""" + return super().names() + + @deprecated_static_only( + "Deprecated since `altair=5.5.0`. Use @altair.theme.register instead.", + category=None, + ) + def register( + self, name: str, value: Plugin[ThemeConfig] | None + ) -> Plugin[ThemeConfig] | None: + return super().register(name, value) + + +class VegaTheme: + """Implementation of a builtin vega theme.""" + + def __init__(self, theme: str) -> None: + self.theme = theme + + def __call__(self) -> ThemeConfig: + return { + "usermeta": {"embedOptions": {"theme": self.theme}}, + "config": {"view": {"continuousWidth": 300, "continuousHeight": 300}}, + } + + def __repr__(self) -> str: + return f"VegaTheme({self.theme!r})" + + +# The entry point group that can be used by other packages to declare other +# themes that will be auto-detected. Explicit registration is also +# allowed by the PluginRegistry API. +ENTRY_POINT_GROUP: Final = "altair.vegalite.v5.theme" + +# NOTE: `themes` def has an entry point group +themes = ThemeRegistry(entry_point_group=ENTRY_POINT_GROUP) + +themes.register( + "default", + lambda: {"config": {"view": {"continuousWidth": 300, "continuousHeight": 300}}}, +) +themes.register( + "opaque", + lambda: { + "config": { + "background": "white", + "view": {"continuousWidth": 300, "continuousHeight": 300}, + } + }, +) +themes.register("none", ThemeConfig) + +for theme in VEGA_THEMES: + themes.register(theme, VegaTheme(theme)) + +themes.enable("default") diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeASMInformation.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeASMInformation.cmake new file mode 100644 index 0000000000000000000000000000000000000000..703003440451ce000857489c7cb48096944e6173 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeASMInformation.cmake @@ -0,0 +1,101 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + + +if(UNIX) + set(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .o) +else() + set(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .obj) +endif() + +set(CMAKE_INCLUDE_FLAG_ASM${ASM_DIALECT} "-I") # -I +set(CMAKE_BASE_NAME) +get_filename_component(CMAKE_BASE_NAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME_WE) + +if("${CMAKE_BASE_NAME}" STREQUAL "as") + set(CMAKE_BASE_NAME gas) +endif() + +# Load compiler-specific information. +set(_INCLUDED_FILE "") +if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) + include(Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) +endif() +if(NOT _INCLUDED_FILE) + if("ASM${ASM_DIALECT}" STREQUAL "ASM") + message(STATUS "Warning: Did not find file Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT}") + endif() + include(Platform/${CMAKE_BASE_NAME} OPTIONAL) +endif() + +if(CMAKE_SYSTEM_PROCESSOR) + include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) + if(NOT _INCLUDED_FILE) + include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL) + endif() +endif() + +include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) +if(NOT _INCLUDED_FILE) + include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) +endif() + +# This should be included before the _INIT variables are +# used to initialize the cache. Since the rule variables +# have if blocks on them, users can still define them here. +# But, it should still be after the platform file so changes can +# be made to those values. + +if(CMAKE_USER_MAKE_RULES_OVERRIDE) + # Save the full path of the file so try_compile can use it. + include(${CMAKE_USER_MAKE_RULES_OVERRIDE} RESULT_VARIABLE _override) + set(CMAKE_USER_MAKE_RULES_OVERRIDE "${_override}") +endif() + +if(CMAKE_USER_MAKE_RULES_OVERRIDE_ASM) + # Save the full path of the file so try_compile can use it. + include(${CMAKE_USER_MAKE_RULES_OVERRIDE_ASM} RESULT_VARIABLE _override) + set(CMAKE_USER_MAKE_RULES_OVERRIDE_ASM "${_override}") +endif() + +# Set default assembler file extensions: +if(NOT CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS) + set(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;S;asm) +endif() + + +# Support for CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT and friends: +set(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT "$ENV{ASM${ASM_DIALECT}FLAGS} ${CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT}") + +cmake_initialize_per_config_variable(CMAKE_ASM${ASM_DIALECT}_FLAGS "Flags used by the ASM${ASM_DIALECT} compiler") + +if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT) + set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT " -o -c ") +endif() + +if(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY) + set(CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY + " cr " + " ") +endif() + +if(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE) + set(CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE + " -o ") +endif() + +if(NOT CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG) + set(CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_ASM${ASM_DIALECT}_FLAG}) +endif() + +if(NOT CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG_SEP) + set(CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_ASM${ASM_DIALECT}_FLAG_SEP}) +endif() + +if(NOT CMAKE_EXECUTABLE_RPATH_LINK_ASM${ASM_DIALECT}_FLAG) + set(CMAKE_EXECUTABLE_RPATH_LINK_ASM${ASM_DIALECT}_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_ASM${ASM_DIALECT}_FLAG}) +endif() + +set(CMAKE_ASM${ASM_DIALECT}_USE_LINKER_INFORMATION TRUE) + +set(CMAKE_ASM${ASM_DIALECT}_INFOMATION_LOADED 1) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeCSharpCompilerId.cs.in b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeCSharpCompilerId.cs.in new file mode 100644 index 0000000000000000000000000000000000000000..b43ec043ec5ad08d36332c97d18ae767b196ffec --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeCSharpCompilerId.cs.in @@ -0,0 +1,71 @@ +using System; + +namespace CSharp +{ + public class CSharpApp + { + const string InfoCompiler = "INFO:compiler[Microsoft " +#if PlatformToolsetv100 + + "Visual Studio" +#elif PlatformToolsetv110 + + "Visual Studio" +#elif PlatformToolsetv120 + + "Visual Studio" +#elif PlatformToolsetv140 + + "Visual Studio" +#elif PlatformToolsetv141 + + "Visual Studio" +#elif PlatformToolsetv142 + + "Visual Studio" +#elif PlatformToolsetv143 + + "Visual Studio" +#else + + "unknown" +#endif + + "]"; + + const string InfoPlatform = "INFO:platform[Windows]"; + + const string InfoArchitecture = "INFO:arch[" +#if Platformx64 + + "x64" +#elif Platformx86 + + "x86" +#elif PlatformxWin32 + + "Win32]" +#else + + "unknown" +#endif + + "]"; + + const string InfoCompilerVersion = "INFO:compiler_version[" +#if PlatformToolsetv100 + + "2010" +#elif PlatformToolsetv110 + + "2012" +#elif PlatformToolsetv120 + + "2013" +#elif PlatformToolsetv140 + + "2015" +#elif PlatformToolsetv141 + + "2017" +#elif PlatformToolsetv142 + + "2019" +#elif PlatformToolsetv143 + + "2022" +#else + + "9999" +#endif + + "]"; + + static void Main(string[] args) + { + // we have to print the lines to make sure + // the compiler does not optimize them away ... + System.Console.WriteLine(InfoCompiler); + System.Console.WriteLine(InfoPlatform); + System.Console.WriteLine(InfoArchitecture); + System.Console.WriteLine(InfoCompilerVersion); + } + } +} diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeCSharpInformation.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeCSharpInformation.cmake new file mode 100644 index 0000000000000000000000000000000000000000..f698bdfba5d413cb7632a7ab261e2bdc5362de3e --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeCSharpInformation.cmake @@ -0,0 +1,70 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +# This file sets the basic flags for the C# language in CMake. +# It also loads the available platform file for the system-compiler +# if it exists. + +set(CMAKE_BASE_NAME) +get_filename_component(CMAKE_BASE_NAME "${CMAKE_CSharp_COMPILER}" NAME_WE) + +set(CMAKE_BUILD_TYPE_INIT Debug) + +set(CMAKE_CSharp_FLAGS_INIT "/define:TRACE") +set(CMAKE_CSharp_FLAGS_DEBUG_INIT "/debug:full /optimize- /warn:3 /errorreport:prompt /define:DEBUG") +set(CMAKE_CSharp_FLAGS_RELEASE_INIT "/debug:none /optimize /warn:1 /errorreport:queue") +set(CMAKE_CSharp_FLAGS_RELWITHDEBINFO_INIT "/debug:full /optimize-") +set(CMAKE_CSharp_FLAGS_MINSIZEREL_INIT "/debug:none /optimize") +set(CMAKE_CSharp_LINKER_SUPPORTS_PDB ON) + +set(CMAKE_CSharp_STANDARD_LIBRARIES_INIT "System") + +if(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(CMAKE_CSharp_FLAGS_INIT "/platform:x86 ${CMAKE_CSharp_FLAGS_INIT}") +else() + set(CMAKE_CSharp_FLAGS_INIT "/platform:x64 ${CMAKE_CSharp_FLAGS_INIT}") +endif() + +# This should be included before the _INIT variables are +# used to initialize the cache. Since the rule variables +# have if blocks on them, users can still define them here. +# But, it should still be after the platform file so changes can +# be made to those values. + +# for most systems a module is the same as a shared library +# so unless the variable CMAKE_MODULE_EXISTS is set just +# copy the values from the LIBRARY variables +if(NOT CMAKE_MODULE_EXISTS) + set(CMAKE_SHARED_MODULE_CSharp_FLAGS ${CMAKE_SHARED_LIBRARY_CSharp_FLAGS}) + set(CMAKE_SHARED_MODULE_CREATE_CSharp_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_CSharp_FLAGS}) +endif() + +# add the flags to the cache based +# on the initial values computed in the platform/*.cmake files +# use _INIT variables so that this only happens the first time +# and you can set these flags in the cmake cache +set(CMAKE_CSharp_FLAGS_INIT "$ENV{CSFLAGS} ${CMAKE_CSharp_FLAGS_INIT}") + +cmake_initialize_per_config_variable(CMAKE_CSharp_FLAGS "Flags used by the C# compiler") + +if(CMAKE_CSharp_STANDARD_LIBRARIES_INIT) + set(CMAKE_CSharp_STANDARD_LIBRARIES "${CMAKE_CSharp_STANDARD_LIBRARIES_INIT}" + CACHE STRING "Libraries linked by default with all C# applications.") + mark_as_advanced(CMAKE_CSharp_STANDARD_LIBRARIES) +endif() + +# set missing flags (if they are not defined). This is needed in the +# unlikely case that you have only C# and no C/C++ targets in your +# project. +cmake_initialize_per_config_variable(CMAKE_EXE_LINKER_FLAGS "Flags used by the linker") +cmake_initialize_per_config_variable(CMAKE_SHARED_LINKER_FLAGS "Flags used by the linker during the creation of shared libraries") + +set(CMAKE_CSharp_CREATE_SHARED_LIBRARY "CSharp_NO_CREATE_SHARED_LIBRARY") +set(CMAKE_CSharp_CREATE_SHARED_MODULE "CSharp_NO_CREATE_SHARED_MODULE") +set(CMAKE_CSharp_LINK_EXECUTABLE "CSharp_NO_LINK_EXECUTABLE") + +set(CMAKE_CSharp_USE_RESPONSE_FILE_FOR_OBJECTS 1) + +set(CMAKE_CSharp_USE_LINKER_INFORMATION FALSE) + +set(CMAKE_CSharp_INFORMATION_LOADED 1) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeCUDACompiler.cmake.in b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeCUDACompiler.cmake.in new file mode 100644 index 0000000000000000000000000000000000000000..c6a176ba535addab76dd4971ea61a20a0baa3bea --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeCUDACompiler.cmake.in @@ -0,0 +1,87 @@ +set(CMAKE_CUDA_COMPILER "@CMAKE_CUDA_COMPILER@") +set(CMAKE_CUDA_HOST_COMPILER "@CMAKE_CUDA_HOST_COMPILER@") +set(CMAKE_CUDA_HOST_LINK_LAUNCHER "@CMAKE_CUDA_HOST_LINK_LAUNCHER@") +set(CMAKE_CUDA_COMPILER_ID "@CMAKE_CUDA_COMPILER_ID@") +set(CMAKE_CUDA_COMPILER_VERSION "@CMAKE_CUDA_COMPILER_VERSION@") +set(CMAKE_CUDA_HOST_COMPILER_ID "@CMAKE_CUDA_HOST_COMPILER_ID@") +set(CMAKE_CUDA_HOST_COMPILER_VERSION "@CMAKE_CUDA_HOST_COMPILER_VERSION@") +set(CMAKE_CUDA_DEVICE_LINKER "@CMAKE_CUDA_DEVICE_LINKER@") +set(CMAKE_CUDA_FATBINARY "@CMAKE_CUDA_FATBINARY@") +set(CMAKE_CUDA_STANDARD_COMPUTED_DEFAULT "@CMAKE_CUDA_STANDARD_COMPUTED_DEFAULT@") +set(CMAKE_CUDA_EXTENSIONS_COMPUTED_DEFAULT "@CMAKE_CUDA_EXTENSIONS_COMPUTED_DEFAULT@") +set(CMAKE_CUDA_STANDARD_LATEST "@CMAKE_CUDA_STANDARD_LATEST@") +set(CMAKE_CUDA_COMPILE_FEATURES "@CMAKE_CUDA_COMPILE_FEATURES@") +set(CMAKE_CUDA03_COMPILE_FEATURES "@CMAKE_CUDA03_COMPILE_FEATURES@") +set(CMAKE_CUDA11_COMPILE_FEATURES "@CMAKE_CUDA11_COMPILE_FEATURES@") +set(CMAKE_CUDA14_COMPILE_FEATURES "@CMAKE_CUDA14_COMPILE_FEATURES@") +set(CMAKE_CUDA17_COMPILE_FEATURES "@CMAKE_CUDA17_COMPILE_FEATURES@") +set(CMAKE_CUDA20_COMPILE_FEATURES "@CMAKE_CUDA20_COMPILE_FEATURES@") +set(CMAKE_CUDA23_COMPILE_FEATURES "@CMAKE_CUDA23_COMPILE_FEATURES@") +set(CMAKE_CUDA26_COMPILE_FEATURES "@CMAKE_CUDA26_COMPILE_FEATURES@") + +set(CMAKE_CUDA_PLATFORM_ID "@CMAKE_CUDA_PLATFORM_ID@") +set(CMAKE_CUDA_SIMULATE_ID "@CMAKE_CUDA_SIMULATE_ID@") +set(CMAKE_CUDA_COMPILER_FRONTEND_VARIANT "@CMAKE_CUDA_COMPILER_FRONTEND_VARIANT@") +set(CMAKE_CUDA_SIMULATE_VERSION "@CMAKE_CUDA_SIMULATE_VERSION@") +@SET_MSVC_CUDA_ARCHITECTURE_ID@ +@_SET_CMAKE_CUDA_COMPILER_SYSROOT@ + +set(CMAKE_CUDA_COMPILER_ENV_VAR "CUDACXX") +set(CMAKE_CUDA_HOST_COMPILER_ENV_VAR "CUDAHOSTCXX") + +set(CMAKE_CUDA_COMPILER_LOADED 1) +set(CMAKE_CUDA_COMPILER_ID_RUN 1) +set(CMAKE_CUDA_SOURCE_FILE_EXTENSIONS cu) +set(CMAKE_CUDA_LINKER_PREFERENCE 15) +set(CMAKE_CUDA_LINKER_PREFERENCE_PROPAGATES 1) +set(CMAKE_CUDA_LINKER_DEPFILE_SUPPORTED @CMAKE_CUDA_LINKER_DEPFILE_SUPPORTED@) + +set(CMAKE_CUDA_SIZEOF_DATA_PTR "@CMAKE_CUDA_SIZEOF_DATA_PTR@") +set(CMAKE_CUDA_COMPILER_ABI "@CMAKE_CUDA_COMPILER_ABI@") +set(CMAKE_CUDA_BYTE_ORDER "@CMAKE_CUDA_BYTE_ORDER@") +set(CMAKE_CUDA_LIBRARY_ARCHITECTURE "@CMAKE_CUDA_LIBRARY_ARCHITECTURE@") + +if(CMAKE_CUDA_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_CUDA_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_CUDA_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CUDA_COMPILER_ABI}") +endif() + +if(CMAKE_CUDA_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "@CMAKE_CUDA_LIBRARY_ARCHITECTURE@") +endif() + +set(CMAKE_CUDA_COMPILER_TOOLKIT_ROOT "@CMAKE_CUDA_COMPILER_TOOLKIT_ROOT@") +set(CMAKE_CUDA_COMPILER_TOOLKIT_LIBRARY_ROOT "@CMAKE_CUDA_COMPILER_TOOLKIT_LIBRARY_ROOT@") +set(CMAKE_CUDA_COMPILER_TOOLKIT_VERSION "@CMAKE_CUDA_COMPILER_TOOLKIT_VERSION@") +set(CMAKE_CUDA_COMPILER_LIBRARY_ROOT "@CMAKE_CUDA_COMPILER_LIBRARY_ROOT@") + +set(CMAKE_CUDA_ARCHITECTURES_ALL "@CMAKE_CUDA_ARCHITECTURES_ALL@") +set(CMAKE_CUDA_ARCHITECTURES_ALL_MAJOR "@CMAKE_CUDA_ARCHITECTURES_ALL_MAJOR@") +set(CMAKE_CUDA_ARCHITECTURES_NATIVE "@CMAKE_CUDA_ARCHITECTURES_NATIVE@") + +set(CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES "@CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES@") + +set(CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES "@CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES@") +set(CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES "@CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES@") +set(CMAKE_CUDA_HOST_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "@CMAKE_CUDA_HOST_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES@") + +set(CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES "@CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES@") +set(CMAKE_CUDA_IMPLICIT_LINK_LIBRARIES "@CMAKE_CUDA_IMPLICIT_LINK_LIBRARIES@") +set(CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES "@CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES@") +set(CMAKE_CUDA_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "@CMAKE_CUDA_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES@") + +@_SET_CMAKE_CUDA_RUNTIME_LIBRARY_DEFAULT@ + +set(CMAKE_LINKER "@CMAKE_LINKER@") +set(CMAKE_LINKER_LINK "@CMAKE_LINKER_LINK@") +set(CMAKE_LINKER_LLD "@CMAKE_LINKER_LLD@") +set(CMAKE_CUDA_COMPILER_LINKER "@CMAKE_CUDA_COMPILER_LINKER@") +set(CMAKE_CUDA_COMPILER_LINKER_ID "@CMAKE_CUDA_COMPILER_LINKER_ID@") +set(CMAKE_CUDA_COMPILER_LINKER_VERSION @CMAKE_CUDA_COMPILER_LINKER_VERSION@) +set(CMAKE_CUDA_COMPILER_LINKER_FRONTEND_VARIANT @CMAKE_CUDA_COMPILER_LINKER_FRONTEND_VARIANT@) +set(CMAKE_AR "@CMAKE_AR@") +set(CMAKE_RANLIB "@CMAKE_RANLIB@") +set(CMAKE_MT "@CMAKE_MT@") diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeCUDACompilerABI.cu b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeCUDACompilerABI.cu new file mode 100644 index 0000000000000000000000000000000000000000..b04d0ec20f4a71d2ddc26228036d4fdd8aa755c1 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeCUDACompilerABI.cu @@ -0,0 +1,26 @@ +#ifndef __CUDACC__ +# error "A C or C++ compiler has been selected for CUDA" +#endif + +#include "CMakeCompilerABI.h" +#include "CMakeCompilerCUDAArch.h" + +int main(int argc, char* argv[]) +{ + int require = 0; + require += info_sizeof_dptr[argc]; + require += info_byte_order_big_endian[argc]; + require += info_byte_order_little_endian[argc]; +#if defined(ABI_ID) + require += info_abi[argc]; +#endif + static_cast(argv); + + if (!cmakeCompilerCUDAArch()) { + // Convince the compiler that the non-zero return value depends + // on the info strings so they are not optimized out. + return require ? -1 : 1; + } + + return 0; +} diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeCompilerIdDetection.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeCompilerIdDetection.cmake new file mode 100644 index 0000000000000000000000000000000000000000..2817d37776fec0abf80f572a712003fa684b8529 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeCompilerIdDetection.cmake @@ -0,0 +1,162 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + + +function(_readFile file) + include(${file}) + get_filename_component(name ${file} NAME_WE) + string(REGEX REPLACE "-.*" "" CompilerId ${name}) + set(_compiler_id_version_compute_${CompilerId} ${_compiler_id_version_compute} PARENT_SCOPE) + set(_compiler_id_simulate_${CompilerId} ${_compiler_id_simulate} PARENT_SCOPE) + set(_compiler_id_pp_test_${CompilerId} ${_compiler_id_pp_test} PARENT_SCOPE) +endfunction() + +function(compiler_id_detection outvar lang) + + if (NOT "x${lang}" STREQUAL "xFortran" AND NOT "x${lang}" STREQUAL "xCSharp" + AND NOT "x${lang}" STREQUAL "xISPC") + file(GLOB lang_files + "${CMAKE_ROOT}/Modules/Compiler/*-DetermineCompiler.cmake") + set(nonlang CXX) + if ("x${lang}" STREQUAL "xCXX") + set(nonlang C) + endif() + + file(GLOB nonlang_files + "${CMAKE_ROOT}/Modules/Compiler/*-${nonlang}-DetermineCompiler.cmake") + list(REMOVE_ITEM lang_files ${nonlang_files}) + endif() + + set(files ${lang_files}) + if (files) + foreach(file ${files}) + _readFile(${file}) + endforeach() + + set(options ID_STRING VERSION_STRINGS ID_DEFINE PLATFORM_DEFAULT_COMPILER) + set(oneValueArgs PREFIX) + cmake_parse_arguments(CID "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + if (CID_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Unrecognized arguments: \"${CID_UNPARSED_ARGUMENTS}\"") + endif() + + # Order is relevant here. For example, compilers which pretend to be + # GCC must appear before the actual GCC. + list(APPEND ordered_compilers + Intel + IntelLLVM + PathScale + Embarcadero + Borland + Watcom + OpenWatcom + SunPro + HP + Compaq + zOS + IBMClang + XLClang + XL + VisualAge + NVHPC + PGI + CrayClang + Cray + TI + FujitsuClang + Fujitsu + GHS + Tasking + OrangeC + ) + if ("x${lang}" STREQUAL "xC") + list(APPEND ordered_compilers + TinyCC + Bruce + ) + endif() + list(APPEND ordered_compilers + SCO + ARMCC + AppleClang + ARMClang + TIClang + ) + list(APPEND ordered_compilers + Clang + LCC + GNU + MSVC + ADSP + IAR + ) + if ("x${lang}" STREQUAL "xC") + list(APPEND ordered_compilers + SDCC + ) + endif() + + if("x${lang}" STREQUAL "xCUDA") + set(ordered_compilers NVIDIA Clang) + endif() + + if("x${lang}" STREQUAL "xHIP") + set(ordered_compilers NVIDIA Clang) + endif() + + if(CID_ID_DEFINE) + foreach(Id ${ordered_compilers}) + string(APPEND CMAKE_${lang}_COMPILER_ID_CONTENT "# define ${CID_PREFIX}COMPILER_IS_${Id} 0\n") + endforeach() + # Hard-code definitions for compilers that are no longer supported. + string(APPEND CMAKE_${lang}_COMPILER_ID_CONTENT "# define ${CID_PREFIX}COMPILER_IS_MIPSpro 0\n") + endif() + + set(pp_if "#if") + if (CID_VERSION_STRINGS) + string(APPEND CMAKE_${lang}_COMPILER_ID_CONTENT "\n/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */\n") + endif() + + foreach(Id ${ordered_compilers}) + if (NOT _compiler_id_pp_test_${Id}) + message(FATAL_ERROR "No preprocessor test for \"${Id}\"") + endif() + set(id_content "${pp_if} ${_compiler_id_pp_test_${Id}}\n") + if (CID_ID_STRING) + set(PREFIX ${CID_PREFIX}) + string(CONFIGURE "${_compiler_id_simulate_${Id}}" SIMULATE_BLOCK @ONLY) + string(APPEND id_content "# define ${CID_PREFIX}COMPILER_ID \"${Id}\"${SIMULATE_BLOCK}") + endif() + if (CID_ID_DEFINE) + string(APPEND id_content "# undef ${CID_PREFIX}COMPILER_IS_${Id}\n") + string(APPEND id_content "# define ${CID_PREFIX}COMPILER_IS_${Id} 1\n") + endif() + if (CID_VERSION_STRINGS) + set(PREFIX ${CID_PREFIX}) + set(MACRO_DEC DEC) + set(MACRO_HEX HEX) + string(CONFIGURE "${_compiler_id_version_compute_${Id}}" VERSION_BLOCK @ONLY) + string(APPEND id_content "${VERSION_BLOCK}\n") + endif() + string(APPEND CMAKE_${lang}_COMPILER_ID_CONTENT "\n${id_content}") + set(pp_if "#elif") + endforeach() + + if (CID_PLATFORM_DEFAULT_COMPILER) + set(platform_compiler_detection " +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__hpux) || defined(__hpua) +# define ${CID_PREFIX}COMPILER_ID \"HP\" + +#else /* unknown compiler */ +# define ${CID_PREFIX}COMPILER_ID \"\"") + endif() + + string(APPEND CMAKE_${lang}_COMPILER_ID_CONTENT "\n${platform_compiler_detection}\n#endif") + endif() + + set(${outvar} ${CMAKE_${lang}_COMPILER_ID_CONTENT} PARENT_SCOPE) +endfunction() diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeDetermineASM_MASMCompiler.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeDetermineASM_MASMCompiler.cmake new file mode 100644 index 0000000000000000000000000000000000000000..80188fb25fb2f89e7d7a0fb25eecf3db5daa0c43 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeDetermineASM_MASMCompiler.cmake @@ -0,0 +1,18 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + + +# Find the MS assembler (masm or masm64) + +set(ASM_DIALECT "_MASM") + +# if we are using the 64bit cl compiler, assume we also want the 64bit assembler +if(";${CMAKE_VS_PLATFORM_NAME};${MSVC_C_ARCHITECTURE_ID};${MSVC_CXX_ARCHITECTURE_ID};" + MATCHES ";(Win64|Itanium|x64|IA64);") + set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ml64) +else() + set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ml) +endif() + +include(CMakeDetermineASMCompiler) +set(ASM_DIALECT) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeDetermineCXXCompiler.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeDetermineCXXCompiler.cmake new file mode 100644 index 0000000000000000000000000000000000000000..891ba6e759094c1654315890d4c9eeaa56a2c71e --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeDetermineCXXCompiler.cmake @@ -0,0 +1,242 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + + +# determine the compiler to use for C++ programs +# NOTE, a generator may set CMAKE_CXX_COMPILER before +# loading this file to force a compiler. +# use environment variable CXX first if defined by user, next use +# the cmake variable CMAKE_GENERATOR_CXX which can be defined by a generator +# as a default compiler +# If the internal cmake variable _CMAKE_TOOLCHAIN_PREFIX is set, this is used +# as prefix for the tools (e.g. arm-elf-g++, arm-elf-ar etc.) +# +# Sets the following variables: +# CMAKE_CXX_COMPILER +# CMAKE_COMPILER_IS_GNUCXX +# CMAKE_AR +# CMAKE_RANLIB +# +# If not already set before, it also sets +# _CMAKE_TOOLCHAIN_PREFIX + +include(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake) + +# Load system-specific compiler preferences for this language. +include(Platform/${CMAKE_SYSTEM_NAME}-Determine-CXX OPTIONAL) +include(Platform/${CMAKE_SYSTEM_NAME}-CXX OPTIONAL) +if(NOT CMAKE_CXX_COMPILER_NAMES) + set(CMAKE_CXX_COMPILER_NAMES CC) +endif() + +if(${CMAKE_GENERATOR} MATCHES "Visual Studio") +elseif("${CMAKE_GENERATOR}" MATCHES "Green Hills MULTI") +elseif("${CMAKE_GENERATOR}" MATCHES "Xcode") + set(CMAKE_CXX_COMPILER_XCODE_TYPE sourcecode.cpp.cpp) + _cmake_find_compiler_path(CXX) +else() + if(NOT CMAKE_CXX_COMPILER) + set(CMAKE_CXX_COMPILER_INIT NOTFOUND) + + # prefer the environment variable CXX + if(NOT $ENV{CXX} STREQUAL "") + get_filename_component(CMAKE_CXX_COMPILER_INIT $ENV{CXX} PROGRAM PROGRAM_ARGS CMAKE_CXX_FLAGS_ENV_INIT) + if(CMAKE_CXX_FLAGS_ENV_INIT) + set(CMAKE_CXX_COMPILER_ARG1 "${CMAKE_CXX_FLAGS_ENV_INIT}" CACHE STRING "Arguments to CXX compiler") + endif() + if(NOT EXISTS ${CMAKE_CXX_COMPILER_INIT}) + message(FATAL_ERROR "Could not find compiler set in environment variable CXX:\n$ENV{CXX}.\n${CMAKE_CXX_COMPILER_INIT}") + endif() + endif() + + # next prefer the generator specified compiler + if(CMAKE_GENERATOR_CXX) + if(NOT CMAKE_CXX_COMPILER_INIT) + set(CMAKE_CXX_COMPILER_INIT ${CMAKE_GENERATOR_CXX}) + endif() + endif() + + # finally list compilers to try + if(NOT CMAKE_CXX_COMPILER_INIT) + set(CMAKE_CXX_COMPILER_LIST CC ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ aCC cl bcc xlC) + if(NOT CMAKE_HOST_WIN32) + # FIXME(#24314): Add support for the GNU-like icpx compiler driver + # on Windows, first introduced by Intel oneAPI 2023.0. + list(APPEND CMAKE_CXX_COMPILER_LIST icpx) + endif() + list(APPEND CMAKE_CXX_COMPILER_LIST icx clang++) + endif() + + _cmake_find_compiler(CXX) + else() + _cmake_find_compiler_path(CXX) + endif() + mark_as_advanced(CMAKE_CXX_COMPILER) + + # Each entry in this list is a set of extra flags to try + # adding to the compile line to see if it helps produce + # a valid identification file. + set(CMAKE_CXX_COMPILER_ID_TEST_FLAGS_FIRST) + set(CMAKE_CXX_COMPILER_ID_TEST_FLAGS + # Try compiling to an object file only. + "-c" + # IAR does not detect language automatically + "--c++" + "--ec++" + + # ARMClang need target options + "--target=arm-arm-none-eabi -mcpu=cortex-m3" + + # MSVC needs at least one include directory for __has_include to function, + # but custom toolchains may run MSVC with no INCLUDE env var and no -I flags. + # Also avoid linking so this works with no LIB env var. + "-c -I__does_not_exist__" + ) +endif() + +if(CMAKE_CXX_COMPILER_TARGET) + set(CMAKE_CXX_COMPILER_ID_TEST_FLAGS_FIRST "-c --target=${CMAKE_CXX_COMPILER_TARGET}") +endif() + +# Build a small source file to identify the compiler. +if(NOT CMAKE_CXX_COMPILER_ID_RUN) + set(CMAKE_CXX_COMPILER_ID_RUN 1) + + # Try to identify the compiler. + set(CMAKE_CXX_COMPILER_ID) + set(CMAKE_CXX_PLATFORM_ID) + file(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in + CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT) + + # The IAR compiler produces weird output. + # See https://gitlab.kitware.com/cmake/cmake/-/issues/10176#note_153591 + list(APPEND CMAKE_CXX_COMPILER_ID_VENDORS IAR) + set(CMAKE_CXX_COMPILER_ID_VENDOR_FLAGS_IAR ) + set(CMAKE_CXX_COMPILER_ID_VENDOR_REGEX_IAR "IAR .+ Compiler") + + # Match the link line from xcodebuild output of the form + # Ld ... + # ... + # /path/to/cc ...CompilerIdCXX/... + # to extract the compiler front-end for the language. + set(CMAKE_CXX_COMPILER_ID_TOOL_MATCH_REGEX "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerIdCXX/(\\./)?(CompilerIdCXX.(framework|xctest|build/[^ \t\r\n]+)/)?CompilerIdCXX[ \t\n\\\"]") + set(CMAKE_CXX_COMPILER_ID_TOOL_MATCH_INDEX 2) + + include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake) + CMAKE_DETERMINE_COMPILER_ID(CXX CXXFLAGS CMakeCXXCompilerId.cpp) + + _cmake_find_compiler_sysroot(CXX) + + # Set old compiler and platform id variables. + if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + set(CMAKE_COMPILER_IS_GNUCXX 1) + endif() +else() + if(NOT DEFINED CMAKE_CXX_COMPILER_FRONTEND_VARIANT) + # Some toolchain files set our internal CMAKE_CXX_COMPILER_ID_RUN + # variable but are not aware of CMAKE_CXX_COMPILER_FRONTEND_VARIANT. + # They pre-date our support for the GNU-like variant targeting the + # MSVC ABI so we do not consider that here. + if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" + OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xIntelLLVM") + if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") + set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "MSVC") + else() + set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "GNU") + endif() + else() + set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "") + endif() + endif() +endif() + +if (NOT _CMAKE_TOOLCHAIN_LOCATION) + get_filename_component(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_CXX_COMPILER}" PATH) +endif () + +# if we have a g++ cross compiler, they have usually some prefix, like +# e.g. powerpc-linux-g++, arm-elf-g++ or i586-mingw32msvc-g++ , optionally +# with a 3-component version number at the end (e.g. arm-eabi-gcc-4.5.2). +# The other tools of the toolchain usually have the same prefix +# NAME_WE cannot be used since then this test will fail for names like +# "arm-unknown-nto-qnx6.3.0-gcc.exe", where BASENAME would be +# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-" + + +if (NOT _CMAKE_TOOLCHAIN_PREFIX) + + if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|QCC|LCC") + get_filename_component(COMPILER_BASENAME "${CMAKE_CXX_COMPILER}" NAME) + if (COMPILER_BASENAME MATCHES "^(.+-)?(clang\\+\\+|[gc]\\+\\+|clang-cl)(-?[0-9]+(\\.[0-9]+)*)?(-[^.]+)?(\\.exe)?$") + set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) + set(_CMAKE_TOOLCHAIN_SUFFIX ${CMAKE_MATCH_3}) + set(_CMAKE_COMPILER_SUFFIX ${CMAKE_MATCH_5}) + elseif(CMAKE_CXX_COMPILER_ID MATCHES "TIClang") + if (COMPILER_BASENAME MATCHES "^(.+)?clang(\\.exe)?$") + set(_CMAKE_TOOLCHAIN_PREFIX "${CMAKE_MATCH_1}") + set(_CMAKE_TOOLCHAIN_SUFFIX "${CMAKE_MATCH_2}") + endif() + elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + if(CMAKE_CXX_COMPILER_TARGET) + set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_CXX_COMPILER_TARGET}-) + endif() + elseif(COMPILER_BASENAME MATCHES "QCC(\\.exe)?$") + if(CMAKE_CXX_COMPILER_TARGET MATCHES "gcc_nto([a-z0-9]+_[0-9]+|[^_le]+)(le)") + set(_CMAKE_TOOLCHAIN_PREFIX nto${CMAKE_MATCH_1}-) + endif() + endif () + + # if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils + # but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.) + if ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$") + set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) + endif () + elseif(CMAKE_CXX_COMPILER_ID MATCHES "TI") + # TI compilers are named e.g. cl6x, cl470 or armcl.exe + get_filename_component(COMPILER_BASENAME "${CMAKE_CXX_COMPILER}" NAME) + if (COMPILER_BASENAME MATCHES "^(.+)?cl([^.]+)?(\\.exe)?$") + set(_CMAKE_TOOLCHAIN_PREFIX "${CMAKE_MATCH_1}") + set(_CMAKE_TOOLCHAIN_SUFFIX "${CMAKE_MATCH_2}") + endif () + + endif() + +endif () + +set(_CMAKE_PROCESSING_LANGUAGE "CXX") +include(CMakeFindBinUtils) +include(Compiler/${CMAKE_CXX_COMPILER_ID}-FindBinUtils OPTIONAL) +unset(_CMAKE_PROCESSING_LANGUAGE) + +if(CMAKE_CXX_COMPILER_SYSROOT) + string(CONCAT _SET_CMAKE_CXX_COMPILER_SYSROOT + "set(CMAKE_CXX_COMPILER_SYSROOT \"${CMAKE_CXX_COMPILER_SYSROOT}\")\n" + "set(CMAKE_COMPILER_SYSROOT \"${CMAKE_CXX_COMPILER_SYSROOT}\")") +else() + set(_SET_CMAKE_CXX_COMPILER_SYSROOT "") +endif() + +if(CMAKE_CXX_COMPILER_ARCHITECTURE_ID) + set(_SET_CMAKE_CXX_COMPILER_ARCHITECTURE_ID + "set(CMAKE_CXX_COMPILER_ARCHITECTURE_ID ${CMAKE_CXX_COMPILER_ARCHITECTURE_ID})") +else() + set(_SET_CMAKE_CXX_COMPILER_ARCHITECTURE_ID "") +endif() + +if(MSVC_CXX_ARCHITECTURE_ID) + set(SET_MSVC_CXX_ARCHITECTURE_ID + "set(MSVC_CXX_ARCHITECTURE_ID ${MSVC_CXX_ARCHITECTURE_ID})") +endif() + +if(CMAKE_CXX_XCODE_ARCHS) + set(SET_CMAKE_XCODE_ARCHS + "set(CMAKE_XCODE_ARCHS \"${CMAKE_CXX_XCODE_ARCHS}\")") +endif() + +# configure all variables set in this file +configure_file(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in + ${CMAKE_PLATFORM_INFO_DIR}/CMakeCXXCompiler.cmake + @ONLY + ) + +set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeFindWMake.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeFindWMake.cmake new file mode 100644 index 0000000000000000000000000000000000000000..a20d06977db5dbca68517dd8a487bb66277a0447 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeFindWMake.cmake @@ -0,0 +1,7 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + + +set (CMAKE_MAKE_PROGRAM "wmake" CACHE STRING + "Program used to build from makefiles.") +mark_as_advanced(CMAKE_MAKE_PROGRAM) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeForceCompiler.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeForceCompiler.cmake new file mode 100644 index 0000000000000000000000000000000000000000..704880631a07137fbdeac10c09e75b4a7c2874e0 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeForceCompiler.cmake @@ -0,0 +1,114 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +CMakeForceCompiler +------------------ + +.. deprecated:: 3.6 + + Do not use. + +The macros provided by this module were once intended for use by +cross-compiling toolchain files when CMake was not able to automatically +detect the compiler identification. Since the introduction of this module, +CMake's compiler identification capabilities have improved and can now be +taught to recognize any compiler. Furthermore, the suite of information +CMake detects from a compiler is now too extensive to be provided by +toolchain files using these macros. + +One common use case for this module was to skip CMake's checks for a +working compiler when using a cross-compiler that cannot link binaries +without special flags or custom linker scripts. This case is now supported +by setting the :variable:`CMAKE_TRY_COMPILE_TARGET_TYPE` variable in the +toolchain file instead. + +------------------------------------------------------------------------- + +Macro ``CMAKE_FORCE_C_COMPILER`` has the following signature: + +:: + + CMAKE_FORCE_C_COMPILER( ) + +It sets :variable:`CMAKE_C_COMPILER _COMPILER>` to +the given compiler and the cmake internal variable +:variable:`CMAKE_C_COMPILER_ID _COMPILER_ID>` to the given +compiler-id. It also bypasses the check for working compiler and basic +compiler information tests. + +Macro ``CMAKE_FORCE_CXX_COMPILER`` has the following signature: + +:: + + CMAKE_FORCE_CXX_COMPILER( ) + +It sets :variable:`CMAKE_CXX_COMPILER _COMPILER>` to +the given compiler and the cmake internal variable +:variable:`CMAKE_CXX_COMPILER_ID _COMPILER_ID>` to the given +compiler-id. It also bypasses the check for working compiler and basic +compiler information tests. + +Macro ``CMAKE_FORCE_Fortran_COMPILER`` has the following signature: + +:: + + CMAKE_FORCE_Fortran_COMPILER( ) + +It sets :variable:`CMAKE_Fortran_COMPILER _COMPILER>` to +the given compiler and the cmake internal variable +:variable:`CMAKE_Fortran_COMPILER_ID _COMPILER_ID>` to the given +compiler-id. It also bypasses the check for working compiler and basic +compiler information tests. + +So a simple toolchain file could look like this: + +:: + + include (CMakeForceCompiler) + set(CMAKE_SYSTEM_NAME Generic) + CMAKE_FORCE_C_COMPILER (chc12 MetrowerksHicross) + CMAKE_FORCE_CXX_COMPILER (chc12 MetrowerksHicross) +#]=======================================================================] + +macro(CMAKE_FORCE_C_COMPILER compiler id) + message(DEPRECATION "The CMAKE_FORCE_C_COMPILER macro is deprecated. " + "Instead just set CMAKE_C_COMPILER and allow CMake to identify the compiler.") + set(CMAKE_C_COMPILER "${compiler}") + set(CMAKE_C_COMPILER_ID_RUN TRUE) + set(CMAKE_C_COMPILER_ID ${id}) + set(CMAKE_C_COMPILER_FORCED TRUE) + + # Set old compiler id variables. + if(CMAKE_C_COMPILER_ID MATCHES "GNU") + set(CMAKE_COMPILER_IS_GNUCC 1) + endif() +endmacro() + +macro(CMAKE_FORCE_CXX_COMPILER compiler id) + message(DEPRECATION "The CMAKE_FORCE_CXX_COMPILER macro is deprecated. " + "Instead just set CMAKE_CXX_COMPILER and allow CMake to identify the compiler.") + set(CMAKE_CXX_COMPILER "${compiler}") + set(CMAKE_CXX_COMPILER_ID_RUN TRUE) + set(CMAKE_CXX_COMPILER_ID ${id}) + set(CMAKE_CXX_COMPILER_FORCED TRUE) + + # Set old compiler id variables. + if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") + set(CMAKE_COMPILER_IS_GNUCXX 1) + endif() +endmacro() + +macro(CMAKE_FORCE_Fortran_COMPILER compiler id) + message(DEPRECATION "The CMAKE_FORCE_Fortran_COMPILER macro is deprecated. " + "Instead just set CMAKE_Fortran_COMPILER and allow CMake to identify the compiler.") + set(CMAKE_Fortran_COMPILER "${compiler}") + set(CMAKE_Fortran_COMPILER_ID_RUN TRUE) + set(CMAKE_Fortran_COMPILER_ID ${id}) + set(CMAKE_Fortran_COMPILER_FORCED TRUE) + + # Set old compiler id variables. + if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU") + set(CMAKE_COMPILER_IS_GNUG77 1) + endif() +endmacro() diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeGraphVizOptions.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeGraphVizOptions.cmake new file mode 100644 index 0000000000000000000000000000000000000000..708672258a53de2d90a2c1a29fb3ccf85b39203f --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeGraphVizOptions.cmake @@ -0,0 +1,150 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +CMakeGraphVizOptions +-------------------- + +The builtin Graphviz support of CMake. + +Generating Graphviz files +^^^^^^^^^^^^^^^^^^^^^^^^^ + +CMake can generate `Graphviz `_ files showing the +dependencies between the targets in a project, as well as external libraries +which are linked against. + +When running CMake with the ``--graphviz=foo.dot`` option, it produces: + +* a ``foo.dot`` file, showing all dependencies in the project +* a ``foo.dot.`` file for each target, showing on which other targets + it depends +* a ``foo.dot..dependers`` file for each target, showing which other + targets depend on it + +Those .dot files can be converted to images using the *dot* command from the +Graphviz package: + +.. code-block:: shell + + dot -Tpng -o foo.png foo.dot + +.. versionadded:: 3.10 + The different dependency types ``PUBLIC``, ``INTERFACE`` and ``PRIVATE`` + are represented as solid, dashed and dotted edges. + +Variables specific to the Graphviz support +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The resulting graphs can be huge. The look and content of the generated graphs +can be controlled using the file ``CMakeGraphVizOptions.cmake``. This file is +first searched in :variable:`CMAKE_BINARY_DIR`, and then in +:variable:`CMAKE_SOURCE_DIR`. If found, the variables set in it are used to +adjust options for the generated Graphviz files. + +.. variable:: GRAPHVIZ_GRAPH_NAME + + The graph name. + + * Mandatory: NO + * Default: value of :variable:`CMAKE_PROJECT_NAME` + +.. variable:: GRAPHVIZ_GRAPH_HEADER + + The header written at the top of the Graphviz files. + + * Mandatory: NO + * Default: "node [ fontsize = "12" ];" + +.. variable:: GRAPHVIZ_NODE_PREFIX + + The prefix for each node in the Graphviz files. + + * Mandatory: NO + * Default: "node" + +.. variable:: GRAPHVIZ_EXECUTABLES + + Set to FALSE to exclude executables from the generated graphs. + + * Mandatory: NO + * Default: TRUE + +.. variable:: GRAPHVIZ_STATIC_LIBS + + Set to FALSE to exclude static libraries from the generated graphs. + + * Mandatory: NO + * Default: TRUE + +.. variable:: GRAPHVIZ_SHARED_LIBS + + Set to FALSE to exclude shared libraries from the generated graphs. + + * Mandatory: NO + * Default: TRUE + +.. variable:: GRAPHVIZ_MODULE_LIBS + + Set to FALSE to exclude module libraries from the generated graphs. + + * Mandatory: NO + * Default: TRUE + +.. variable:: GRAPHVIZ_INTERFACE_LIBS + + Set to FALSE to exclude interface libraries from the generated graphs. + + * Mandatory: NO + * Default: TRUE + +.. variable:: GRAPHVIZ_OBJECT_LIBS + + Set to FALSE to exclude object libraries from the generated graphs. + + * Mandatory: NO + * Default: TRUE + +.. variable:: GRAPHVIZ_UNKNOWN_LIBS + + Set to FALSE to exclude unknown libraries from the generated graphs. + + * Mandatory: NO + * Default: TRUE + +.. variable:: GRAPHVIZ_EXTERNAL_LIBS + + Set to FALSE to exclude external libraries from the generated graphs. + + * Mandatory: NO + * Default: TRUE + +.. variable:: GRAPHVIZ_CUSTOM_TARGETS + + Set to TRUE to include custom targets in the generated graphs. + + * Mandatory: NO + * Default: FALSE + +.. variable:: GRAPHVIZ_IGNORE_TARGETS + + A list of regular expressions for names of targets to exclude from the + generated graphs. + + * Mandatory: NO + * Default: empty + +.. variable:: GRAPHVIZ_GENERATE_PER_TARGET + + Set to FALSE to not generate per-target graphs ``foo.dot.``. + + * Mandatory: NO + * Default: TRUE + +.. variable:: GRAPHVIZ_GENERATE_DEPENDERS + + Set to FALSE to not generate depender graphs ``foo.dot..dependers``. + + * Mandatory: NO + * Default: TRUE +#]=======================================================================] diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeISPCInformation.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeISPCInformation.cmake new file mode 100644 index 0000000000000000000000000000000000000000..4a4b72aa467da18a892046007c3f1583638f3623 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeISPCInformation.cmake @@ -0,0 +1,67 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +if(UNIX) + set(CMAKE_ISPC_OUTPUT_EXTENSION .o) +else() + set(CMAKE_ISPC_OUTPUT_EXTENSION .obj) +endif() +set(CMAKE_INCLUDE_FLAG_ISPC "-I") + +# Load compiler-specific information. +if(CMAKE_ISPC_COMPILER_ID) + include(Compiler/${CMAKE_ISPC_COMPILER_ID}-ISPC OPTIONAL) +endif() + +# load the system- and compiler specific files +if(CMAKE_ISPC_COMPILER_ID) + # load a hardware specific file, mostly useful for embedded compilers + if(CMAKE_SYSTEM_PROCESSOR) + include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_ISPC_COMPILER_ID}-ISPC-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL) + endif() + include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_ISPC_COMPILER_ID}-ISPC OPTIONAL) +endif() + +# add the flags to the cache based +# on the initial values computed in the platform/*.cmake files +# use _INIT variables so that this only happens the first time +# and you can set these flags in the cmake cache +set(CMAKE_ISPC_FLAGS_INIT "$ENV{ISPCFLAGS} ${CMAKE_ISPC_FLAGS_INIT}") + +cmake_initialize_per_config_variable(CMAKE_ISPC_FLAGS "Flags used by the ISPC compiler") + +if(CMAKE_ISPC_STANDARD_LIBRARIES_INIT) + set(CMAKE_ISPC_STANDARD_LIBRARIES "${CMAKE_ISPC_STANDARD_LIBRARIES_INIT}" + CACHE STRING "Libraries linked by default with all ISPC applications.") + mark_as_advanced(CMAKE_ISPC_STANDARD_LIBRARIES) +endif() + +if(NOT CMAKE_ISPC_COMPILER_LAUNCHER AND DEFINED ENV{CMAKE_ISPC_COMPILER_LAUNCHER}) + set(CMAKE_ISPC_COMPILER_LAUNCHER "$ENV{CMAKE_ISPC_COMPILER_LAUNCHER}" + CACHE STRING "Compiler launcher for ISPC.") +endif() + +include(CMakeCommonLanguageInclude) + +# now define the following rules: +# CMAKE_ISPC_COMPILE_OBJECT + +# Create a static archive incrementally for large object file counts. +if(NOT DEFINED CMAKE_ISPC_ARCHIVE_CREATE) + set(CMAKE_ISPC_ARCHIVE_CREATE " qc ") +endif() +if(NOT DEFINED CMAKE_ISPC_ARCHIVE_APPEND) + set(CMAKE_ISPC_ARCHIVE_APPEND " q ") +endif() +if(NOT DEFINED CMAKE_ISPC_ARCHIVE_FINISH) + set(CMAKE_ISPC_ARCHIVE_FINISH " ") +endif() + +if(NOT CMAKE_ISPC_COMPILE_OBJECT) + set(CMAKE_ISPC_COMPILE_OBJECT + " -o --emit-obj -h ") +endif() + +set(CMAKE_ISPC_USE_LINKER_INFORMATION FALSE) + +set(CMAKE_ISPC_INFORMATION_LOADED 1) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeImportBuildSettings.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeImportBuildSettings.cmake new file mode 100644 index 0000000000000000000000000000000000000000..ec1effb5c61b336cf2b987383feaba2e025687d9 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeImportBuildSettings.cmake @@ -0,0 +1,13 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + + +# This module is purposely no longer documented. It does nothing useful. + +# This macro used to load build settings from another project that +# stored settings using the CMAKE_EXPORT_BUILD_SETTINGS macro. +macro(CMAKE_IMPORT_BUILD_SETTINGS SETTINGS_FILE) + if("${SETTINGS_FILE}" STREQUAL "") + message(SEND_ERROR "CMAKE_IMPORT_BUILD_SETTINGS called with no argument.") + endif() +endmacro() diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeOBJCCompilerABI.m b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeOBJCCompilerABI.m new file mode 100644 index 0000000000000000000000000000000000000000..0726cd3eb47c5a8eadcef7309092a096b2eda037 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeOBJCCompilerABI.m @@ -0,0 +1,22 @@ +#ifdef __cplusplus +# error "A C++ compiler has been selected for Objective-C." +#endif + +/*--------------------------------------------------------------------------*/ + +#include "CMakeCompilerABI.h" + +/*--------------------------------------------------------------------------*/ + +int main(int argc, char *argv[]) +{ + int require = 0; + require += info_sizeof_dptr[argc]; + require += info_byte_order_big_endian[argc]; + require += info_byte_order_little_endian[argc]; +#if defined(ABI_ID) + require += info_abi[argc]; +#endif + (void)argv; + return require; +} diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakePlatformId.h.in b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakePlatformId.h.in new file mode 100644 index 0000000000000000000000000000000000000000..fd0367e489e8bcca66e6bb0bea96277c4a490295 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakePlatformId.h.in @@ -0,0 +1,359 @@ +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__MSYS__) +# define PLATFORM_ID "MSYS" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# elif defined(__VXWORKS__) +# define PLATFORM_ID "VxWorks" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#elif defined(__INTEGRITY) +# if defined(INT_178B) +# define PLATFORM_ID "Integrity178" + +# else /* regular Integrity */ +# define PLATFORM_ID "Integrity" +# endif + +# elif defined(_ADI_COMPILER) +# define PLATFORM_ID "ADSP" + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_ARM64EC) +# define ARCHITECTURE_ID "ARM64EC" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM64) +# define ARCHITECTURE_ID "ARM64" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCRX__) +# define ARCHITECTURE_ID "RX" + +# elif defined(__ICCRH850__) +# define ARCHITECTURE_ID "RH850" + +# elif defined(__ICCRL78__) +# define ARCHITECTURE_ID "RL78" + +# elif defined(__ICCRISCV__) +# define ARCHITECTURE_ID "RISCV" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# elif defined(__ICC430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__ICCSTM8__) +# define ARCHITECTURE_ID "STM8" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__ghs__) +# if defined(__PPC64__) +# define ARCHITECTURE_ID "PPC64" + +# elif defined(__ppc__) +# define ARCHITECTURE_ID "PPC" + +# elif defined(__ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__x86_64__) +# define ARCHITECTURE_ID "x64" + +# elif defined(__i386__) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__clang__) && defined(__ti__) +# if defined(__ARM_ARCH) +# define ARCHITECTURE_ID "Arm" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__TI_COMPILER_VERSION__) +# if defined(__TI_ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__MSP430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__TMS320C28XX__) +# define ARCHITECTURE_ID "TMS320C28x" + +# elif defined(__TMS320C6X__) || defined(_TMS320C6X) +# define ARCHITECTURE_ID "TMS320C6x" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +# elif defined(__ADSPSHARC__) +# define ARCHITECTURE_ID "SHARC" + +# elif defined(__ADSPBLACKFIN__) +# define ARCHITECTURE_ID "Blackfin" + +#elif defined(__TASKING__) + +# if defined(__CTC__) || defined(__CPTC__) +# define ARCHITECTURE_ID "TriCore" + +# elif defined(__CMCS__) +# define ARCHITECTURE_ID "MCS" + +# elif defined(__CARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__CARC__) +# define ARCHITECTURE_ID "ARC" + +# elif defined(__C51__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__CPCP__) +# define ARCHITECTURE_ID "PCP" + +# else +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number. */ +#ifdef COMPILER_VERSION +char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; + +/* Construct a string literal encoding the version number components. */ +#elif defined(COMPILER_VERSION_MAJOR) +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the internal version number. */ +#ifdef COMPILER_VERSION_INTERNAL +char const info_version_internal[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', + 'i','n','t','e','r','n','a','l','[', + COMPILER_VERSION_INTERNAL,']','\0'}; +#elif defined(COMPILER_VERSION_INTERNAL_STR) +char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeRCInformation.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeRCInformation.cmake new file mode 100644 index 0000000000000000000000000000000000000000..d7164691f4dd6b68c05c4117f1a1ebaf7810baa2 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeRCInformation.cmake @@ -0,0 +1,52 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + + +# This file sets the basic flags for the Windows Resource Compiler. +# It also loads the available platform file for the system-compiler +# if it exists. + +# make sure we don't use CMAKE_BASE_NAME from somewhere else +set(CMAKE_BASE_NAME) +if(CMAKE_RC_COMPILER MATCHES "windres[^/]*$") + set(CMAKE_BASE_NAME "windres") +else() + get_filename_component(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE) +endif() +set(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE + ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) +include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) + +# This should be included before the _INIT variables are +# used to initialize the cache. Since the rule variables +# have if blocks on them, users can still define them here. +# But, it should still be after the platform file so changes can +# be made to those values. +if(CMAKE_USER_MAKE_RULES_OVERRIDE) + # Save the full path of the file so try_compile can use it. + include(${CMAKE_USER_MAKE_RULES_OVERRIDE} RESULT_VARIABLE _override) + set(CMAKE_USER_MAKE_RULES_OVERRIDE "${_override}") +endif() + +set(CMAKE_RC_FLAGS_INIT "$ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}") + +cmake_initialize_per_config_variable(CMAKE_RC_FLAGS "Flags for Windows Resource Compiler") + +# These are the only types of flags that should be passed to the rc +# command, if COMPILE_FLAGS is used on a target this will be used +# to filter out any other flags +set(CMAKE_RC_FLAG_REGEX "^[-/](D|I)") + +# now define the following rule variables +# CMAKE_RC_COMPILE_OBJECT +set(CMAKE_INCLUDE_FLAG_RC "-I ") +# compile a Resource file into an object file +if(NOT CMAKE_RC_COMPILE_OBJECT) + set(CMAKE_RC_COMPILE_OBJECT + " /fo ") +endif() + +set(CMAKE_RC_USE_LINKER_INFORMATION FALSE) + +# set this variable so we can avoid loading this more than once. +set(CMAKE_RC_INFORMATION_LOADED 1) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeSwiftCompiler.cmake.in b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeSwiftCompiler.cmake.in new file mode 100644 index 0000000000000000000000000000000000000000..b3851908aa5de038ed2f1230eb2c3924bbcf645d --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeSwiftCompiler.cmake.in @@ -0,0 +1,18 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +set(CMAKE_Swift_COMPILER "@CMAKE_Swift_COMPILER@") +set(CMAKE_Swift_COMPILER_ID "@CMAKE_Swift_COMPILER_ID@") +set(CMAKE_Swift_COMPILER_VERSION "@CMAKE_Swift_COMPILER_VERSION@") + +set(CMAKE_Swift_COMPILER_LOADED 1) +set(CMAKE_Swift_COMPILER_WORKS "@CMAKE_Swift_COMPILER_WORKS@") + +set(CMAKE_Swift_COMPILER_ENV_VAR "SWIFTC") + +set(CMAKE_Swift_COMPILER_ID_RUN 1) +set(CMAKE_Swift_SOURCE_FILE_EXTENSIONS swift) + +set(CMAKE_Swift_COMPILER_USE_OLD_DRIVER "@CMAKE_Swift_COMPILER_USE_OLD_DRIVER@") + +set(CMAKE_Swift_IMPLICIT_INCLUDE_DIRECTORIES "@CMAKE_Swift_IMPLICIT_INCLUDE_DIRECTORIES@") diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeSystemSpecificInformation.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeSystemSpecificInformation.cmake new file mode 100644 index 0000000000000000000000000000000000000000..70bcf5cb589d78abe4b1b03547a62c007885ab42 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeSystemSpecificInformation.cmake @@ -0,0 +1,64 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + + +# This file is included by cmGlobalGenerator::EnableLanguage. +# It is included after the compiler has been determined, so +# we know things like the compiler name and if the compiler is gnu. + +function(_cmake_record_install_prefix ) + set(_CMAKE_SYSTEM_PREFIX_PATH_INSTALL_PREFIX_VALUE "${CMAKE_INSTALL_PREFIX}" PARENT_SCOPE) + set(_CMAKE_SYSTEM_PREFIX_PATH_STAGING_PREFIX_VALUE "${CMAKE_STAGING_PREFIX}" PARENT_SCOPE) + set(icount 0) + set(scount 0) + foreach(value IN LISTS CMAKE_SYSTEM_PREFIX_PATH) + if(value STREQUAL CMAKE_INSTALL_PREFIX) + math(EXPR icount "${icount}+1") + endif() + if(value STREQUAL CMAKE_STAGING_PREFIX) + math(EXPR scount "${scount}+1") + endif() + endforeach() + set(_CMAKE_SYSTEM_PREFIX_PATH_INSTALL_PREFIX_COUNT "${icount}" PARENT_SCOPE) + set(_CMAKE_SYSTEM_PREFIX_PATH_STAGING_PREFIX_COUNT "${scount}" PARENT_SCOPE) +endfunction() + +# include Generic system information +include(CMakeGenericSystem) + +# 2. now include SystemName.cmake file to set the system specific information +set(CMAKE_SYSTEM_INFO_FILE Platform/${CMAKE_SYSTEM_NAME}) + +include(${CMAKE_SYSTEM_INFO_FILE} OPTIONAL RESULT_VARIABLE _INCLUDED_SYSTEM_INFO_FILE) + +if(NOT _INCLUDED_SYSTEM_INFO_FILE) + message("System is unknown to cmake, create:\n${CMAKE_SYSTEM_INFO_FILE}" + " to use this system, please post your config file on " + "discourse.cmake.org so it can be added to cmake") + if(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt) + configure_file(${CMAKE_BINARY_DIR}/CMakeCache.txt + ${CMAKE_BINARY_DIR}/CopyOfCMakeCache.txt COPYONLY) + message("Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. " + "Please post that file on discourse.cmake.org.") + endif() +endif() + +# optionally include a file which can do extra-generator specific things, e.g. +# CMakeFindEclipseCDT4.cmake asks gcc for the system include dirs for the Eclipse CDT4 generator +if(CMAKE_EXTRA_GENERATOR) + string(REPLACE " " "" _CMAKE_EXTRA_GENERATOR_NO_SPACES ${CMAKE_EXTRA_GENERATOR} ) + include("CMakeFind${_CMAKE_EXTRA_GENERATOR_NO_SPACES}" OPTIONAL) +endif() + + +# for most systems a module is the same as a shared library +# so unless the variable CMAKE_MODULE_EXISTS is set just +# copy the values from the LIBRARY variables +# this has to be done after the system information has been loaded +if(NOT CMAKE_MODULE_EXISTS) + set(CMAKE_SHARED_MODULE_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}") + set(CMAKE_SHARED_MODULE_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}") +endif() + + +set(CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED 1) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeTestASMCompiler.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeTestASMCompiler.cmake new file mode 100644 index 0000000000000000000000000000000000000000..7f0b9a777a745ff87cc6ea1fffd97af63359014e --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeTestASMCompiler.cmake @@ -0,0 +1,25 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + + +# This file is used by EnableLanguage in cmGlobalGenerator to +# determine that the selected ASM compiler works. +# For assembler this can only check whether the compiler has been found, +# because otherwise there would have to be a separate assembler source file +# for each assembler on every architecture. + + +set(_ASM_COMPILER_WORKS 0) + +if(CMAKE_ASM${ASM_DIALECT}_COMPILER) + set(_ASM_COMPILER_WORKS 1) +endif() + +# when using generic "ASM" support, we must have detected the compiler ID, fail otherwise: +if("ASM${ASM_DIALECT}" STREQUAL "ASM") + if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) + set(_ASM_COMPILER_WORKS 0) + endif() +endif() + +set(CMAKE_ASM${ASM_DIALECT}_COMPILER_WORKS ${_ASM_COMPILER_WORKS} CACHE INTERNAL "") diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeTestGNU.c b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeTestGNU.c new file mode 100644 index 0000000000000000000000000000000000000000..7dcafde66ef8bc53967fc25e41597372117e34b2 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeTestGNU.c @@ -0,0 +1,10 @@ +#if defined(__GNUC__) && \ + !(defined(__INTEL_COMPILER) || defined(__INTEL_LLVM_COMPILER)) +void THIS_IS_GNU(); +#endif +#ifdef __MINGW32__ +void THIS_IS_MINGW(); +#endif +#ifdef __CYGWIN__ +void THIS_IS_CYGWIN(); +#endif diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeTestHIPCompiler.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeTestHIPCompiler.cmake new file mode 100644 index 0000000000000000000000000000000000000000..5b49c0d678b3c319bb5229cbebbe8c94ff099b0b --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeTestHIPCompiler.cmake @@ -0,0 +1,116 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + + +if(CMAKE_HIP_COMPILER_FORCED) + # The compiler configuration was forced by the user. + # Assume the user has configured all compiler information. + set(CMAKE_HIP_COMPILER_WORKS TRUE) + return() +endif() + +set(__CMAKE_HIP_FLAGS "${CMAKE_HIP_FLAGS}") + +if(CMAKE_HIP_COMPILER_ID STREQUAL "Clang") + string(APPEND CMAKE_HIP_FLAGS " --cuda-host-only") +endif() + +include(CMakeTestCompilerCommon) + +# work around enforced code signing and / or missing executable target type +set(__CMAKE_SAVED_TRY_COMPILE_TARGET_TYPE ${CMAKE_TRY_COMPILE_TARGET_TYPE}) +if(_CMAKE_FEATURE_DETECTION_TARGET_TYPE) + set(CMAKE_TRY_COMPILE_TARGET_TYPE ${_CMAKE_FEATURE_DETECTION_TARGET_TYPE}) +endif() + +# Remove any cached result from an older CMake version. +# We now store this in CMakeHIPCompiler.cmake. +unset(CMAKE_HIP_COMPILER_WORKS CACHE) + +# Try to identify the ABI and configure it into CMakeHIPCompiler.cmake +include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake) +CMAKE_DETERMINE_COMPILER_ABI(HIP ${CMAKE_ROOT}/Modules/CMakeHIPCompilerABI.hip) +if(CMAKE_HIP_ABI_COMPILED) + # The compiler worked so skip dedicated test below. + set(CMAKE_HIP_COMPILER_WORKS TRUE) + message(STATUS "Check for working HIP compiler: ${CMAKE_HIP_COMPILER} - skipped") + + if(CMAKE_HIP_COMPILER_ID STREQUAL "NVIDIA") + include(Internal/CMakeCUDAArchitecturesNative) + # Run the test binary to get: + # - CMAKE_HIP_ARCHITECTURES_NATIVE + cmake_cuda_architectures_native(HIP) + endif() +endif() + +# This file is used by EnableLanguage in cmGlobalGenerator to +# determine that the selected C++ compiler can actually compile +# and link the most basic of programs. If not, a fatal error +# is set and cmake stops processing commands and will not generate +# any makefiles or projects. +if(NOT CMAKE_HIP_COMPILER_WORKS) + PrintTestCompilerStatus("HIP") + __TestCompiler_setTryCompileTargetType() + string(CONCAT __TestCompiler_testHIPCompilerSource + "#if !defined(__HIP__) && !defined(__NVCC__)\n" + "# error \"The CMAKE_HIP_COMPILER is set to a C/CXX compiler\"\n" + "#endif\n" + "int main(){return 0;}\n") + # Clear result from normal variable. + unset(CMAKE_HIP_COMPILER_WORKS) + # Puts test result in cache variable. + try_compile(CMAKE_HIP_COMPILER_WORKS + SOURCE_FROM_VAR testHIPCompiler.hip __TestCompiler_testHIPCompilerSource + OUTPUT_VARIABLE __CMAKE_HIP_COMPILER_OUTPUT) + unset(__TestCompiler_testHIPCompilerSource) + # Move result from cache to normal variable. + set(CMAKE_HIP_COMPILER_WORKS ${CMAKE_HIP_COMPILER_WORKS}) + unset(CMAKE_HIP_COMPILER_WORKS CACHE) + __TestCompiler_restoreTryCompileTargetType() + if(NOT CMAKE_HIP_COMPILER_WORKS) + PrintTestCompilerResult(CHECK_FAIL "broken") + string(REPLACE "\n" "\n " _output "${__CMAKE_HIP_COMPILER_OUTPUT}") + message(FATAL_ERROR "The HIP compiler\n \"${CMAKE_HIP_COMPILER}\"\n" + "is not able to compile a simple test program.\nIt fails " + "with the following output:\n ${_output}\n\n" + "CMake will not be able to correctly generate this project.") + endif() + PrintTestCompilerResult(CHECK_PASS "works") +endif() + +set(CMAKE_HIP_FLAGS "${__CMAKE_HIP_FLAGS}") +unset(__CMAKE_HIP_FLAGS) + + +# Try to identify the compiler features +include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerSupport.cmake) +CMAKE_DETERMINE_COMPILER_SUPPORT(HIP) + +if(CMAKE_HIP_COMPILER_ID STREQUAL "NVIDIA") + include(Internal/CMakeNVCCFilterImplicitInfo) + # Match arguments with cmake_nvcc_parse_implicit_info call in CMakeDetermineHIPCompiler. + cmake_nvcc_filter_implicit_info(HIP CMAKE_HIP_CUDA_) + + include(Internal/CMakeCUDAFilterImplicitLibs) + # Filter out implicit link libraries that should not be passed unconditionally. + cmake_cuda_filter_implicit_libs(CMAKE_HIP_IMPLICIT_LINK_LIBRARIES) +endif() + +# Re-configure to save learned information. +configure_file( + ${CMAKE_ROOT}/Modules/CMakeHIPCompiler.cmake.in + ${CMAKE_PLATFORM_INFO_DIR}/CMakeHIPCompiler.cmake + @ONLY + ) +include(${CMAKE_PLATFORM_INFO_DIR}/CMakeHIPCompiler.cmake) + +if(CMAKE_HIP_SIZEOF_DATA_PTR) + foreach(f ${CMAKE_HIP_ABI_FILES}) + include(${f}) + endforeach() + unset(CMAKE_HIP_ABI_FILES) +endif() + +set(CMAKE_TRY_COMPILE_TARGET_TYPE ${__CMAKE_SAVED_TRY_COMPILE_TARGET_TYPE}) +unset(__CMAKE_SAVED_TRY_COMPILE_TARGET_TYPE) +unset(__CMAKE_HIP_COMPILER_OUTPUT) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CTestTargets.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CTestTargets.cmake new file mode 100644 index 0000000000000000000000000000000000000000..5e8a07dfe3e6345f6181d71e400be6938ecc7688 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CTestTargets.cmake @@ -0,0 +1,109 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + + +if(NOT RUN_FROM_CTEST_OR_DART) + message(FATAL_ERROR "Do not include CTestTargets.cmake directly") +endif() + +if(NOT PROJECT_BINARY_DIR) + message(FATAL_ERROR "Do not include(CTest) before calling project().") +endif() + +# make directories in the binary tree +file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/Testing/Temporary) +get_filename_component(CMAKE_HOST_PATH ${CMAKE_COMMAND} PATH) +set(CMAKE_TARGET_PATH ${EXECUTABLE_OUTPUT_PATH}) +find_program(CMAKE_CTEST_COMMAND ctest ${CMAKE_HOST_PATH} ${CMAKE_TARGET_PATH}) +mark_as_advanced(CMAKE_CTEST_COMMAND) + +# Use CTest +# configure files + +block() + if(NOT DEFINED CTEST_TLS_VERSION) + if(DEFINED CMAKE_TLS_VERSION) + set(CTEST_TLS_VERSION "${CMAKE_TLS_VERSION}") + elseif(DEFINED ENV{CMAKE_TLS_VERSION}) + set(CTEST_TLS_VERSION "$ENV{CMAKE_TLS_VERSION}") + endif() + endif() + if(NOT DEFINED CTEST_TLS_VERIFY) + if(DEFINED CMAKE_TLS_VERIFY) + set(CTEST_TLS_VERIFY "${CMAKE_TLS_VERIFY}") + elseif(DEFINED ENV{CMAKE_TLS_VERIFY}) + set(CTEST_TLS_VERIFY "$ENV{CMAKE_TLS_VERIFY}") + endif() + endif() + if(CTEST_NEW_FORMAT) + configure_file( + ${CMAKE_ROOT}/Modules/DartConfiguration.tcl.in + ${PROJECT_BINARY_DIR}/CTestConfiguration.ini ) + else() + configure_file( + ${CMAKE_ROOT}/Modules/DartConfiguration.tcl.in + ${PROJECT_BINARY_DIR}/DartConfiguration.tcl ) + endif() +endblock() + +# +# Section 3: +# +# Custom targets to perform dashboard builds and submissions. +# These should NOT need to be modified from project to project. +# + +set(__conf_types "") +get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(_isMultiConfig) + # We need to pass the configuration type on the test command line. + set(__conf_types -C "$") +endif() + +# Add convenience targets. Do this at most once in case of nested +# projects. +define_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED + BRIEF_DOCS "Internal property used by CTestTargets module." + FULL_DOCS "Set by the CTestTargets module to track addition of testing targets." + ) +get_property(_CTEST_TARGETS_ADDED GLOBAL PROPERTY CTEST_TARGETS_ADDED) +if(NOT _CTEST_TARGETS_ADDED) + set_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED 1) + + # For all generators add basic testing targets. + foreach(mode Experimental Nightly Continuous NightlyMemoryCheck) + add_custom_target(${mode} + ${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode} + USES_TERMINAL + ) + set_property(TARGET ${mode} PROPERTY RULE_LAUNCH_CUSTOM "") + set_property(TARGET ${mode} PROPERTY FOLDER "CTestDashboardTargets") + endforeach() + + # For Makefile generators add more granular targets. + if("${CMAKE_GENERATOR}" MATCHES "(Ninja|Make)") + # Make targets for Experimental builds + foreach(mode Nightly Experimental Continuous) + foreach(testtype + Start Update Configure Build Test Coverage MemCheck Submit + # missing purify + ) + add_custom_target(${mode}${testtype} + ${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode}${testtype} + USES_TERMINAL + ) + set_property(TARGET ${mode}${testtype} PROPERTY RULE_LAUNCH_CUSTOM "") + set_property(TARGET ${mode}${testtype} PROPERTY FOLDER "CTestDashboardTargets") + endforeach() + endforeach() + endif() + + # If requested, add an alias that is the equivalent of the built-in "test" + # or "RUN_TESTS" target: + if(CTEST_TEST_TARGET_ALIAS) + add_custom_target(${CTEST_TEST_TARGET_ALIAS} + ${CMAKE_CTEST_COMMAND} ${CMAKE_CTEST_ARGUMENTS} ${__conf_types} + USES_TERMINAL + ) + endif() +endif() diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CheckFunctionExists.c b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CheckFunctionExists.c new file mode 100644 index 0000000000000000000000000000000000000000..13435e07e59ed2d136d1f5e2ca4800fd34d34a05 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CheckFunctionExists.c @@ -0,0 +1,28 @@ +#ifdef CHECK_FUNCTION_EXISTS + +# ifdef __cplusplus +extern "C" +# endif + char + CHECK_FUNCTION_EXISTS(void); +# ifdef __CLASSIC_C__ +int main() +{ + int ac; + char* av[]; +# else +int main(int ac, char* av[]) +{ +# endif + CHECK_FUNCTION_EXISTS(); + if (ac > 1000) { + return *av[0]; + } + return 0; +} + +#else /* CHECK_FUNCTION_EXISTS */ + +# error "CHECK_FUNCTION_EXISTS has to specify the function" + +#endif /* CHECK_FUNCTION_EXISTS */ diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CheckOBJCSourceCompiles.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CheckOBJCSourceCompiles.cmake new file mode 100644 index 0000000000000000000000000000000000000000..11d8ea91885423c26f72f4861c93c85b8fcc3f4d --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CheckOBJCSourceCompiles.cmake @@ -0,0 +1,61 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +CheckOBJCSourceCompiles +----------------------- + +.. versionadded:: 3.16 + +Check once if Objective-C source can be built. + +.. command:: check_objc_source_compiles + + .. code-block:: cmake + + check_objc_source_compiles( + [FAIL_REGEX [...]]) + + Check once that the source supplied in ```` can be built. The result is + stored in the internal cache variable specified by ````, with + boolean ``true`` for success and boolean ``false`` for failure. + + If ``FAIL_REGEX`` is provided, then failure is determined by checking + if anything in the compiler output matches any of the specified regular + expressions. + + Internally, :command:`try_compile` is used to compile the source. If + :variable:`CMAKE_TRY_COMPILE_TARGET_TYPE` is set to ``EXECUTABLE`` (default), + the source is compiled and linked as an executable program. If set to + ``STATIC_LIBRARY``, the source is compiled but not linked. In any case, all + functions must be declared as usual. + + See also :command:`check_source_compiles` for a more general command syntax. + + See also :command:`check_source_runs` to run compiled source. + + The compile and link commands can be influenced by setting any of the + following variables prior to calling ``check_objc_source_compiles()`` + +.. include:: /module/CMAKE_REQUIRED_FLAGS.txt + +.. include:: /module/CMAKE_REQUIRED_DEFINITIONS.txt + +.. include:: /module/CMAKE_REQUIRED_INCLUDES.txt + +.. include:: /module/CMAKE_REQUIRED_LINK_OPTIONS.txt + +.. include:: /module/CMAKE_REQUIRED_LIBRARIES.txt + +.. include:: /module/CMAKE_REQUIRED_LINK_DIRECTORIES.txt + +.. include:: /module/CMAKE_REQUIRED_QUIET.txt + +#]=======================================================================] + +include_guard(GLOBAL) +include(Internal/CheckSourceCompiles) + +macro(CHECK_OBJC_SOURCE_COMPILES SOURCE VAR) + cmake_check_source_compiles(OBJC "${SOURCE}" ${VAR} ${ARGN}) +endmacro() diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CheckOBJCXXSourceCompiles.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CheckOBJCXXSourceCompiles.cmake new file mode 100644 index 0000000000000000000000000000000000000000..35024d7b3f3b897e87c243294725cbc0e6cc8993 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CheckOBJCXXSourceCompiles.cmake @@ -0,0 +1,61 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +CheckOBJCXXSourceCompiles +------------------------- + +.. versionadded:: 3.16 + +Check once if Objective-C++ source can be built. + +.. command:: check_objcxx_source_compiles + + .. code-block:: cmake + + check_objcxx_source_compiles( + [FAIL_REGEX [...]]) + + Check once that the source supplied in ```` can be built. The result is + stored in the internal cache variable specified by ````, with + boolean ``true`` for success and boolean ``false`` for failure. + + If ``FAIL_REGEX`` is provided, then failure is determined by checking + if anything in the compiler output matches any of the specified regular + expressions. + + Internally, :command:`try_compile` is used to compile the source. If + :variable:`CMAKE_TRY_COMPILE_TARGET_TYPE` is set to ``EXECUTABLE`` (default), + the source is compiled and linked as an executable program. If set to + ``STATIC_LIBRARY``, the source is compiled but not linked. In any case, all + functions must be declared as usual. + + See also :command:`check_source_compiles` for a more general command syntax. + + See also :command:`check_source_runs` to run compiled source. + + The compile and link commands can be influenced by setting any of the + following variables prior to calling ``check_objcxx_source_compiles()`` + +.. include:: /module/CMAKE_REQUIRED_FLAGS.txt + +.. include:: /module/CMAKE_REQUIRED_DEFINITIONS.txt + +.. include:: /module/CMAKE_REQUIRED_INCLUDES.txt + +.. include:: /module/CMAKE_REQUIRED_LINK_OPTIONS.txt + +.. include:: /module/CMAKE_REQUIRED_LIBRARIES.txt + +.. include:: /module/CMAKE_REQUIRED_LINK_DIRECTORIES.txt + +.. include:: /module/CMAKE_REQUIRED_QUIET.txt + +#]=======================================================================] + +include_guard(GLOBAL) +include(Internal/CheckSourceCompiles) + +macro(CHECK_OBJCXX_SOURCE_COMPILES SOURCE VAR) + cmake_check_source_compiles(OBJCXX "${SOURCE}" ${VAR} ${ARGN}) +endmacro() diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CheckStructHasMember.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CheckStructHasMember.cmake new file mode 100644 index 0000000000000000000000000000000000000000..a088202b6cfa6459afef76547c4b169d2f70b4a3 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CheckStructHasMember.cmake @@ -0,0 +1,90 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +CheckStructHasMember +-------------------- + +Check if the given struct or class has the specified member variable + +.. command:: CHECK_STRUCT_HAS_MEMBER + + .. code-block:: cmake + + CHECK_STRUCT_HAS_MEMBER(
+ [LANGUAGE ]) + + :: + + - the name of the struct or class you are interested in + - the member which existence you want to check +
- the header(s) where the prototype should be declared + - variable to store the result + - the compiler to use (C or CXX) + + +The following variables may be set before calling this macro to modify +the way the check is run: + +.. include:: /module/CMAKE_REQUIRED_FLAGS.txt + +.. include:: /module/CMAKE_REQUIRED_DEFINITIONS.txt + +.. include:: /module/CMAKE_REQUIRED_INCLUDES.txt + +.. include:: /module/CMAKE_REQUIRED_LINK_OPTIONS.txt + +.. include:: /module/CMAKE_REQUIRED_LIBRARIES.txt + +.. include:: /module/CMAKE_REQUIRED_LINK_DIRECTORIES.txt + +.. include:: /module/CMAKE_REQUIRED_QUIET.txt + + +Example: + +.. code-block:: cmake + + CHECK_STRUCT_HAS_MEMBER("struct timeval" tv_sec sys/select.h + HAVE_TIMEVAL_TV_SEC LANGUAGE C) +#]=======================================================================] + +include_guard(GLOBAL) +include(CheckSourceCompiles) + +macro (CHECK_STRUCT_HAS_MEMBER _STRUCT _MEMBER _HEADER _RESULT) + set(_INCLUDE_FILES) + foreach (it ${_HEADER}) + string(APPEND _INCLUDE_FILES "#include <${it}>\n") + endforeach () + + if("x${ARGN}" STREQUAL "x") + set(_lang C) + elseif("x${ARGN}" MATCHES "^xLANGUAGE;([a-zA-Z]+)$") + set(_lang "${CMAKE_MATCH_1}") + else() + message(FATAL_ERROR "Unknown arguments:\n ${ARGN}\n") + endif() + + set(_CHECK_STRUCT_MEMBER_SOURCE_CODE " +${_INCLUDE_FILES} +int main(void) +{ + (void)sizeof(((${_STRUCT} *)0)->${_MEMBER}); + return 0; +} +") + + if("${_lang}" STREQUAL "C") + CHECK_SOURCE_COMPILES(C "${_CHECK_STRUCT_MEMBER_SOURCE_CODE}" ${_RESULT}) + elseif("${_lang}" STREQUAL "CXX") + CHECK_SOURCE_COMPILES(CXX "${_CHECK_STRUCT_MEMBER_SOURCE_CODE}" ${_RESULT}) + else() + message(FATAL_ERROR "Unknown language:\n ${_lang}\nSupported languages: C, CXX.\n") + endif() +endmacro () + +# FIXME(#24994): The following modules are included only for compatibility +# with projects that accidentally relied on them with CMake 3.26 and below. +include(CheckCSourceCompiles) +include(CheckCXXSourceCompiles) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CheckSymbolExists.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CheckSymbolExists.cmake new file mode 100644 index 0000000000000000000000000000000000000000..a4950df7258f13822c00097643c46b4cfe3a0aa9 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CheckSymbolExists.cmake @@ -0,0 +1,189 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +CheckSymbolExists +----------------- + +Provides a macro to check if a symbol exists as a function, variable, +or macro in ``C``. + +.. command:: check_symbol_exists + + .. code-block:: cmake + + check_symbol_exists( ) + + Check that the ```` is available after including given header + ```` and store the result in a ````. Specify the list + of files in one argument as a semicolon-separated list. + ```` will be created as an internal cache variable. + +If the header files define the symbol as a macro it is considered +available and assumed to work. If the header files declare the symbol +as a function or variable then the symbol must also be available for +linking (so intrinsics may not be detected). +If the symbol is a type, enum value, or intrinsic it will not be recognized +(consider using :module:`CheckTypeSize` or :module:`CheckSourceCompiles`). +If the check needs to be done in C++, consider using +:module:`CheckCXXSymbolExists` instead. + +The following variables may be set before calling this macro to modify +the way the check is run: + +.. include:: /module/CMAKE_REQUIRED_FLAGS.txt + +.. include:: /module/CMAKE_REQUIRED_DEFINITIONS.txt + +.. include:: /module/CMAKE_REQUIRED_INCLUDES.txt + +.. include:: /module/CMAKE_REQUIRED_LINK_OPTIONS.txt + +.. include:: /module/CMAKE_REQUIRED_LIBRARIES.txt + +.. include:: /module/CMAKE_REQUIRED_LINK_DIRECTORIES.txt + +.. include:: /module/CMAKE_REQUIRED_QUIET.txt + +For example: + +.. code-block:: cmake + + include(CheckSymbolExists) + + # Check for macro SEEK_SET + check_symbol_exists(SEEK_SET "stdio.h" HAVE_SEEK_SET) + # Check for function fopen + check_symbol_exists(fopen "stdio.h" HAVE_FOPEN) +#]=======================================================================] + +include_guard(GLOBAL) + +block(SCOPE_FOR POLICIES) +cmake_policy(SET CMP0054 NEW) # if() quoted variables not dereferenced + +macro(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE) + if(CMAKE_C_COMPILER_LOADED) + __CHECK_SYMBOL_EXISTS_FILTER_FLAGS(C) + __CHECK_SYMBOL_EXISTS_IMPL(CheckSymbolExists.c "${SYMBOL}" "${FILES}" "${VARIABLE}" ) + __CHECK_SYMBOL_EXISTS_RESTORE_FLAGS(C) + elseif(CMAKE_CXX_COMPILER_LOADED) + __CHECK_SYMBOL_EXISTS_FILTER_FLAGS(CXX) + __CHECK_SYMBOL_EXISTS_IMPL(CheckSymbolExists.cxx "${SYMBOL}" "${FILES}" "${VARIABLE}" ) + __CHECK_SYMBOL_EXISTS_RESTORE_FLAGS(CXX) + else() + message(FATAL_ERROR "CHECK_SYMBOL_EXISTS needs either C or CXX language enabled") + endif() +endmacro() + +macro(__CHECK_SYMBOL_EXISTS_FILTER_FLAGS LANG) + if(CMAKE_TRY_COMPILE_CONFIGURATION) + string(TOUPPER "${CMAKE_TRY_COMPILE_CONFIGURATION}" _tc_config) + else() + set(_tc_config "DEBUG") + endif() + foreach(v CMAKE_${LANG}_FLAGS CMAKE_${LANG}_FLAGS_${_tc_config}) + set(__${v}_SAVED "${${v}}") + string(REGEX REPLACE "(^| )-Werror([= ][^-][^ ]*)?( |$)" " " ${v} "${${v}}") + string(REGEX REPLACE "(^| )-pedantic-errors( |$)" " " ${v} "${${v}}") + endforeach() +endmacro() + +macro(__CHECK_SYMBOL_EXISTS_RESTORE_FLAGS LANG) + if(CMAKE_TRY_COMPILE_CONFIGURATION) + string(TOUPPER "${CMAKE_TRY_COMPILE_CONFIGURATION}" _tc_config) + else() + set(_tc_config "DEBUG") + endif() + foreach(v CMAKE_${LANG}_FLAGS CMAKE_${LANG}_FLAGS_${_tc_config}) + set(${v} "${__${v}_SAVED}") + unset(__${v}_SAVED) + endforeach() +endmacro() + +macro(__CHECK_SYMBOL_EXISTS_IMPL SOURCEFILE SYMBOL FILES VARIABLE) + if(NOT DEFINED "${VARIABLE}" OR "x${${VARIABLE}}" STREQUAL "x${VARIABLE}") + set(_CSE_SOURCE "/* */\n") + set(MACRO_CHECK_SYMBOL_EXISTS_FLAGS ${CMAKE_REQUIRED_FLAGS}) + if(CMAKE_REQUIRED_LINK_OPTIONS) + set(CHECK_SYMBOL_EXISTS_LINK_OPTIONS + LINK_OPTIONS ${CMAKE_REQUIRED_LINK_OPTIONS}) + else() + set(CHECK_SYMBOL_EXISTS_LINK_OPTIONS) + endif() + if(CMAKE_REQUIRED_LIBRARIES) + set(CHECK_SYMBOL_EXISTS_LIBS + LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}) + else() + set(CHECK_SYMBOL_EXISTS_LIBS) + endif() + if(CMAKE_REQUIRED_INCLUDES) + set(CMAKE_SYMBOL_EXISTS_INCLUDES + "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") + else() + set(CMAKE_SYMBOL_EXISTS_INCLUDES) + endif() + + if(CMAKE_REQUIRED_LINK_DIRECTORIES) + set(_CSE_LINK_DIRECTORIES + "-DLINK_DIRECTORIES:STRING=${CMAKE_REQUIRED_LINK_DIRECTORIES}") + else() + set(_CSE_LINK_DIRECTORIES) + endif() + foreach(FILE ${FILES}) + string(APPEND _CSE_SOURCE + "#include <${FILE}>\n") + endforeach() + string(APPEND _CSE_SOURCE " +int main(int argc, char** argv) +{ + (void)argv;") + set(_CSE_CHECK_NON_MACRO "return ((int*)(&${SYMBOL}))[argc];") + if("${SYMBOL}" MATCHES "^[a-zA-Z_][a-zA-Z0-9_]*$") + # The SYMBOL has a legal macro name. Test whether it exists as a macro. + string(APPEND _CSE_SOURCE " +#ifndef ${SYMBOL} + ${_CSE_CHECK_NON_MACRO} +#else + (void)argc; + return 0; +#endif") + else() + # The SYMBOL cannot be a macro (e.g., a template function). + string(APPEND _CSE_SOURCE " + ${_CSE_CHECK_NON_MACRO}") + endif() + string(APPEND _CSE_SOURCE " +}\n") + unset(_CSE_CHECK_NON_MACRO) + + if(NOT CMAKE_REQUIRED_QUIET) + message(CHECK_START "Looking for ${SYMBOL}") + endif() + try_compile(${VARIABLE} + SOURCE_FROM_VAR "${SOURCEFILE}" _CSE_SOURCE + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + ${CHECK_SYMBOL_EXISTS_LINK_OPTIONS} + ${CHECK_SYMBOL_EXISTS_LIBS} + CMAKE_FLAGS + -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_SYMBOL_EXISTS_FLAGS} + "${CMAKE_SYMBOL_EXISTS_INCLUDES}" + "${_CSE_LINK_DIRECTORIES}" + ) + unset(_CSE_LINK_DIRECTORIES) + if(${VARIABLE}) + if(NOT CMAKE_REQUIRED_QUIET) + message(CHECK_PASS "found") + endif() + set(${VARIABLE} 1 CACHE INTERNAL "Have symbol ${SYMBOL}") + else() + if(NOT CMAKE_REQUIRED_QUIET) + message(CHECK_FAIL "not found") + endif() + set(${VARIABLE} "" CACHE INTERNAL "Have symbol ${SYMBOL}") + endif() + unset(_CSE_SOURCE) + endif() +endmacro() + +endblock() diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CheckTypeSizeMap.cmake.in b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CheckTypeSizeMap.cmake.in new file mode 100644 index 0000000000000000000000000000000000000000..1e73cfff1891347c332ac0f99bdc558ed2bc591c --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CheckTypeSizeMap.cmake.in @@ -0,0 +1 @@ +set(@var@_KEYS "@keys@")@code@ diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/DeployQt4.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/DeployQt4.cmake new file mode 100644 index 0000000000000000000000000000000000000000..9aa43838e535eab6ebb9a9424e878077d7f6488a --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/DeployQt4.cmake @@ -0,0 +1,399 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +DeployQt4 +--------- + +Functions to help assemble a standalone Qt4 executable. + +A collection of CMake utility functions useful for deploying Qt4 +executables. + +The following functions are provided by this module: + +:: + + write_qt4_conf + resolve_qt4_paths + fixup_qt4_executable + install_qt4_plugin_path + install_qt4_plugin + install_qt4_executable + +Requires CMake 2.6 or greater because it uses function and +PARENT_SCOPE. Also depends on BundleUtilities.cmake. + +:: + + write_qt4_conf( ) + +Writes a qt.conf file with the into . + +:: + + resolve_qt4_paths( []) + +Loop through list and if any don't exist resolve them +relative to the (if supplied) or the +CMAKE_INSTALL_PREFIX. + +:: + + fixup_qt4_executable( + [ ]) + +Copies Qt plugins, writes a Qt configuration file (if needed) and +fixes up a Qt4 executable using BundleUtilities so it is standalone +and can be drag-and-drop copied to another machine as long as all of +the system libraries are compatible. + + should point to the executable to be fixed-up. + + should contain a list of the names or paths of any Qt +plugins to be installed. + + will be passed to BundleUtilities and should be a list of any +already installed plugins, libraries or executables to also be +fixed-up. + + will be passed to BundleUtilities and should contain and +directories to be searched to find library dependencies. + + allows an custom plugins directory to be used. + + will force a qt.conf file to be written even if not +needed. + +:: + + install_qt4_plugin_path(plugin executable copy installed_plugin_path_var + ) + +Install (or copy) a resolved to the default plugins directory +(or ) relative to and store the result in +. + +If is set to TRUE then the plugins will be copied rather than +installed. This is to allow this module to be used at CMake time +rather than install time. + +If is set then anything installed will use this COMPONENT. + +:: + + install_qt4_plugin(plugin executable copy installed_plugin_path_var + ) + +Install (or copy) an unresolved to the default plugins +directory (or ) relative to and store the +result in . See documentation of +INSTALL_QT4_PLUGIN_PATH. + +:: + + install_qt4_executable( + [ ]) + +Installs Qt plugins, writes a Qt configuration file (if needed) and +fixes up a Qt4 executable using BundleUtilities so it is standalone +and can be drag-and-drop copied to another machine as long as all of +the system libraries are compatible. The executable will be fixed-up +at install time. is the COMPONENT used for bundle fixup +and plugin installation. See documentation of FIXUP_QT4_BUNDLE. +#]=======================================================================] + +# The functions defined in this file depend on the fixup_bundle function +# (and others) found in BundleUtilities.cmake + +set(DeployQt4_apple_plugins_dir "PlugIns") + +function(write_qt4_conf qt_conf_dir qt_conf_contents) + set(qt_conf_path "${qt_conf_dir}/qt.conf") + message(STATUS "Writing ${qt_conf_path}") + file(WRITE "${qt_conf_path}" "${qt_conf_contents}") +endfunction() + +function(resolve_qt4_paths paths_var) + unset(executable_path) + if(ARGC GREATER 1) + set(executable_path ${ARGV1}) + endif() + + set(paths_resolved) + foreach(path ${${paths_var}}) + if(EXISTS "${path}") + list(APPEND paths_resolved "${path}") + else() + if(${executable_path}) + list(APPEND paths_resolved "${executable_path}/${path}") + else() + list(APPEND paths_resolved "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${path}") + endif() + endif() + endforeach() + set(${paths_var} ${paths_resolved} PARENT_SCOPE) +endfunction() + +cmake_policy(GET CMP0080 _cmp0080_value) +if(NOT DEFINED CMAKE_GENERATOR OR NOT _cmp0080_value STREQUAL "NEW") + set(_CMP0080_SUPPRESS_WARNING TRUE) + include("${CMAKE_CURRENT_LIST_DIR}/BundleUtilities.cmake") + unset(_CMP0080_SUPPRESS_WARNING) + + function(fixup_qt4_executable executable) + cmake_policy(GET CMP0080 _cmp0080_value) + if(_cmp0080_value STREQUAL "" AND DEFINED CMAKE_GENERATOR) + _warn_cmp0080() + endif() + + unset(qtplugins) + if(ARGC GREATER 1) + set(qtplugins ${ARGV1}) + endif() + unset(libs) + if(ARGC GREATER 2) + set(libs ${ARGV2}) + endif() + unset(dirs) + if(ARGC GREATER 3) + set(dirs ${ARGV3}) + endif() + unset(plugins_dir) + if(ARGC GREATER 4) + set(plugins_dir ${ARGV4}) + endif() + unset(request_qt_conf) + if(ARGC GREATER 5) + set(request_qt_conf ${ARGV5}) + endif() + + message(STATUS "fixup_qt4_executable") + message(STATUS " executable='${executable}'") + message(STATUS " qtplugins='${qtplugins}'") + message(STATUS " libs='${libs}'") + message(STATUS " dirs='${dirs}'") + message(STATUS " plugins_dir='${plugins_dir}'") + message(STATUS " request_qt_conf='${request_qt_conf}'") + + if(QT_LIBRARY_DIR) + list(APPEND dirs "${QT_LIBRARY_DIR}") + endif() + if(QT_BINARY_DIR) + list(APPEND dirs "${QT_BINARY_DIR}") + endif() + + if(APPLE) + set(qt_conf_dir "${executable}/Contents/Resources") + set(executable_path "${executable}") + set(write_qt_conf TRUE) + if(NOT DEFINED plugins_dir) + set(plugins_dir "${DeployQt4_apple_plugins_dir}") + endif() + else() + get_filename_component(executable_path "${executable}" PATH) + if(NOT executable_path) + set(executable_path ".") + endif() + set(qt_conf_dir "${executable_path}") + set(write_qt_conf ${request_qt_conf}) + endif() + + foreach(plugin ${qtplugins}) + set(installed_plugin_path "") + install_qt4_plugin("${plugin}" "${executable}" 1 installed_plugin_path) + list(APPEND libs ${installed_plugin_path}) + endforeach() + + foreach(lib ${libs}) + if(NOT EXISTS "${lib}") + message(FATAL_ERROR "Library does not exist: ${lib}") + endif() + endforeach() + + resolve_qt4_paths(libs "${executable_path}") + + if(write_qt_conf) + set(qt_conf_contents "[Paths]\nPlugins = ${plugins_dir}") + write_qt4_conf("${qt_conf_dir}" "${qt_conf_contents}") + endif() + + fixup_bundle("${executable}" "${libs}" "${dirs}") + endfunction() +endif() + +function(install_qt4_plugin_path plugin executable copy installed_plugin_path_var) + unset(plugins_dir) + if(ARGC GREATER 4) + set(plugins_dir ${ARGV4}) + endif() + unset(component) + if(ARGC GREATER 5) + set(component ${ARGV5}) + endif() + unset(configurations) + if(ARGC GREATER 6) + set(configurations ${ARGV6}) + endif() + + if(EXISTS "${plugin}") + if(APPLE) + if(NOT plugins_dir) + set(plugins_dir "${DeployQt4_apple_plugins_dir}") + endif() + set(plugins_path "${executable}/Contents/${plugins_dir}") + else() + get_filename_component(plugins_path "${executable}" PATH) + if(NOT plugins_path) + set(plugins_path ".") + endif() + if(plugins_dir) + string(APPEND plugins_path "/${plugins_dir}") + endif() + endif() + + set(plugin_group "") + + get_filename_component(plugin_path "${plugin}" PATH) + get_filename_component(plugin_parent_path "${plugin_path}" PATH) + get_filename_component(plugin_parent_dir_name "${plugin_parent_path}" NAME) + get_filename_component(plugin_name "${plugin}" NAME) + string(TOLOWER "${plugin_parent_dir_name}" plugin_parent_dir_name) + + if("${plugin_parent_dir_name}" STREQUAL "plugins") + get_filename_component(plugin_group "${plugin_path}" NAME) + set(${plugin_group_var} "${plugin_group}") + endif() + string(APPEND plugins_path "/${plugin_group}") + + if(${copy}) + file(MAKE_DIRECTORY "${plugins_path}") + file(COPY "${plugin}" DESTINATION "${plugins_path}") + else() + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(configurations AND (_isMultiConfig OR CMAKE_BUILD_TYPE)) + set(configurations CONFIGURATIONS ${configurations}) + else() + unset(configurations) + endif() + install(FILES "${plugin}" DESTINATION "${plugins_path}" ${configurations} ${component}) + endif() + set(${installed_plugin_path_var} "${plugins_path}/${plugin_name}" PARENT_SCOPE) + endif() +endfunction() + +function(install_qt4_plugin plugin executable copy installed_plugin_path_var) + unset(plugins_dir) + if(ARGC GREATER 4) + set(plugins_dir ${ARGV4}) + endif() + unset(component) + if(ARGC GREATER 5) + set(component ${ARGV5}) + endif() + + if(EXISTS "${plugin}") + install_qt4_plugin_path("${plugin}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}") + else() + string(TOUPPER "QT_${plugin}_PLUGIN" plugin_var) + set(plugin_release_var "${plugin_var}_RELEASE") + set(plugin_debug_var "${plugin_var}_DEBUG") + set(plugin_release "${${plugin_release_var}}") + set(plugin_debug "${${plugin_debug_var}}") + if(DEFINED "${plugin_release_var}" AND DEFINED "${plugin_debug_var}" AND NOT EXISTS "${plugin_release}" AND NOT EXISTS "${plugin_debug}") + message(WARNING "Qt plugin \"${plugin}\" not recognized or found.") + endif() + if(NOT EXISTS "${${plugin_debug_var}}") + set(plugin_debug "${plugin_release}") + endif() + + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig OR CMAKE_BUILD_TYPE) + set(_RELEASE_CONFIGS ${CMAKE_CONFIGURATION_TYPES} "${CMAKE_BUILD_TYPE}") + if (_RELEASE_CONFIGS) + list(FILTER _RELEASE_CONFIGS EXCLUDE REGEX "[Dd][Ee][Bb][Uu][Gg]") + endif() + string(REPLACE ";" "|" _RELEASE_CONFIGS "${_RELEASE_CONFIGS}") + install_qt4_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}_release" "${plugins_dir}" "${component}" "${_RELEASE_CONFIGS}") + install_qt4_plugin_path("${plugin_debug}" "${executable}" "${copy}" "${installed_plugin_path_var}_debug" "${plugins_dir}" "${component}" "Debug") + unset(_RELEASE_CONFIGS) + + if(CMAKE_BUILD_TYPE MATCHES "^Debug$") + set(${installed_plugin_path_var} ${${installed_plugin_path_var}_debug}) + else() + set(${installed_plugin_path_var} ${${installed_plugin_path_var}_release}) + endif() + else() + install_qt4_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}") + endif() + endif() + set(${installed_plugin_path_var} ${${installed_plugin_path_var}} PARENT_SCOPE) +endfunction() + +function(install_qt4_executable executable) + unset(qtplugins) + if(ARGC GREATER 1) + set(qtplugins ${ARGV1}) + endif() + unset(libs) + if(ARGC GREATER 2) + set(libs ${ARGV2}) + endif() + unset(dirs) + if(ARGC GREATER 3) + set(dirs ${ARGV3}) + endif() + unset(plugins_dir) + if(ARGC GREATER 4) + set(plugins_dir ${ARGV4}) + endif() + unset(request_qt_conf) + if(ARGC GREATER 5) + set(request_qt_conf ${ARGV5}) + endif() + unset(component) + if(ARGC GREATER 6) + set(component ${ARGV6}) + endif() + + if(QT_LIBRARY_DIR) + list(APPEND dirs "${QT_LIBRARY_DIR}") + endif() + if(QT_BINARY_DIR) + list(APPEND dirs "${QT_BINARY_DIR}") + endif() + if(component) + set(component COMPONENT ${component}) + else() + unset(component) + endif() + + get_filename_component(executable_absolute "${executable}" ABSOLUTE) + if(EXISTS "${QT_QTCORE_LIBRARY_RELEASE}") + gp_file_type("${executable_absolute}" "${QT_QTCORE_LIBRARY_RELEASE}" qtcore_type) + elseif(EXISTS "${QT_QTCORE_LIBRARY_DEBUG}") + gp_file_type("${executable_absolute}" "${QT_QTCORE_LIBRARY_DEBUG}" qtcore_type) + endif() + if(qtcore_type STREQUAL "system") + set(qt_plugins_dir "") + endif() + + if(QT_IS_STATIC) + message(WARNING "Qt built statically: not installing plugins.") + else() + foreach(plugin ${qtplugins}) + set(installed_plugin_paths "") + install_qt4_plugin("${plugin}" "${executable}" 0 installed_plugin_paths "${plugins_dir}" "${component}") + list(APPEND libs ${installed_plugin_paths}) + endforeach() + endif() + + resolve_qt4_paths(libs "") + + install(CODE +"include(\"${CMAKE_CURRENT_FUNCTION_LIST_DIR}/DeployQt4.cmake\") +set(BU_CHMOD_BUNDLE_ITEMS TRUE) +FIXUP_QT4_EXECUTABLE(\"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${executable}\" \"\" \"${libs}\" \"${dirs}\" \"${plugins_dir}\" \"${request_qt_conf}\")" + ${component} + ) +endfunction() diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindASPELL.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindASPELL.cmake new file mode 100644 index 0000000000000000000000000000000000000000..c2d29e295d7f9d0011558a8015580b5b54005580 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindASPELL.cmake @@ -0,0 +1,32 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindASPELL +---------- + +Try to find ASPELL + +Once done this will define + +:: + + ASPELL_FOUND - system has ASPELL + ASPELL_EXECUTABLE - the ASPELL executable + ASPELL_INCLUDE_DIR - the ASPELL include directory + ASPELL_LIBRARIES - The libraries needed to use ASPELL + ASPELL_DEFINITIONS - Compiler switches required for using ASPELL +#]=======================================================================] + +find_path(ASPELL_INCLUDE_DIR aspell.h ) + +find_program(ASPELL_EXECUTABLE + NAMES aspell +) + +find_library(ASPELL_LIBRARIES NAMES aspell aspell-15 libaspell-15 libaspell) + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(ASPELL DEFAULT_MSG ASPELL_LIBRARIES ASPELL_INCLUDE_DIR ASPELL_EXECUTABLE) + +mark_as_advanced(ASPELL_INCLUDE_DIR ASPELL_LIBRARIES ASPELL_EXECUTABLE) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindBacktrace.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindBacktrace.cmake new file mode 100644 index 0000000000000000000000000000000000000000..4d3186c961324e1c8d639ef3bdded0950d11f4f9 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindBacktrace.cmake @@ -0,0 +1,113 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindBacktrace +------------- + +Find provider for `backtrace(3) `__. + +Checks if OS supports ``backtrace(3)`` via either ``libc`` or custom library. +This module defines the following variables: + +``Backtrace_HEADER`` + The header file needed for ``backtrace(3)``. Cached. + Could be forcibly set by user. +``Backtrace_INCLUDE_DIRS`` + The include directories needed to use ``backtrace(3)`` header. +``Backtrace_LIBRARIES`` + The libraries (linker flags) needed to use ``backtrace(3)``, if any. +``Backtrace_FOUND`` + Is set if and only if ``backtrace(3)`` support detected. + +The following cache variables are also available to set or use: + +``Backtrace_LIBRARY`` + The external library providing backtrace, if any. +``Backtrace_INCLUDE_DIR`` + The directory holding the ``backtrace(3)`` header. + +Typical usage is to generate of header file using :command:`configure_file` +with the contents like the following:: + + #cmakedefine01 Backtrace_FOUND + #if Backtrace_FOUND + # include <${Backtrace_HEADER}> + #endif + +And then reference that generated header file in actual source. + +Imported Targets +^^^^^^^^^^^^^^^^ + +.. versionadded:: 3.30 + +This module defines the following :prop_tgt:`IMPORTED` targets: + +``Backtrace::Backtrace`` + An interface library providing usage requirements for the found components. + +#]=======================================================================] + +include(CMakePushCheckState) +include(CheckSymbolExists) +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) + +# List of variables to be provided to find_package_handle_standard_args() +set(_Backtrace_STD_ARGS Backtrace_INCLUDE_DIR) + +if(Backtrace_HEADER) + set(_Backtrace_HEADER_TRY "${Backtrace_HEADER}") +else(Backtrace_HEADER) + set(_Backtrace_HEADER_TRY "execinfo.h") +endif(Backtrace_HEADER) + +find_path(Backtrace_INCLUDE_DIR "${_Backtrace_HEADER_TRY}") +set(Backtrace_INCLUDE_DIRS ${Backtrace_INCLUDE_DIR}) + +if (NOT DEFINED Backtrace_LIBRARY) + # First, check if we already have backtrace(), e.g., in libc + cmake_push_check_state(RESET) + set(CMAKE_REQUIRED_INCLUDES ${Backtrace_INCLUDE_DIRS}) + set(CMAKE_REQUIRED_QUIET ${Backtrace_FIND_QUIETLY}) + check_symbol_exists("backtrace" "${_Backtrace_HEADER_TRY}" _Backtrace_SYM_FOUND) + cmake_pop_check_state() +endif() + +if(_Backtrace_SYM_FOUND) + # Avoid repeating the message() call below each time CMake is run. + if(NOT Backtrace_FIND_QUIETLY AND NOT DEFINED Backtrace_LIBRARY) + message(STATUS "backtrace facility detected in default set of libraries") + endif() + set(Backtrace_LIBRARY "" CACHE FILEPATH "Library providing backtrace(3), empty for default set of libraries") +else() + # Check for external library, for non-glibc systems + if(Backtrace_INCLUDE_DIR) + # OpenBSD has libbacktrace renamed to libexecinfo + find_library(Backtrace_LIBRARY "execinfo") + else() # respect user wishes + set(_Backtrace_HEADER_TRY "backtrace.h") + find_path(Backtrace_INCLUDE_DIR ${_Backtrace_HEADER_TRY}) + find_library(Backtrace_LIBRARY "backtrace") + endif() + + # Prepend list with library path as it's more common practice + set(_Backtrace_STD_ARGS Backtrace_LIBRARY ${_Backtrace_STD_ARGS}) +endif() + +set(Backtrace_LIBRARIES ${Backtrace_LIBRARY}) +set(Backtrace_HEADER "${_Backtrace_HEADER_TRY}" CACHE STRING "Header providing backtrace(3) facility") + +find_package_handle_standard_args(Backtrace FOUND_VAR Backtrace_FOUND REQUIRED_VARS ${_Backtrace_STD_ARGS}) +mark_as_advanced(Backtrace_HEADER Backtrace_INCLUDE_DIR Backtrace_LIBRARY) + +if(Backtrace_FOUND AND NOT TARGET Backtrace::Backtrace) + if(Backtrace_LIBRARY) + add_library(Backtrace::Backtrace UNKNOWN IMPORTED) + set_property(TARGET Backtrace::Backtrace PROPERTY IMPORTED_LOCATION "${Backtrace_LIBRARY}") + else() + add_library(Backtrace::Backtrace INTERFACE IMPORTED) + target_link_libraries(Backtrace::Backtrace INTERFACE ${Backtrace_LIBRARIES}) + endif() + target_include_directories(Backtrace::Backtrace INTERFACE ${Backtrace_INCLUDE_DIRS}) +endif() diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindCUDAToolkit.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindCUDAToolkit.cmake new file mode 100644 index 0000000000000000000000000000000000000000..1e54b3d7ef7a346a2d52acf6435281a5d63f23d5 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindCUDAToolkit.cmake @@ -0,0 +1,1409 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindCUDAToolkit +--------------- + +.. versionadded:: 3.17 + +This script locates the NVIDIA CUDA toolkit and the associated libraries, but +does not require the ``CUDA`` language be enabled for a given project. This +module does not search for the NVIDIA CUDA Samples. + +.. versionadded:: 3.19 + QNX support. + +Search Behavior +^^^^^^^^^^^^^^^ + +The CUDA Toolkit search behavior uses the following order: + +1. If the ``CUDA`` language has been enabled we will use the directory + containing the compiler as the first search location for ``nvcc``. + +2. If the variable :variable:`CMAKE_CUDA_COMPILER _COMPILER>` or + the environment variable :envvar:`CUDACXX` is defined, it will be used + as the path to the ``nvcc`` executable. + +3. If the ``CUDAToolkit_ROOT`` cmake configuration variable (e.g., + ``-DCUDAToolkit_ROOT=/some/path``) *or* environment variable is defined, it + will be searched. If both an environment variable **and** a + configuration variable are specified, the *configuration* variable takes + precedence. + + The directory specified here must be such that the executable ``nvcc`` or + the appropriate ``version.txt`` or ``version.json`` file can be found + underneath the specified directory. + +4. If the CUDA_PATH environment variable is defined, it will be searched + for ``nvcc``. + +5. The user's path is searched for ``nvcc`` using :command:`find_program`. If + this is found, no subsequent search attempts are performed. Users are + responsible for ensuring that the first ``nvcc`` to show up in the path is + the desired path in the event that multiple CUDA Toolkits are installed. + +6. On Unix systems, if the symbolic link ``/usr/local/cuda`` exists, this is + used. No subsequent search attempts are performed. No default symbolic link + location exists for the Windows platform. + +7. The platform specific default install locations are searched. If exactly one + candidate is found, this is used. The default CUDA Toolkit install locations + searched are: + + +-------------+-------------------------------------------------------------+ + | Platform | Search Pattern | + +=============+=============================================================+ + | macOS | ``/Developer/NVIDIA/CUDA-X.Y`` | + +-------------+-------------------------------------------------------------+ + | Other Unix | ``/usr/local/cuda-X.Y`` | + +-------------+-------------------------------------------------------------+ + | Windows | ``C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\vX.Y`` | + +-------------+-------------------------------------------------------------+ + + Where ``X.Y`` would be a specific version of the CUDA Toolkit, such as + ``/usr/local/cuda-9.0`` or + ``C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0`` + + .. note:: + + When multiple CUDA Toolkits are installed in the default location of a + system (e.g., both ``/usr/local/cuda-9.0`` and ``/usr/local/cuda-10.0`` + exist but the ``/usr/local/cuda`` symbolic link does **not** exist), this + package is marked as **not** found. + + There are too many factors involved in making an automatic decision in + the presence of multiple CUDA Toolkits being installed. In this + situation, users are encouraged to either (1) set ``CUDAToolkit_ROOT`` or + (2) ensure that the correct ``nvcc`` executable shows up in ``$PATH`` for + :command:`find_program` to find. + +Arguments +^^^^^^^^^ + +``[]`` + The ``[]`` argument requests a version with which the package found + should be compatible. See :ref:`find_package version format ` + for more details. + +Options +^^^^^^^ + +``REQUIRED`` + If specified, configuration will error if a suitable CUDA Toolkit is not + found. + +``QUIET`` + If specified, the search for a suitable CUDA Toolkit will not produce any + messages. + +``EXACT`` + If specified, the CUDA Toolkit is considered found only if the exact + ``VERSION`` specified is recovered. + +Imported targets +^^^^^^^^^^^^^^^^ + +An :ref:`imported target ` named ``CUDA::toolkit`` is provided. + +This module defines :prop_tgt:`IMPORTED` targets for each +of the following libraries that are part of the CUDAToolkit: + +- :ref:`CUDA Runtime Library` +- :ref:`CUDA Driver Library` +- :ref:`cuBLAS` +- :ref:`cuDLA` +- :ref:`cuFile` +- :ref:`cuFFT` +- :ref:`cuRAND` +- :ref:`cuSOLVER` +- :ref:`cuSPARSE` +- :ref:`cuPTI` +- :ref:`NPP` +- :ref:`nvBLAS` +- :ref:`nvGRAPH` +- :ref:`nvJPEG` +- :ref:`nvidia-ML` +- :ref:`nvPTX Compiler` +- :ref:`nvRTC` +- :ref:`nvJitLink` +- :ref:`nvFatBin` +- :ref:`nvToolsExt` +- :ref:`nvtx3` +- :ref:`OpenCL` +- :ref:`cuLIBOS` + +.. _`cuda_toolkit_rt_lib`: + +CUDA Runtime Library +"""""""""""""""""""" + +The CUDA Runtime library (cudart) are what most applications will typically +need to link against to make any calls such as `cudaMalloc`, and `cudaFree`. + +Targets Created: + +- ``CUDA::cudart`` +- ``CUDA::cudart_static`` + +.. _`cuda_toolkit_driver_lib`: + +CUDA Driver Library +"""""""""""""""""""" + +The CUDA Driver library (cuda) are used by applications that use calls +such as `cuMemAlloc`, and `cuMemFree`. + +Targets Created: + +- ``CUDA::cuda_driver`` + +.. _`cuda_toolkit_cuBLAS`: + +cuBLAS +"""""" + +The `cuBLAS `_ library. + +Targets Created: + +- ``CUDA::cublas`` +- ``CUDA::cublas_static`` +- ``CUDA::cublasLt`` starting in CUDA 10.1 +- ``CUDA::cublasLt_static`` starting in CUDA 10.1 + +.. _`cuda_toolkit_cuDLA`: + +cuDLA +"""""" + +.. versionadded:: 3.27 + +The NVIDIA Tegra Deep Learning Accelerator `cuDLA `_ library. + +Targets Created: + +- ``CUDA::cudla`` starting in CUDA 11.6 + +.. _`cuda_toolkit_cuFile`: + +cuFile +"""""" + +.. versionadded:: 3.25 + +The NVIDIA GPUDirect Storage `cuFile `_ library. + +Targets Created: + +- ``CUDA::cuFile`` starting in CUDA 11.4 +- ``CUDA::cuFile_static`` starting in CUDA 11.4 +- ``CUDA::cuFile_rdma`` starting in CUDA 11.4 +- ``CUDA::cuFile_rdma_static`` starting in CUDA 11.4 + +.. _`cuda_toolkit_cuFFT`: + +cuFFT +""""" + +The `cuFFT `_ library. + +Targets Created: + +- ``CUDA::cufft`` +- ``CUDA::cufftw`` +- ``CUDA::cufft_static`` +- ``CUDA::cufft_static_nocallback`` starting in CUDA 9.2, requires CMake 3.23+ +- ``CUDA::cufftw_static`` + +cuRAND +"""""" + +The `cuRAND `_ library. + +Targets Created: + +- ``CUDA::curand`` +- ``CUDA::curand_static`` + +.. _`cuda_toolkit_cuSOLVER`: + +cuSOLVER +"""""""" + +The `cuSOLVER `_ library. + +Targets Created: + +- ``CUDA::cusolver`` +- ``CUDA::cusolver_static`` + +.. _`cuda_toolkit_cuSPARSE`: + +cuSPARSE +"""""""" + +The `cuSPARSE `_ library. + +Targets Created: + +- ``CUDA::cusparse`` +- ``CUDA::cusparse_static`` + +.. _`cuda_toolkit_cupti`: + +cupti +""""" + +The `NVIDIA CUDA Profiling Tools Interface `_. + +Targets Created: + +- ``CUDA::cupti`` +- ``CUDA::cupti_static`` + +.. versionadded:: 3.27 + + - ``CUDA::nvperf_host`` starting in CUDA 10.2 + - ``CUDA::nvperf_host_static`` starting in CUDA 10.2 + - ``CUDA::nvperf_target`` starting in CUDA 10.2 + - ``CUDA::pcsamplingutil`` starting in CUDA 11.3 + +.. _`cuda_toolkit_NPP`: + +NPP +""" + +The `NPP `_ libraries. + +Targets Created: + +- `nppc`: + + - ``CUDA::nppc`` + - ``CUDA::nppc_static`` + +- `nppial`: Arithmetic and logical operation functions in `nppi_arithmetic_and_logical_operations.h` + + - ``CUDA::nppial`` + - ``CUDA::nppial_static`` + +- `nppicc`: Color conversion and sampling functions in `nppi_color_conversion.h` + + - ``CUDA::nppicc`` + - ``CUDA::nppicc_static`` + +- `nppicom`: JPEG compression and decompression functions in `nppi_compression_functions.h` + Removed starting in CUDA 11.0, use :ref:`nvJPEG` instead. + + - ``CUDA::nppicom`` + - ``CUDA::nppicom_static`` + +- `nppidei`: Data exchange and initialization functions in `nppi_data_exchange_and_initialization.h` + + - ``CUDA::nppidei`` + - ``CUDA::nppidei_static`` + +- `nppif`: Filtering and computer vision functions in `nppi_filter_functions.h` + + - ``CUDA::nppif`` + - ``CUDA::nppif_static`` + +- `nppig`: Geometry transformation functions found in `nppi_geometry_transforms.h` + + - ``CUDA::nppig`` + - ``CUDA::nppig_static`` + +- `nppim`: Morphological operation functions found in `nppi_morphological_operations.h` + + - ``CUDA::nppim`` + - ``CUDA::nppim_static`` + +- `nppist`: Statistics and linear transform in `nppi_statistics_functions.h` and `nppi_linear_transforms.h` + + - ``CUDA::nppist`` + - ``CUDA::nppist_static`` + +- `nppisu`: Memory support functions in `nppi_support_functions.h` + + - ``CUDA::nppisu`` + - ``CUDA::nppisu_static`` + +- `nppitc`: Threshold and compare operation functions in `nppi_threshold_and_compare_operations.h` + + - ``CUDA::nppitc`` + - ``CUDA::nppitc_static`` + +- `npps`: + + - ``CUDA::npps`` + - ``CUDA::npps_static`` + +.. _`cuda_toolkit_nvBLAS`: + +nvBLAS +"""""" + +The `nvBLAS `_ libraries. +This is a shared library only. + +Targets Created: + +- ``CUDA::nvblas`` + +.. _`cuda_toolkit_nvGRAPH`: + +nvGRAPH +""""""" + +The `nvGRAPH `_ library. +Removed starting in CUDA 11.0 + +Targets Created: + +- ``CUDA::nvgraph`` +- ``CUDA::nvgraph_static`` + + +.. _`cuda_toolkit_nvJPEG`: + +nvJPEG +"""""" + +The `nvJPEG `_ library. +Introduced in CUDA 10. + +Targets Created: + +- ``CUDA::nvjpeg`` +- ``CUDA::nvjpeg_static`` + +.. _`cuda_toolkit_nvPTX`: + +nvPTX Compiler +"""""""""""""" + +.. versionadded:: 3.25 + +The `nvPTX `_ (PTX Compilation) library. +The PTX Compiler APIs are a set of APIs which can be used to compile a PTX program into GPU assembly code. +Introduced in CUDA 11.1 +This is a static library only. + +Targets Created: + +- ``CUDA::nvptxcompiler_static`` starting in CUDA 11.1 + +.. _`cuda_toolkit_nvRTC`: + +nvRTC +""""" + +The `nvRTC `_ (Runtime Compilation) library. + +Targets Created: + +- ``CUDA::nvrtc`` + +.. versionadded:: 3.26 + + - ``CUDA::nvrtc_builtins`` + - ``CUDA::nvrtc_static`` starting in CUDA 11.5 + - ``CUDA::nvrtc_builtins_static`` starting in CUDA 11.5 + +.. _`cuda_toolkit_nvjitlink`: + +nvJitLink +""""""""" + +The `nvJItLink `_ (Runtime LTO Linking) library. + +Targets Created: + +- ``CUDA::nvJitLink`` starting in CUDA 12.0 +- ``CUDA::nvJitLink_static`` starting in CUDA 12.0 + +.. _`cuda_toolkit_nvfatbin`: + +nvFatBin +""""""""" + +.. versionadded:: 3.30 + +The `nvFatBin `_ (Runtime fatbin creation) library. + +Targets Created: + +- ``CUDA::nvfatbin`` starting in CUDA 12.4 +- ``CUDA::nvfatbin_static`` starting in CUDA 12.4 + +.. _`cuda_toolkit_nvml`: + +nvidia-ML +""""""""" + +The `NVIDIA Management Library `_. + +Targets Created: + +- ``CUDA::nvml`` +- ``CUDA::nvml_static`` starting in CUDA 12.4 + +.. versionadded:: 3.31 + Added ``CUDA::nvml_static``. + +.. _`cuda_toolkit_nvToolsExt`: + +nvToolsExt +"""""""""" + +.. deprecated:: 3.25 With CUDA 10.0+, use :ref:`nvtx3 `. + +The `NVIDIA Tools Extension `_. +This is a shared library only. + +Targets Created: + +- ``CUDA::nvToolsExt`` + +.. _`cuda_toolkit_nvtx3`: + +nvtx3 +""""" + +.. versionadded:: 3.25 + +The header-only `NVIDIA Tools Extension Library `_. +Introduced in CUDA 10.0. + +Targets created: + +- ``CUDA::nvtx3`` + +.. _`cuda_toolkit_opencl`: + +OpenCL +"""""" + +The `NVIDIA OpenCL Library `_. +This is a shared library only. + +Targets Created: + +- ``CUDA::OpenCL`` + +.. _`cuda_toolkit_cuLIBOS`: + +cuLIBOS +""""""" + +The cuLIBOS library is a backend thread abstraction layer library which is +static only. The ``CUDA::cublas_static``, ``CUDA::cusparse_static``, +``CUDA::cufft_static``, ``CUDA::curand_static``, and (when implemented) NPP +libraries all automatically have this dependency linked. + +Target Created: + +- ``CUDA::culibos`` + +**Note**: direct usage of this target by consumers should not be necessary. + +.. _`cuda_toolkit_cuRAND`: + + + +Result variables +^^^^^^^^^^^^^^^^ + +``CUDAToolkit_FOUND`` + A boolean specifying whether or not the CUDA Toolkit was found. + +``CUDAToolkit_VERSION`` + The exact version of the CUDA Toolkit found (as reported by + ``nvcc --version``, ``version.txt``, or ``version.json``). + +``CUDAToolkit_VERSION_MAJOR`` + The major version of the CUDA Toolkit. + +``CUDAToolkit_VERSION_MINOR`` + The minor version of the CUDA Toolkit. + +``CUDAToolkit_VERSION_PATCH`` + The patch version of the CUDA Toolkit. + +``CUDAToolkit_BIN_DIR`` + The path to the CUDA Toolkit library directory that contains the CUDA + executable ``nvcc``. + +``CUDAToolkit_INCLUDE_DIRS`` + List of paths to all the CUDA Toolkit folders containing header files + required to compile a project linking against CUDA. + +``CUDAToolkit_LIBRARY_DIR`` + The path to the CUDA Toolkit library directory that contains the CUDA + Runtime library ``cudart``. + +``CUDAToolkit_LIBRARY_ROOT`` + .. versionadded:: 3.18 + + The path to the CUDA Toolkit directory containing the nvvm directory and + either version.txt or version.json. + +``CUDAToolkit_TARGET_DIR`` + The path to the CUDA Toolkit directory including the target architecture + when cross-compiling. When not cross-compiling this will be equivalent to + the parent directory of ``CUDAToolkit_BIN_DIR``. + +``CUDAToolkit_NVCC_EXECUTABLE`` + The path to the NVIDIA CUDA compiler ``nvcc``. Note that this path may + **not** be the same as + :variable:`CMAKE_CUDA_COMPILER _COMPILER>`. ``nvcc`` must be + found to determine the CUDA Toolkit version as well as determining other + features of the Toolkit. This variable is set for the convenience of + modules that depend on this one. + + +#]=======================================================================] + +# NOTE: much of this was simply extracted from FindCUDA.cmake. + +# James Bigler, NVIDIA Corp (nvidia.com - jbigler) +# Abe Stephens, SCI Institute -- http://www.sci.utah.edu/~abe/FindCuda.html +# +# Copyright (c) 2008 - 2009 NVIDIA Corporation. All rights reserved. +# +# Copyright (c) 2007-2009 +# Scientific Computing and Imaging Institute, University of Utah +# +# This code is licensed under the MIT License. See the FindCUDA.cmake script +# for the text of the license. + +# The MIT License +# +# License for the specific language governing rights and limitations under +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### + +function(_CUDAToolkit_build_include_dirs result_variable default_paths_variable) + set(content "${${default_paths_variable}}") + set(${result_variable} "${content}" PARENT_SCOPE) +endfunction() + +function(_CUDAToolkit_build_library_dirs result_variable default_paths_variable) + set(content "${${default_paths_variable}}") + set(${result_variable} "${content}" PARENT_SCOPE) +endfunction() + +# The toolkit is located during compiler detection for CUDA and stored in CMakeCUDACompiler.cmake as +# - CMAKE_CUDA_COMPILER_TOOLKIT_ROOT +# - CMAKE_CUDA_COMPILER_LIBRARY_ROOT +# - CMAKE_CUDA_COMPILER_LIBRARY_DIRECTORIES_FROM_IMPLICIT_LIBRARIES +# - CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES +# We compute the rest based on those here to avoid re-searching and to avoid finding a possibly +# different installation. +if(CMAKE_CUDA_COMPILER_TOOLKIT_ROOT) + set(CUDAToolkit_ROOT_DIR "${CMAKE_CUDA_COMPILER_TOOLKIT_ROOT}") + set(CUDAToolkit_LIBRARY_ROOT "${CMAKE_CUDA_COMPILER_LIBRARY_ROOT}") + _CUDAToolkit_build_library_dirs(CUDAToolkit_IMPLICIT_LIBRARY_DIRECTORIES CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES) + _CUDAToolkit_build_include_dirs(CUDAToolkit_INCLUDE_DIRECTORIES CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES) + set(CUDAToolkit_BIN_DIR "${CUDAToolkit_ROOT_DIR}/bin") + set(CUDAToolkit_NVCC_EXECUTABLE "${CUDAToolkit_BIN_DIR}/nvcc${CMAKE_EXECUTABLE_SUFFIX}") + set(CUDAToolkit_VERSION "${CMAKE_CUDA_COMPILER_TOOLKIT_VERSION}") + + if(CUDAToolkit_VERSION MATCHES [=[([0-9]+)\.([0-9]+)\.([0-9]+)]=]) + set(CUDAToolkit_VERSION_MAJOR "${CMAKE_MATCH_1}") + set(CUDAToolkit_VERSION_MINOR "${CMAKE_MATCH_2}") + set(CUDAToolkit_VERSION_PATCH "${CMAKE_MATCH_3}") + endif() +else() + function(_CUDAToolkit_find_root_dir ) + cmake_parse_arguments(arg "COMPILER_PATHS" "" "SEARCH_PATHS;FIND_FLAGS" ${ARGN}) + + if(NOT CUDAToolkit_BIN_DIR) + if(arg_COMPILER_PATHS) + # need to find parent dir, since this could clang and not nvcc + if(EXISTS "${CMAKE_CUDA_COMPILER}") + get_filename_component(possible_nvcc_path "${CMAKE_CUDA_COMPILER}" PROGRAM PROGRAM_ARGS CUDAToolkit_compiler_args) + get_filename_component(possible_nvcc_path "${possible_nvcc_path}" DIRECTORY) + elseif(EXISTS "$ENV{CUDACXX}") + get_filename_component(possible_nvcc_path "$ENV{CUDACXX}" PROGRAM PROGRAM_ARGS CUDAToolkit_compiler_args) + get_filename_component(possible_nvcc_path "${possible_nvcc_path}" DIRECTORY) + endif() + if(possible_nvcc_path) + find_program(CUDAToolkit_NVCC_EXECUTABLE + NAMES nvcc nvcc.exe + NO_DEFAULT_PATH + PATHS ${possible_nvcc_path} + ) + endif() + endif() + + if(NOT CUDAToolkit_SENTINEL_FILE) + find_program(CUDAToolkit_NVCC_EXECUTABLE + NAMES nvcc nvcc.exe + PATHS ${arg_SEARCH_PATHS} + ${arg_FIND_FLAGS} + ) + endif() + + if(NOT CUDAToolkit_NVCC_EXECUTABLE) + find_file(CUDAToolkit_SENTINEL_FILE + NAMES version.txt version.json + PATHS ${arg_SEARCH_PATHS} + NO_DEFAULT_PATH + ) + endif() + + if(EXISTS "${CUDAToolkit_NVCC_EXECUTABLE}") + # If NVCC exists then invoke it to find the toolkit location. + # This allows us to support wrapper scripts (e.g. ccache or colornvcc), CUDA Toolkit, + # NVIDIA HPC SDK, and distro's splayed layouts + execute_process(COMMAND ${CUDAToolkit_NVCC_EXECUTABLE} "-v" "__cmake_determine_cuda" + OUTPUT_VARIABLE _CUDA_NVCC_OUT ERROR_VARIABLE _CUDA_NVCC_OUT) + message(CONFIGURE_LOG + "Executed nvcc to extract CUDAToolkit information:\n${_CUDA_NVCC_OUT}\n\n") + if(_CUDA_NVCC_OUT MATCHES "\\#\\$ TOP=([^\r\n]*)") + get_filename_component(CUDAToolkit_BIN_DIR "${CMAKE_MATCH_1}/bin" ABSOLUTE) + message(CONFIGURE_LOG + "Parsed CUDAToolkit nvcc location:\n${CUDAToolkit_BIN_DIR}\n\n") + else() + get_filename_component(CUDAToolkit_BIN_DIR "${CUDAToolkit_NVCC_EXECUTABLE}" DIRECTORY) + endif() + if(_CUDA_NVCC_OUT MATCHES "\\#\\$ INCLUDES=([^\r\n]*)") + separate_arguments(_nvcc_output NATIVE_COMMAND "${CMAKE_MATCH_1}") + foreach(line IN LISTS _nvcc_output) + string(REGEX REPLACE "^-I" "" line "${line}") + get_filename_component(line "${line}" ABSOLUTE) + list(APPEND _cmake_CUDAToolkit_include_directories "${line}") + endforeach() + message(CONFIGURE_LOG + "Parsed CUDAToolkit nvcc implicit include information:\n${_cmake_CUDAToolkit_include_directories}\n\n") + + set(_cmake_CUDAToolkit_include_directories "${_cmake_CUDAToolkit_include_directories}" CACHE INTERNAL "CUDAToolkit internal list of include directories") + endif() + if(_CUDA_NVCC_OUT MATCHES "\\#\\$ LIBRARIES=([^\r\n]*)") + include(${CMAKE_ROOT}/Modules/CMakeParseImplicitLinkInfo.cmake) + set(_nvcc_link_line "cuda-fake-ld ${CMAKE_MATCH_1}") + CMAKE_PARSE_IMPLICIT_LINK_INFO("${_nvcc_link_line}" + _cmake_CUDAToolkit_implicit_link_libs + _cmake_CUDAToolkit_implicit_link_directories + _cmake_CUDAToolkit_implicit_frameworks + _nvcc_log + "${CMAKE_CUDA_IMPLICIT_OBJECT_REGEX}" + LANGUAGE CUDA) + message(CONFIGURE_LOG + "Parsed CUDAToolkit nvcc implicit link information:\n${_nvcc_log}\n${_cmake_CUDAToolkit_implicit_link_directories}\n\n") + unset(_nvcc_link_line) + unset(_cmake_CUDAToolkit_implicit_link_libs) + unset(_cmake_CUDAToolkit_implicit_frameworks) + + set(_cmake_CUDAToolkit_implicit_link_directories "${_cmake_CUDAToolkit_implicit_link_directories}" CACHE INTERNAL "CUDAToolkit internal list of implicit link directories") + endif() + unset(_CUDA_NVCC_OUT) + + set(CUDAToolkit_BIN_DIR "${CUDAToolkit_BIN_DIR}" CACHE PATH "" FORCE) + mark_as_advanced(CUDAToolkit_BIN_DIR) + endif() + + if(CUDAToolkit_SENTINEL_FILE) + get_filename_component(CUDAToolkit_BIN_DIR ${CUDAToolkit_SENTINEL_FILE} DIRECTORY ABSOLUTE) + set(CUDAToolkit_BIN_DIR "${CUDAToolkit_BIN_DIR}/bin") + + set(CUDAToolkit_BIN_DIR "${CUDAToolkit_BIN_DIR}" CACHE PATH "" FORCE) + mark_as_advanced(CUDAToolkit_BIN_DIR) + endif() + endif() + + if(DEFINED _cmake_CUDAToolkit_include_directories) + _CUDAToolkit_build_include_dirs(_cmake_CUDAToolkit_contents _cmake_CUDAToolkit_include_directories) + set(CUDAToolkit_INCLUDE_DIRECTORIES "${_cmake_CUDAToolkit_contents}" PARENT_SCOPE) + endif() + if(DEFINED _cmake_CUDAToolkit_implicit_link_directories) + _CUDAToolkit_build_library_dirs(_cmake_CUDAToolkit_contents _cmake_CUDAToolkit_implicit_link_directories) + set(CUDAToolkit_IMPLICIT_LIBRARY_DIRECTORIES "${_cmake_CUDAToolkit_contents}" PARENT_SCOPE) + endif() + + if(CUDAToolkit_BIN_DIR) + get_filename_component(CUDAToolkit_ROOT_DIR ${CUDAToolkit_BIN_DIR} DIRECTORY ABSOLUTE) + set(CUDAToolkit_ROOT_DIR "${CUDAToolkit_ROOT_DIR}" PARENT_SCOPE) + endif() + + endfunction() + + function(_CUDAToolkit_find_version_file result_variable) + # We first check for a non-scattered installation to prefer it over a scattered installation. + set(version_files version.txt version.json) + foreach(vf IN LISTS version_files) + if(CUDAToolkit_ROOT AND EXISTS "${CUDAToolkit_ROOT}/${vf}") + set(${result_variable} "${CUDAToolkit_ROOT}/${vf}" PARENT_SCOPE) + break() + elseif(CUDAToolkit_ROOT_DIR AND EXISTS "${CUDAToolkit_ROOT_DIR}/${vf}") + set(${result_variable} "${CUDAToolkit_ROOT_DIR}/${vf}" PARENT_SCOPE) + break() + elseif(CMAKE_SYSROOT_LINK AND EXISTS "${CMAKE_SYSROOT_LINK}/usr/lib/cuda/${vf}") + set(${result_variable} "${CMAKE_SYSROOT_LINK}/usr/lib/cuda/${vf}" PARENT_SCOPE) + break() + elseif(EXISTS "${CMAKE_SYSROOT}/usr/lib/cuda/${vf}") + set(${result_variable} "${CMAKE_SYSROOT}/usr/lib/cuda/${vf}" PARENT_SCOPE) + break() + endif() + endforeach() + endfunction() + + function(_CUDAToolkit_parse_version_file version_file) + if(version_file) + file(READ "${version_file}" file_conents) + cmake_path(GET version_file EXTENSION LAST_ONLY version_ext) + if(version_ext STREQUAL ".json") + string(JSON cuda_version_info GET "${file_conents}" "cuda" "version") + set(cuda_version_match_regex [=[([0-9]+)\.([0-9]+)\.([0-9]+)]=]) + elseif(version_ext STREQUAL ".txt") + set(cuda_version_info "${file_conents}") + set(cuda_version_match_regex [=[CUDA Version ([0-9]+)\.([0-9]+)\.([0-9]+)]=]) + endif() + + if(cuda_version_info MATCHES "${cuda_version_match_regex}") + set(CUDAToolkit_VERSION_MAJOR "${CMAKE_MATCH_1}" PARENT_SCOPE) + set(CUDAToolkit_VERSION_MINOR "${CMAKE_MATCH_2}" PARENT_SCOPE) + set(CUDAToolkit_VERSION_PATCH "${CMAKE_MATCH_3}" PARENT_SCOPE) + set(CUDAToolkit_VERSION "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}" PARENT_SCOPE) + endif() + endif() + endfunction() + + # For NVCC we can easily deduce the SDK binary directory from the compiler path. + if(CMAKE_CUDA_COMPILER_LOADED AND NOT CUDAToolkit_BIN_DIR AND CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA") + get_filename_component(CUDAToolkit_BIN_DIR "${CMAKE_CUDA_COMPILER}" DIRECTORY) + set(CUDAToolkit_BIN_DIR "${CUDAToolkit_BIN_DIR}" CACHE PATH "") + # Try language provided path first. + _CUDAToolkit_find_root_dir(SEARCH_PATHS "${CUDAToolkit_BIN_DIR}" FIND_FLAGS NO_DEFAULT_PATH) + mark_as_advanced(CUDAToolkit_BIN_DIR) + endif() + + # Try user provided path + _CUDAToolkit_find_root_dir(COMPILER_PATHS) + if(NOT CUDAToolkit_ROOT_DIR AND CUDAToolkit_ROOT) + _CUDAToolkit_find_root_dir(SEARCH_PATHS "${CUDAToolkit_ROOT}" FIND_FLAGS PATH_SUFFIXES bin NO_DEFAULT_PATH) + endif() + if(NOT CUDAToolkit_ROOT_DIR) + _CUDAToolkit_find_root_dir(FIND_FLAGS PATHS ENV CUDA_PATH PATH_SUFFIXES bin) + endif() + + # If the user specified CUDAToolkit_ROOT but the toolkit could not be found, this is an error. + if(NOT CUDAToolkit_ROOT_DIR AND (DEFINED CUDAToolkit_ROOT OR DEFINED ENV{CUDAToolkit_ROOT})) + # Declare error messages now, print later depending on find_package args. + set(fail_base "Could not find nvcc executable in path specified by") + set(cuda_root_fail "${fail_base} CUDAToolkit_ROOT=${CUDAToolkit_ROOT}") + set(env_cuda_root_fail "${fail_base} environment variable CUDAToolkit_ROOT=$ENV{CUDAToolkit_ROOT}") + + if(CUDAToolkit_FIND_REQUIRED) + if(DEFINED CUDAToolkit_ROOT) + message(FATAL_ERROR ${cuda_root_fail}) + elseif(DEFINED ENV{CUDAToolkit_ROOT}) + message(FATAL_ERROR ${env_cuda_root_fail}) + endif() + else() + if(NOT CUDAToolkit_FIND_QUIETLY) + if(DEFINED CUDAToolkit_ROOT) + message(STATUS ${cuda_root_fail}) + elseif(DEFINED ENV{CUDAToolkit_ROOT}) + message(STATUS ${env_cuda_root_fail}) + endif() + endif() + set(CUDAToolkit_FOUND FALSE) + unset(fail_base) + unset(cuda_root_fail) + unset(env_cuda_root_fail) + return() + endif() + endif() + + # CUDAToolkit_ROOT cmake / env variable not specified, try platform defaults. + # + # - Linux: /usr/local/cuda-X.Y + # - macOS: /Developer/NVIDIA/CUDA-X.Y + # - Windows: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\vX.Y + # + # We will also search the default symlink location /usr/local/cuda first since + # if CUDAToolkit_ROOT is not specified, it is assumed that the symlinked + # directory is the desired location. + if(NOT CUDAToolkit_ROOT_DIR) + if(UNIX) + if(NOT APPLE) + set(platform_base "/usr/local/cuda-") + else() + set(platform_base "/Developer/NVIDIA/CUDA-") + endif() + else() + set(platform_base "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v") + endif() + + # Build out a descending list of possible cuda installations, e.g. + file(GLOB possible_paths "${platform_base}*") + # Iterate the glob results and create a descending list. + set(versions) + foreach(p ${possible_paths}) + # Extract version number from end of string + string(REGEX MATCH "[0-9][0-9]?\\.[0-9]$" p_version ${p}) + if(IS_DIRECTORY ${p} AND p_version) + list(APPEND versions ${p_version}) + endif() + endforeach() + + # Sort numerically in descending order, so we try the newest versions first. + list(SORT versions COMPARE NATURAL ORDER DESCENDING) + + # With a descending list of versions, populate possible paths to search. + set(search_paths) + foreach(v ${versions}) + list(APPEND search_paths "${platform_base}${v}") + endforeach() + + # Force the global default /usr/local/cuda to the front on Unix. + if(UNIX) + list(INSERT search_paths 0 "/usr/local/cuda") + endif() + + # Now search for the toolkit again using the platform default search paths. + _CUDAToolkit_find_root_dir(SEARCH_PATHS "${search_paths}" FIND_FLAGS PATH_SUFFIXES bin) + + # We are done with these variables now, cleanup for caller. + unset(platform_base) + unset(possible_paths) + unset(versions) + unset(search_paths) + + if(NOT CUDAToolkit_ROOT_DIR) + if(CUDAToolkit_FIND_REQUIRED) + message(FATAL_ERROR "Could not find nvcc, please set CUDAToolkit_ROOT.") + elseif(NOT CUDAToolkit_FIND_QUIETLY) + message(STATUS "Could not find nvcc, please set CUDAToolkit_ROOT.") + endif() + + set(CUDAToolkit_FOUND FALSE) + return() + endif() + endif() + + _CUDAToolkit_find_version_file( _CUDAToolkit_version_file ) + if(_CUDAToolkit_version_file) + # CUDAToolkit_LIBRARY_ROOT contains the device library and version file. + get_filename_component(CUDAToolkit_LIBRARY_ROOT "${_CUDAToolkit_version_file}" DIRECTORY ABSOLUTE) + endif() + unset(_CUDAToolkit_version_file) + + if(CUDAToolkit_NVCC_EXECUTABLE AND + CMAKE_CUDA_COMPILER_VERSION AND + CUDAToolkit_NVCC_EXECUTABLE STREQUAL CMAKE_CUDA_COMPILER) + # Need to set these based off the already computed CMAKE_CUDA_COMPILER_VERSION value + # This if statement will always match, but is used to provide variables for MATCH 1,2,3... + if(CMAKE_CUDA_COMPILER_VERSION MATCHES [=[([0-9]+)\.([0-9]+)\.([0-9]+)]=]) + set(CUDAToolkit_VERSION_MAJOR "${CMAKE_MATCH_1}") + set(CUDAToolkit_VERSION_MINOR "${CMAKE_MATCH_2}") + set(CUDAToolkit_VERSION_PATCH "${CMAKE_MATCH_3}") + set(CUDAToolkit_VERSION "${CMAKE_CUDA_COMPILER_VERSION}") + endif() + elseif(CUDAToolkit_NVCC_EXECUTABLE) + # Compute the version by invoking nvcc + execute_process(COMMAND ${CUDAToolkit_NVCC_EXECUTABLE} "--version" OUTPUT_VARIABLE NVCC_OUT) + if(NVCC_OUT MATCHES [=[ V([0-9]+)\.([0-9]+)\.([0-9]+)]=]) + set(CUDAToolkit_VERSION_MAJOR "${CMAKE_MATCH_1}") + set(CUDAToolkit_VERSION_MINOR "${CMAKE_MATCH_2}") + set(CUDAToolkit_VERSION_PATCH "${CMAKE_MATCH_3}") + set(CUDAToolkit_VERSION "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}") + endif() + unset(NVCC_OUT) + else() + _CUDAToolkit_find_version_file(version_file) + _CUDAToolkit_parse_version_file("${version_file}") + endif() +endif() + +# Find target directory when crosscompiling. +if(CMAKE_CROSSCOMPILING) + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7-a") + # Support for NVPACK + set(CUDAToolkit_TARGET_NAMES "armv7-linux-androideabi") + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm") + set(CUDAToolkit_TARGET_NAMES "armv7-linux-gnueabihf") + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64") + if(ANDROID_ARCH_NAME STREQUAL "arm64") + set(CUDAToolkit_TARGET_NAMES "aarch64-linux-androideabi") + elseif (CMAKE_SYSTEM_NAME STREQUAL "QNX") + set(CUDAToolkit_TARGET_NAMES "aarch64-qnx") + else() + set(CUDAToolkit_TARGET_NAMES "aarch64-linux" "sbsa-linux") + endif() + elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + set(CUDAToolkit_TARGET_NAMES "x86_64-linux") + endif() + + foreach(CUDAToolkit_TARGET_NAME IN LISTS CUDAToolkit_TARGET_NAMES) + if(EXISTS "${CUDAToolkit_ROOT_DIR}/targets/${CUDAToolkit_TARGET_NAME}") + set(CUDAToolkit_TARGET_DIR "${CUDAToolkit_ROOT_DIR}/targets/${CUDAToolkit_TARGET_NAME}") + # add known CUDA target root path to the set of directories we search for programs, libraries and headers + list(PREPEND CMAKE_FIND_ROOT_PATH "${CUDAToolkit_TARGET_DIR}") + + # Mark that we need to pop the root search path changes after we have + # found all cuda libraries so that searches for our cross-compilation + # libraries work when another cuda sdk is in CMAKE_PREFIX_PATH or + # PATh + set(_CUDAToolkit_Pop_ROOT_PATH True) + break() + endif() + endforeach() +endif() + +# Determine windows search path suffix for libraries +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") + if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64") + set(_CUDAToolkit_win_search_dirs lib/x64) + set(_CUDAToolkit_win_stub_search_dirs lib/x64/stubs) + endif() +endif() + +# If not already set we can simply use the toolkit root or it's a scattered installation. +if(NOT CUDAToolkit_TARGET_DIR) + # Not cross compiling + set(CUDAToolkit_TARGET_DIR "${CUDAToolkit_ROOT_DIR}") + # Now that we have the real ROOT_DIR, find components inside it. + list(APPEND CMAKE_PREFIX_PATH ${CUDAToolkit_ROOT_DIR}) + + # Mark that we need to pop the prefix path changes after we have + # found the cudart library. + set(_CUDAToolkit_Pop_Prefix True) +endif() + + +# We don't need to verify the cuda_runtime header when we are using `nvcc` include paths +# as the compiler being enabled means the header was found +if(NOT CUDAToolkit_INCLUDE_DIRECTORIES) + # Otherwise use CUDAToolkit_TARGET_DIR to guess where the `cuda_runtime.h` is located + # On a scattered installation /usr, on a non-scattered something like /usr/local/cuda or /usr/local/cuda-10.2/targets/aarch64-linux. + if(EXISTS "${CUDAToolkit_TARGET_DIR}/include/cuda_runtime.h") + set(CUDAToolkit_INCLUDE_DIRECTORIES "${CUDAToolkit_TARGET_DIR}/include") + else() + message(STATUS "Unable to find cuda_runtime.h in \"${CUDAToolkit_TARGET_DIR}/include\" for CUDAToolkit_INCLUDE_DIRECTORIES.") + endif() +endif() + +# The NVHPC layout moves math library headers and libraries to a sibling directory and it could be nested under +# the version of the CUDA toolchain +# Create a separate variable so this directory can be selectively added to math targets. +find_path(CUDAToolkit_CUBLAS_INCLUDE_DIR cublas_v2.h PATHS + ${CUDAToolkit_INCLUDE_DIRECTORIES} + NO_DEFAULT_PATH) + +if(NOT CUDAToolkit_CUBLAS_INCLUDE_DIR) + file(REAL_PATH "${CUDAToolkit_TARGET_DIR}" CUDAToolkit_MATH_INCLUDE_DIR) + cmake_path(APPEND CUDAToolkit_MATH_INCLUDE_DIR "../../math_libs/") + if(EXISTS "${CUDAToolkit_MATH_INCLUDE_DIR}/${CUDAToolkit_VERSION_MAJOR}.${CUDAToolkit_VERSION_MINOR}/") + cmake_path(APPEND CUDAToolkit_MATH_INCLUDE_DIR "${CUDAToolkit_VERSION_MAJOR}.${CUDAToolkit_VERSION_MINOR}/") + endif() + cmake_path(APPEND CUDAToolkit_MATH_INCLUDE_DIR "include") + cmake_path(NORMAL_PATH CUDAToolkit_MATH_INCLUDE_DIR) + + find_path(CUDAToolkit_CUBLAS_INCLUDE_DIR cublas_v2.h PATHS + ${CUDAToolkit_INCLUDE_DIRECTORIES} + ) + if(CUDAToolkit_CUBLAS_INCLUDE_DIR) + list(APPEND CUDAToolkit_INCLUDE_DIRECTORIES "${CUDAToolkit_CUBLAS_INCLUDE_DIR}") + endif() +endif() +unset(CUDAToolkit_CUBLAS_INCLUDE_DIR CACHE) +unset(CUDAToolkit_CUBLAS_INCLUDE_DIR) + +# Find the CUDA Runtime Library libcudart +find_library(CUDA_CUDART + NAMES cudart + PATHS ${CUDAToolkit_IMPLICIT_LIBRARY_DIRECTORIES} + PATH_SUFFIXES lib64 ${_CUDAToolkit_win_search_dirs} +) +find_library(CUDA_CUDART + NAMES cudart + PATHS ${CUDAToolkit_IMPLICIT_LIBRARY_DIRECTORIES} + PATH_SUFFIXES lib64/stubs ${_CUDAToolkit_win_stub_search_dirs} lib/stubs stubs +) + +if(NOT CUDA_CUDART AND NOT CUDAToolkit_FIND_QUIETLY) + message(STATUS "Unable to find cudart library.") +endif() + +if(_CUDAToolkit_Pop_Prefix) + list(REMOVE_AT CMAKE_PREFIX_PATH -1) + unset(_CUDAToolkit_Pop_Prefix) +endif() + +#----------------------------------------------------------------------------- +# Perform version comparison and validate all required variables are set. +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +find_package_handle_standard_args(CUDAToolkit + REQUIRED_VARS + CUDAToolkit_INCLUDE_DIRECTORIES + CUDA_CUDART + CUDAToolkit_BIN_DIR + VERSION_VAR + CUDAToolkit_VERSION +) + +unset(CUDAToolkit_ROOT_DIR) +mark_as_advanced(CUDA_CUDART + CUDAToolkit_NVCC_EXECUTABLE + CUDAToolkit_SENTINEL_FILE + ) + +#----------------------------------------------------------------------------- +# Construct result variables +if(CUDAToolkit_FOUND) + set(CUDAToolkit_INCLUDE_DIRS "${CUDAToolkit_INCLUDE_DIRECTORIES}") + get_filename_component(CUDAToolkit_LIBRARY_DIR ${CUDA_CUDART} DIRECTORY ABSOLUTE) + + # Build search paths without any symlinks + file(REAL_PATH "${CUDAToolkit_LIBRARY_DIR}" _cmake_search_dir) + set(CUDAToolkit_LIBRARY_SEARCH_DIRS "${_cmake_search_dir}") + + # Detect we are in a splayed nvhpc toolkit layout and add extra + # search paths without symlinks + if(CUDAToolkit_LIBRARY_DIR MATCHES ".*/cuda/${CUDAToolkit_VERSION_MAJOR}.${CUDAToolkit_VERSION_MINOR}/lib64$") + # Search location for math_libs/ + block(SCOPE_FOR POLICIES) + cmake_policy(SET CMP0152 NEW) + file(REAL_PATH "${CUDAToolkit_LIBRARY_DIR}/../../../../../" _cmake_search_dir) + list(APPEND CUDAToolkit_LIBRARY_SEARCH_DIRS "${_cmake_search_dir}") + + # Search location for extras like cupti + file(REAL_PATH "${CUDAToolkit_LIBRARY_DIR}/../../../" _cmake_search_dir) + list(APPEND CUDAToolkit_LIBRARY_SEARCH_DIRS "${_cmake_search_dir}") + endblock() + endif() + + if(DEFINED CUDAToolkit_IMPLICIT_LIBRARY_DIRECTORIES) + list(APPEND CUDAToolkit_LIBRARY_SEARCH_DIRS "${CUDAToolkit_IMPLICIT_LIBRARY_DIRECTORIES}") + endif() + + # If no `CUDAToolkit_LIBRARY_ROOT` exists set it based on CUDAToolkit_LIBRARY_DIR + if(NOT DEFINED CUDAToolkit_LIBRARY_ROOT) + foreach(CUDAToolkit_search_loc IN LISTS CUDAToolkit_LIBRARY_DIR CUDAToolkit_BIN_DIR) + get_filename_component(CUDAToolkit_possible_lib_root "${CUDAToolkit_search_loc}" DIRECTORY ABSOLUTE) + if(EXISTS "${CUDAToolkit_possible_lib_root}/nvvm/") + set(CUDAToolkit_LIBRARY_ROOT "${CUDAToolkit_possible_lib_root}") + break() + endif() + endforeach() + unset(CUDAToolkit_search_loc) + unset(CUDAToolkit_possible_lib_root) + endif() +else() + # clear cache results when we fail + unset(_cmake_CUDAToolkit_implicit_link_directories CACHE) + unset(_cmake_CUDAToolkit_include_directories CACHE) + unset(CUDA_CUDART CACHE) + unset(CUDAToolkit_BIN_DIR CACHE) + unset(CUDAToolkit_NVCC_EXECUTABLE CACHE) + unset(CUDAToolkit_SENTINEL_FILE CACHE) +endif() +unset(CUDAToolkit_IMPLICIT_LIBRARY_DIRECTORIES) +unset(CUDAToolkit_INCLUDE_DIRECTORIES) + +#----------------------------------------------------------------------------- +# Construct import targets +if(CUDAToolkit_FOUND) + + function(_CUDAToolkit_find_and_add_import_lib lib_name) + cmake_parse_arguments(arg "" "" "ALT;DEPS;EXTRA_PATH_SUFFIXES;EXTRA_INCLUDE_DIRS;ONLY_SEARCH_FOR" ${ARGN}) + + if(arg_ONLY_SEARCH_FOR) + set(search_names ${arg_ONLY_SEARCH_FOR}) + else() + set(search_names ${lib_name} ${arg_ALT}) + endif() + + find_library(CUDA_${lib_name}_LIBRARY + NAMES ${search_names} + HINTS ${CUDAToolkit_LIBRARY_SEARCH_DIRS} + ENV CUDA_PATH + PATH_SUFFIXES nvidia/current lib64 ${_CUDAToolkit_win_search_dirs} lib + # Support NVHPC splayed math library layout + math_libs/${CUDAToolkit_VERSION_MAJOR}.${CUDAToolkit_VERSION_MINOR}/lib64 + math_libs/lib64 + ${arg_EXTRA_PATH_SUFFIXES} + ) + # Don't try any stub directories until we have exhausted all other + # search locations. + set(CUDA_IMPORT_PROPERTY IMPORTED_LOCATION) + set(CUDA_IMPORT_TYPE UNKNOWN) + if(NOT CUDA_${lib_name}_LIBRARY) + find_library(CUDA_${lib_name}_LIBRARY + NAMES ${search_names} + HINTS ${CUDAToolkit_LIBRARY_SEARCH_DIRS} + ENV CUDA_PATH + PATH_SUFFIXES lib64/stubs ${_CUDAToolkit_win_stub_search_dirs} lib/stubs stubs + ) + endif() + if(CUDA_${lib_name}_LIBRARY MATCHES "/stubs/" AND NOT CUDA_${lib_name}_LIBRARY MATCHES "\\.a$" AND NOT WIN32) + # Use a SHARED library with IMPORTED_IMPLIB, but not IMPORTED_LOCATION, + # to indicate that the stub is for linkers but not dynamic loaders. + # It will not contribute any RPATH entry. When encountered as + # a private transitive dependency of another shared library, + # it will be passed explicitly to linkers so they can find it + # even when the runtime library file does not exist on disk. + set(CUDA_IMPORT_PROPERTY IMPORTED_IMPLIB) + set(CUDA_IMPORT_TYPE SHARED) + endif() + + mark_as_advanced(CUDA_${lib_name}_LIBRARY) + + if (NOT TARGET CUDA::${lib_name} AND CUDA_${lib_name}_LIBRARY) + add_library(CUDA::${lib_name} ${CUDA_IMPORT_TYPE} IMPORTED) + target_include_directories(CUDA::${lib_name} SYSTEM INTERFACE "${CUDAToolkit_INCLUDE_DIRS}") + if(DEFINED CUDAToolkit_MATH_INCLUDE_DIR) + string(FIND ${CUDA_${lib_name}_LIBRARY} "math_libs" math_libs) + if(NOT ${math_libs} EQUAL -1) + target_include_directories(CUDA::${lib_name} SYSTEM INTERFACE "${CUDAToolkit_MATH_INCLUDE_DIR}") + endif() + endif() + set_property(TARGET CUDA::${lib_name} PROPERTY ${CUDA_IMPORT_PROPERTY} "${CUDA_${lib_name}_LIBRARY}") + foreach(dep ${arg_DEPS}) + if(TARGET CUDA::${dep}) + target_link_libraries(CUDA::${lib_name} INTERFACE CUDA::${dep}) + endif() + endforeach() + if(arg_EXTRA_INCLUDE_DIRS) + target_include_directories(CUDA::${lib_name} SYSTEM INTERFACE "${arg_EXTRA_INCLUDE_DIRS}") + endif() + endif() + endfunction() + + if(NOT TARGET CUDA::toolkit) + add_library(CUDA::toolkit IMPORTED INTERFACE) + target_include_directories(CUDA::toolkit SYSTEM INTERFACE "${CUDAToolkit_INCLUDE_DIRS}") + target_link_directories(CUDA::toolkit INTERFACE "${CUDAToolkit_LIBRARY_DIR}") + endif() + + # setup dependencies that are required for cudart/cudart_static when building + # on linux. These are generally only required when using the CUDA toolkit + # when CUDA language is disabled + if(NOT TARGET CUDA::cudart_static_deps) + add_library(CUDA::cudart_static_deps IMPORTED INTERFACE) + if(UNIX AND (CMAKE_C_COMPILER OR CMAKE_CXX_COMPILER)) + find_package(Threads REQUIRED) + target_link_libraries(CUDA::cudart_static_deps INTERFACE Threads::Threads ${CMAKE_DL_LIBS}) + endif() + + if(UNIX AND NOT APPLE AND NOT (CMAKE_SYSTEM_NAME STREQUAL "QNX")) + # On Linux, you must link against librt when using the static cuda runtime. + find_library(CUDAToolkit_rt_LIBRARY rt) + mark_as_advanced(CUDAToolkit_rt_LIBRARY) + if(NOT CUDAToolkit_rt_LIBRARY) + message(WARNING "Could not find librt library, needed by CUDA::cudart_static") + else() + target_link_libraries(CUDA::cudart_static_deps INTERFACE ${CUDAToolkit_rt_LIBRARY}) + endif() + endif() + endif() + + _CUDAToolkit_find_and_add_import_lib(cuda_driver ALT cuda DEPS cudart_static_deps) + _CUDAToolkit_find_and_add_import_lib(cudart DEPS cudart_static_deps) + _CUDAToolkit_find_and_add_import_lib(cudart_static DEPS cudart_static_deps) + + if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 12.0.0) + _CUDAToolkit_find_and_add_import_lib(nvJitLink) + _CUDAToolkit_find_and_add_import_lib(nvJitLink_static DEPS cudart_static_deps) + endif() + + if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 12.4.0) + _CUDAToolkit_find_and_add_import_lib(nvfatbin DEPS cudart_static_deps) + _CUDAToolkit_find_and_add_import_lib(nvfatbin_static DEPS cudart_static_deps) + endif() + + _CUDAToolkit_find_and_add_import_lib(culibos) # it's a static library + foreach (cuda_lib cublasLt cufft nvjpeg) + _CUDAToolkit_find_and_add_import_lib(${cuda_lib}) + _CUDAToolkit_find_and_add_import_lib(${cuda_lib}_static DEPS cudart_static_deps culibos) + endforeach() + foreach (cuda_lib curand nppc) + _CUDAToolkit_find_and_add_import_lib(${cuda_lib}) + _CUDAToolkit_find_and_add_import_lib(${cuda_lib}_static DEPS culibos) + endforeach() + + _CUDAToolkit_find_and_add_import_lib(cusparse DEPS nvJitLink) + _CUDAToolkit_find_and_add_import_lib(cusparse_static DEPS nvJitLink_static culibos) + + if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 11.0.0) + # cublas depends on cublasLt + # https://docs.nvidia.com/cuda/archive/11.0/cublas#static-library + _CUDAToolkit_find_and_add_import_lib(cublas DEPS cublasLt culibos) + _CUDAToolkit_find_and_add_import_lib(cublas_static DEPS cublasLt_static culibos) + else() + _CUDAToolkit_find_and_add_import_lib(cublas DEPS culibos) + _CUDAToolkit_find_and_add_import_lib(cublas_static DEPS culibos) + endif() + + if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 11.4) + _CUDAToolkit_find_and_add_import_lib(cuFile ALT cufile DEPS culibos) + _CUDAToolkit_find_and_add_import_lib(cuFile_static ALT cufile_static DEPS culibos) + + _CUDAToolkit_find_and_add_import_lib(cuFile_rdma ALT cufile_rdma DEPS cuFile culibos) + _CUDAToolkit_find_and_add_import_lib(cuFile_rdma_static ALT cufile_rdma_static DEPS cuFile_static culibos) + endif() + + if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 11.6) + _CUDAToolkit_find_and_add_import_lib(cudla) + endif() + + + # cuFFTW depends on cuFFT + _CUDAToolkit_find_and_add_import_lib(cufftw DEPS cufft) + _CUDAToolkit_find_and_add_import_lib(cufftw_static DEPS cufft_static) + if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 9.2) + _CUDAToolkit_find_and_add_import_lib(cufft_static_nocallback DEPS culibos) + endif() + + # cuSOLVER depends on cuBLAS, and cuSPARSE + set(cusolver_deps cublas cusparse) + set(cusolver_static_deps cublas_static cusparse_static culibos) + if(CUDAToolkit_VERSION VERSION_GREATER 11.2.1) + # cusolver depends on libcusolver_metis and cublasLt + # https://docs.nvidia.com/cuda/archive/11.2.2/cusolver#link-dependency + list(APPEND cusolver_deps cublasLt) + _CUDAToolkit_find_and_add_import_lib(cusolver_metis_static ALT metis_static) # implementation detail static lib + list(APPEND cusolver_static_deps cusolver_metis_static cublasLt_static) + endif() + if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 10.1.2) + # cusolver depends on liblapack_static.a starting with CUDA 10.1 update 2, + # https://docs.nvidia.com/cuda/archive/11.5.0/cusolver#static-link-lapack + _CUDAToolkit_find_and_add_import_lib(cusolver_lapack_static ALT lapack_static) # implementation detail static lib + list(APPEND cusolver_static_deps cusolver_lapack_static) + endif() + _CUDAToolkit_find_and_add_import_lib(cusolver DEPS ${cusolver_deps}) + _CUDAToolkit_find_and_add_import_lib(cusolver_static DEPS ${cusolver_static_deps}) + unset(cusolver_deps) + unset(cusolver_static_deps) + + # nvGRAPH depends on cuRAND, and cuSOLVER. + _CUDAToolkit_find_and_add_import_lib(nvgraph DEPS curand cusolver) + _CUDAToolkit_find_and_add_import_lib(nvgraph_static DEPS curand_static cusolver_static) + + # Process the majority of the NPP libraries. + foreach (cuda_lib nppial nppicc nppidei nppif nppig nppim nppist nppitc npps nppicom nppisu) + _CUDAToolkit_find_and_add_import_lib(${cuda_lib} DEPS nppc) + _CUDAToolkit_find_and_add_import_lib(${cuda_lib}_static DEPS nppc_static) + endforeach() + + find_path(CUDAToolkit_CUPTI_INCLUDE_DIR cupti.h PATHS + "${CUDAToolkit_ROOT_DIR}/extras/CUPTI/include" + ${CUDAToolkit_INCLUDE_DIRS} + PATH_SUFFIXES "../extras/CUPTI/include" + "../../../extras/CUPTI/include" + NO_DEFAULT_PATH) + mark_as_advanced(CUDAToolkit_CUPTI_INCLUDE_DIR) + + if(CUDAToolkit_CUPTI_INCLUDE_DIR) + set(_cmake_cupti_extra_paths extras/CUPTI/lib64/ + extras/CUPTI/lib/ + ../extras/CUPTI/lib64/ + ../extras/CUPTI/lib/) + _CUDAToolkit_find_and_add_import_lib(cupti + EXTRA_PATH_SUFFIXES ${_cmake_cupti_extra_paths} + EXTRA_INCLUDE_DIRS "${CUDAToolkit_CUPTI_INCLUDE_DIR}") + _CUDAToolkit_find_and_add_import_lib(cupti_static + EXTRA_PATH_SUFFIXES ${_cmake_cupti_extra_paths} + EXTRA_INCLUDE_DIRS "${CUDAToolkit_CUPTI_INCLUDE_DIR}") + if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 10.2.0) + _CUDAToolkit_find_and_add_import_lib(nvperf_host + EXTRA_PATH_SUFFIXES ${_cmake_cupti_extra_paths} + EXTRA_INCLUDE_DIRS "${CUDAToolkit_CUPTI_INCLUDE_DIR}") + _CUDAToolkit_find_and_add_import_lib(nvperf_host_static + EXTRA_PATH_SUFFIXES ${_cmake_cupti_extra_paths} + EXTRA_INCLUDE_DIRS "${CUDAToolkit_CUPTI_INCLUDE_DIR}") + _CUDAToolkit_find_and_add_import_lib(nvperf_target + EXTRA_PATH_SUFFIXES ${_cmake_cupti_extra_paths} + EXTRA_INCLUDE_DIRS "${CUDAToolkit_CUPTI_INCLUDE_DIR}") + endif() + if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 11.3.0) + _CUDAToolkit_find_and_add_import_lib(pcsamplingutil + EXTRA_PATH_SUFFIXES ${_cmake_cupti_extra_paths} + EXTRA_INCLUDE_DIRS "${CUDAToolkit_CUPTI_INCLUDE_DIR}") + endif() + endif() + + if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 11.1.0) + if(NOT TARGET CUDA::nvptxcompiler_static) + _CUDAToolkit_find_and_add_import_lib(nvptxcompiler_static) + if(TARGET CUDA::nvptxcompiler_static) + target_link_libraries(CUDA::nvptxcompiler_static INTERFACE CUDA::cudart_static_deps) + endif() + endif() + endif() + + _CUDAToolkit_find_and_add_import_lib(nvrtc_builtins ALT nvrtc-builtins) + _CUDAToolkit_find_and_add_import_lib(nvrtc) + if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 11.5.0) + _CUDAToolkit_find_and_add_import_lib(nvrtc_builtins_static ALT nvrtc-builtins_static) + if(NOT TARGET CUDA::nvrtc_static) + _CUDAToolkit_find_and_add_import_lib(nvrtc_static DEPS nvrtc_builtins_static nvptxcompiler_static) + if(TARGET CUDA::nvrtc_static AND WIN32 AND NOT (BORLAND OR MINGW OR CYGWIN)) + target_link_libraries(CUDA::nvrtc_static INTERFACE Ws2_32.lib) + endif() + endif() + endif() + + _CUDAToolkit_find_and_add_import_lib(nvml ALT nvidia-ml nvml) + _CUDAToolkit_find_and_add_import_lib(nvml_static ONLY_SEARCH_FOR libnvidia-ml.a libnvml.a) + + if(WIN32) + # nvtools can be installed outside the CUDA toolkit directory + # so prefer the NVTOOLSEXT_PATH windows only environment variable + # In addition on windows the most common name is nvToolsExt64_1 + find_library(CUDA_nvToolsExt_LIBRARY + NAMES nvToolsExt64_1 nvToolsExt64 nvToolsExt + PATHS ENV NVTOOLSEXT_PATH + ENV CUDA_PATH + PATH_SUFFIXES lib/x64 lib + ) + endif() + _CUDAToolkit_find_and_add_import_lib(nvToolsExt ALT nvToolsExt64) + + if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 10.0) + # nvToolsExt is deprecated since nvtx3 introduction. + # Warn only if the project requires a sufficiently new CMake to make migration possible. + if(TARGET CUDA::nvToolsExt AND CMAKE_MINIMUM_REQUIRED_VERSION VERSION_GREATER_EQUAL 3.25) + set_property(TARGET CUDA::nvToolsExt PROPERTY DEPRECATION "nvToolsExt has been superseded by nvtx3 since CUDA 10.0 and CMake 3.25. Use CUDA::nvtx3 and include instead.") + endif() + + # Header-only variant. Uses dlopen(). + if(NOT TARGET CUDA::nvtx3) + add_library(CUDA::nvtx3 INTERFACE IMPORTED) + target_include_directories(CUDA::nvtx3 SYSTEM INTERFACE "${CUDAToolkit_INCLUDE_DIRS}") + target_link_libraries(CUDA::nvtx3 INTERFACE ${CMAKE_DL_LIBS}) + endif() + endif() + + _CUDAToolkit_find_and_add_import_lib(OpenCL) +endif() + +if(_CUDAToolkit_Pop_ROOT_PATH) + list(REMOVE_AT CMAKE_FIND_ROOT_PATH 0) + unset(_CUDAToolkit_Pop_ROOT_PATH) +endif() + +unset(_CUDAToolkit_win_search_dirs) +unset(_CUDAToolkit_win_stub_search_dirs) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindCurses.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindCurses.cmake new file mode 100644 index 0000000000000000000000000000000000000000..bfa1d6fb4438693e50114eb146f1ca7a4cffc49c --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindCurses.cmake @@ -0,0 +1,276 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindCurses +---------- + +Find the curses or ncurses include file and library. + +Result Variables +^^^^^^^^^^^^^^^^ + +This module defines the following variables: + +``CURSES_FOUND`` + True if Curses is found. +``CURSES_INCLUDE_DIRS`` + The include directories needed to use Curses. +``CURSES_LIBRARIES`` + The libraries needed to use Curses. +``CURSES_CFLAGS`` + .. versionadded:: 3.16 + + Parameters which ought be given to C/C++ compilers when using Curses. +``CURSES_HAVE_CURSES_H`` + True if curses.h is available. +``CURSES_HAVE_NCURSES_H`` + True if ncurses.h is available. +``CURSES_HAVE_NCURSES_NCURSES_H`` + True if ``ncurses/ncurses.h`` is available. +``CURSES_HAVE_NCURSES_CURSES_H`` + True if ``ncurses/curses.h`` is available. + +Set ``CURSES_NEED_NCURSES`` to ``TRUE`` before the +``find_package(Curses)`` call if NCurses functionality is required. + +.. versionadded:: 3.10 + Set ``CURSES_NEED_WIDE`` to ``TRUE`` before the + ``find_package(Curses)`` call if unicode functionality is required. + +Backward Compatibility +^^^^^^^^^^^^^^^^^^^^^^ + +The following variable are provided for backward compatibility: + +``CURSES_INCLUDE_DIR`` + Path to Curses include. Use ``CURSES_INCLUDE_DIRS`` instead. +``CURSES_LIBRARY`` + Path to Curses library. Use ``CURSES_LIBRARIES`` instead. +#]=======================================================================] + +include(${CMAKE_CURRENT_LIST_DIR}/CheckLibraryExists.cmake) + +# we don't know anything about cursesw, so only ncurses +# may be ncursesw +if(NOT CURSES_NEED_WIDE) + set(NCURSES_LIBRARY_NAME "ncurses") + set(CURSES_FORM_LIBRARY_NAME "form") +else() + set(NCURSES_LIBRARY_NAME "ncursesw") + set(CURSES_FORM_LIBRARY_NAME "formw") + # Also, if we are searching for wide curses - we are actually searching + # for ncurses, we don't know about any other unicode version. + set(CURSES_NEED_NCURSES TRUE) +endif() + +find_library(CURSES_CURSES_LIBRARY NAMES curses) + +find_library(CURSES_NCURSES_LIBRARY NAMES "${NCURSES_LIBRARY_NAME}" ) +set(CURSES_USE_NCURSES FALSE) + +if(CURSES_NCURSES_LIBRARY AND ((NOT CURSES_CURSES_LIBRARY) OR CURSES_NEED_NCURSES)) + set(CURSES_USE_NCURSES TRUE) +endif() +# http://cygwin.com/ml/cygwin-announce/2010-01/msg00002.html +# cygwin ncurses stopped providing curses.h symlinks see above +# message. Cygwin is an ncurses package, so force ncurses on +# cygwin if the curses.h is missing +if(CURSES_NCURSES_LIBRARY AND CYGWIN) + if (CURSES_NEED_WIDE) + if(NOT EXISTS /usr/include/ncursesw/curses.h) + set(CURSES_USE_NCURSES TRUE) + endif() + else() + if(NOT EXISTS /usr/include/curses.h) + set(CURSES_USE_NCURSES TRUE) + endif() + endif() +endif() + + +# Not sure the logic is correct here. +# If NCurses is required, use the function wsyncup() to check if the library +# has NCurses functionality (at least this is where it breaks on NetBSD). +# If wsyncup is in curses, use this one. +# If not, try to find ncurses and check if this has the symbol. +# Once the ncurses library is found, search the ncurses.h header first, but +# some web pages also say that even with ncurses there is not always a ncurses.h: +# http://osdir.com/ml/gnome.apps.mc.devel/2002-06/msg00029.html +# So at first try ncurses.h, if not found, try to find curses.h under the same +# prefix as the library was found, if still not found, try curses.h with the +# default search paths. +if(CURSES_CURSES_LIBRARY AND CURSES_NEED_NCURSES) + include(${CMAKE_CURRENT_LIST_DIR}/CMakePushCheckState.cmake) + cmake_push_check_state() + set(CMAKE_REQUIRED_QUIET ${Curses_FIND_QUIETLY}) + CHECK_LIBRARY_EXISTS("${CURSES_CURSES_LIBRARY}" + wsyncup "" CURSES_CURSES_HAS_WSYNCUP) + + if(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_HAS_WSYNCUP) + CHECK_LIBRARY_EXISTS("${CURSES_NCURSES_LIBRARY}" + wsyncup "" CURSES_NCURSES_HAS_WSYNCUP) + if( CURSES_NCURSES_HAS_WSYNCUP) + set(CURSES_USE_NCURSES TRUE) + endif() + endif() + cmake_pop_check_state() + +endif() + +if(CURSES_USE_NCURSES) + get_filename_component(_cursesLibDir "${CURSES_NCURSES_LIBRARY}" PATH) + get_filename_component(_cursesParentDir "${_cursesLibDir}" PATH) + + # Use CURSES_NCURSES_INCLUDE_PATH if set, for compatibility. + if(CURSES_NCURSES_INCLUDE_PATH) + if (CURSES_NEED_WIDE) + find_path(CURSES_INCLUDE_PATH + NAMES ncursesw/ncurses.h ncursesw/curses.h ncursesw.h cursesw.h + PATHS ${CURSES_NCURSES_INCLUDE_PATH} + NO_DEFAULT_PATH + ) + else() + find_path(CURSES_INCLUDE_PATH + NAMES ncurses/ncurses.h ncurses/curses.h ncurses.h curses.h + PATHS ${CURSES_NCURSES_INCLUDE_PATH} + NO_DEFAULT_PATH + ) + endif() + endif() + + if (CURSES_NEED_WIDE) + set(CURSES_TINFO_LIBRARY_NAME tinfow) + find_path(CURSES_INCLUDE_PATH + NAMES ncursesw/ncurses.h ncursesw/curses.h ncursesw.h cursesw.h + HINTS "${_cursesParentDir}/include" + ) + else() + set(CURSES_TINFO_LIBRARY_NAME tinfo) + find_path(CURSES_INCLUDE_PATH + NAMES ncurses/ncurses.h ncurses/curses.h ncurses.h curses.h + HINTS "${_cursesParentDir}/include" + ) + endif() + + # Previous versions of FindCurses provided these values. + if(NOT DEFINED CURSES_LIBRARY) + set(CURSES_LIBRARY "${CURSES_NCURSES_LIBRARY}") + endif() + + CHECK_LIBRARY_EXISTS("${CURSES_NCURSES_LIBRARY}" + cbreak "" CURSES_NCURSES_HAS_CBREAK) + CHECK_LIBRARY_EXISTS("${CURSES_NCURSES_LIBRARY}" + nodelay "" CURSES_NCURSES_HAS_NODELAY) + if(NOT CURSES_NCURSES_HAS_CBREAK OR NOT CURSES_NCURSES_HAS_NODELAY) + find_library(CURSES_EXTRA_LIBRARY "${CURSES_TINFO_LIBRARY_NAME}" HINTS "${_cursesLibDir}") + find_library(CURSES_EXTRA_LIBRARY "${CURSES_TINFO_LIBRARY_NAME}" ) + + mark_as_advanced( + CURSES_EXTRA_LIBRARY + ) + endif() +else() + get_filename_component(_cursesLibDir "${CURSES_CURSES_LIBRARY}" PATH) + get_filename_component(_cursesParentDir "${_cursesLibDir}" PATH) + + #We can't find anything with CURSES_NEED_WIDE because we know + #only about ncursesw unicode curses version + if(NOT CURSES_NEED_WIDE) + find_path(CURSES_INCLUDE_PATH + NAMES curses.h + HINTS "${_cursesParentDir}/include" + ) + endif() + + # Previous versions of FindCurses provided these values. + if(NOT DEFINED CURSES_CURSES_H_PATH) + set(CURSES_CURSES_H_PATH "${CURSES_INCLUDE_PATH}") + endif() + if(NOT DEFINED CURSES_LIBRARY) + set(CURSES_LIBRARY "${CURSES_CURSES_LIBRARY}") + endif() +endif() + +# Report whether each possible header name exists in the include directory. +if(NOT DEFINED CURSES_HAVE_NCURSES_NCURSES_H) + if(CURSES_NEED_WIDE) + if(EXISTS "${CURSES_INCLUDE_PATH}/ncursesw/ncurses.h") + set(CURSES_HAVE_NCURSES_NCURSES_H "${CURSES_INCLUDE_PATH}/ncursesw/ncurses.h") + endif() + elseif(EXISTS "${CURSES_INCLUDE_PATH}/ncurses/ncurses.h") + set(CURSES_HAVE_NCURSES_NCURSES_H "${CURSES_INCLUDE_PATH}/ncurses/ncurses.h") + endif() + if(NOT DEFINED CURSES_HAVE_NCURSES_NCURSES_H) + set(CURSES_HAVE_NCURSES_NCURSES_H "CURSES_HAVE_NCURSES_NCURSES_H-NOTFOUND") + endif() +endif() +if(NOT DEFINED CURSES_HAVE_NCURSES_CURSES_H) + if(CURSES_NEED_WIDE) + if(EXISTS "${CURSES_INCLUDE_PATH}/ncursesw/curses.h") + set(CURSES_HAVE_NCURSES_CURSES_H "${CURSES_INCLUDE_PATH}/ncursesw/curses.h") + endif() + elseif(EXISTS "${CURSES_INCLUDE_PATH}/ncurses/curses.h") + set(CURSES_HAVE_NCURSES_CURSES_H "${CURSES_INCLUDE_PATH}/ncurses/curses.h") + endif() + if(NOT DEFINED CURSES_HAVE_NCURSES_CURSES_H) + set(CURSES_HAVE_NCURSES_CURSES_H "CURSES_HAVE_NCURSES_CURSES_H-NOTFOUND") + endif() +endif() +if(NOT CURSES_NEED_WIDE) + #ncursesw can't be found for this paths + if(NOT DEFINED CURSES_HAVE_NCURSES_H) + if(EXISTS "${CURSES_INCLUDE_PATH}/ncurses.h") + set(CURSES_HAVE_NCURSES_H "${CURSES_INCLUDE_PATH}/ncurses.h") + else() + set(CURSES_HAVE_NCURSES_H "CURSES_HAVE_NCURSES_H-NOTFOUND") + endif() + endif() + if(NOT DEFINED CURSES_HAVE_CURSES_H) + if(EXISTS "${CURSES_INCLUDE_PATH}/curses.h") + set(CURSES_HAVE_CURSES_H "${CURSES_INCLUDE_PATH}/curses.h") + else() + set(CURSES_HAVE_CURSES_H "CURSES_HAVE_CURSES_H-NOTFOUND") + endif() + endif() +endif() + +find_library(CURSES_FORM_LIBRARY "${CURSES_FORM_LIBRARY_NAME}" HINTS "${_cursesLibDir}") +find_library(CURSES_FORM_LIBRARY "${CURSES_FORM_LIBRARY_NAME}" ) + +# Previous versions of FindCurses provided these values. +if(NOT DEFINED FORM_LIBRARY) + set(FORM_LIBRARY "${CURSES_FORM_LIBRARY}") +endif() + +# Need to provide the *_LIBRARIES +set(CURSES_LIBRARIES ${CURSES_LIBRARY}) + +if(CURSES_EXTRA_LIBRARY) + set(CURSES_LIBRARIES ${CURSES_LIBRARIES} ${CURSES_EXTRA_LIBRARY}) +endif() + +if(CURSES_FORM_LIBRARY) + set(CURSES_LIBRARIES ${CURSES_LIBRARIES} ${CURSES_FORM_LIBRARY}) +endif() + +# Provide the *_INCLUDE_DIRS and *_CFLAGS results. +set(CURSES_INCLUDE_DIRS ${CURSES_INCLUDE_PATH}) +set(CURSES_INCLUDE_DIR ${CURSES_INCLUDE_PATH}) # compatibility + +find_package(PkgConfig QUIET) +if(PKG_CONFIG_FOUND) + pkg_check_modules(NCURSES QUIET ${NCURSES_LIBRARY_NAME}) + set(CURSES_CFLAGS ${NCURSES_CFLAGS_OTHER}) +endif() + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Curses DEFAULT_MSG + CURSES_LIBRARY CURSES_INCLUDE_PATH) + +mark_as_advanced( + CURSES_INCLUDE_PATH + CURSES_CURSES_LIBRARY + CURSES_NCURSES_LIBRARY + CURSES_FORM_LIBRARY + ) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindFLTK.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindFLTK.cmake new file mode 100644 index 0000000000000000000000000000000000000000..a245c6c95d248bb731b0a86944f7e126bbb8a4ba --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindFLTK.cmake @@ -0,0 +1,344 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindFLTK +-------- + +Find the Fast Light Toolkit (FLTK) library + +Input Variables +^^^^^^^^^^^^^^^ + +By default this module will search for all of the FLTK components and +add them to the ``FLTK_LIBRARIES`` variable. You can limit the components +which get placed in ``FLTK_LIBRARIES`` by defining one or more of the +following three options: + +``FLTK_SKIP_OPENGL`` + Set to true to disable searching for the FLTK GL library + +``FLTK_SKIP_FORMS`` + Set to true to disable searching for the FLTK Forms library + +``FLTK_SKIP_IMAGES`` + Set to true to disable searching for the FLTK Images library + +FLTK is composed also by a binary tool. You can set the following option: + +``FLTK_SKIP_FLUID`` + Set to true to not look for the FLUID binary + +Result Variables +^^^^^^^^^^^^^^^^ + +The following variables will be defined: + +``FLTK_FOUND`` + True if all components not skipped were found + +``FLTK_INCLUDE_DIR`` + Path to the include directory for FLTK header files + +``FLTK_LIBRARIES`` + List of the FLTK libraries found + +``FLTK_FLUID_EXECUTABLE`` + Path to the FLUID binary tool + +``FLTK_WRAP_UI`` + True if FLUID is found, used to enable the FLTK_WRAP_UI command + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables are also available to set or use: + +``FLTK_BASE_LIBRARY_RELEASE`` + The FLTK base library (optimized) + +``FLTK_BASE_LIBRARY_DEBUG`` + The FLTK base library (debug) + +``FLTK_GL_LIBRARY_RELEASE`` + The FLTK GL library (optimized) + +``FLTK_GL_LIBRARY_DEBUG`` + The FLTK GL library (debug) + +``FLTK_FORMS_LIBRARY_RELEASE`` + The FLTK Forms library (optimized) + +``FLTK_FORMS_LIBRARY_DEBUG`` + The FLTK Forms library (debug) + +``FLTK_IMAGES_LIBRARY_RELEASE`` + The FLTK Images protobuf library (optimized) + +``FLTK_IMAGES_LIBRARY_DEBUG`` + The FLTK Images library (debug) + +.. versionadded:: 3.11 + Debug and Release variants are found separately and use per-configuration + variables. +#]=======================================================================] + +if(NOT FLTK_SKIP_OPENGL) + find_package(OpenGL) +endif() + +# Platform dependent libraries required by FLTK +if(WIN32) + if(NOT CYGWIN) + if(BORLAND) + set( FLTK_PLATFORM_DEPENDENT_LIBS import32 ) + else() + set( FLTK_PLATFORM_DEPENDENT_LIBS wsock32 comctl32 ) + endif() + endif() +endif() + +if(UNIX) + include(${CMAKE_CURRENT_LIST_DIR}/FindX11.cmake) + find_library(FLTK_MATH_LIBRARY m) + set( FLTK_PLATFORM_DEPENDENT_LIBS ${X11_LIBRARIES} ${FLTK_MATH_LIBRARY}) +endif() + +if(APPLE) + set( FLTK_PLATFORM_DEPENDENT_LIBS "-framework Carbon -framework Cocoa -framework ApplicationServices -lz") +endif() + +# If FLTK_INCLUDE_DIR is already defined we assign its value to FLTK_DIR. +if(FLTK_INCLUDE_DIR) + set(FLTK_DIR ${FLTK_INCLUDE_DIR}) +endif() + + +# If FLTK has been built using CMake we try to find everything directly +set(FLTK_DIR_STRING "directory containing FLTKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/fltk for an installation.") + +# Search only if the location is not already known. +if(NOT FLTK_DIR) + # Get the system search path as a list. + file(TO_CMAKE_PATH "$ENV{PATH}" FLTK_DIR_SEARCH2) + + # Construct a set of paths relative to the system search path. + set(FLTK_DIR_SEARCH "") + foreach(dir ${FLTK_DIR_SEARCH2}) + set(FLTK_DIR_SEARCH ${FLTK_DIR_SEARCH} "${dir}/../lib/fltk") + endforeach() + string(REPLACE "//" "/" FLTK_DIR_SEARCH "${FLTK_DIR_SEARCH}") + + # + # Look for an installation or build tree. + # + find_path(FLTK_DIR FLTKConfig.cmake + # Look for an environment variable FLTK_DIR. + HINTS + ENV FLTK_DIR + + # Look in places relative to the system executable search path. + ${FLTK_DIR_SEARCH} + + PATH_SUFFIXES + fltk + fltk/include + lib/fltk + lib/fltk/include + + # Help the user find it if we cannot. + DOC "The ${FLTK_DIR_STRING}" + ) +endif() + +# Check if FLTK was built using CMake +foreach(fltk_include IN LISTS FLTK_DIR) + if(EXISTS "${fltk_include}/FLTKConfig.cmake") + set(FLTK_BUILT_WITH_CMAKE 1) + set(FLTK_CMAKE_PATH "${fltk_include}/FLTKConfig.cmake") + break() + endif() +endforeach() + +if(FLTK_BUILT_WITH_CMAKE) + set(FLTK_FOUND 1) + include("${FLTK_CMAKE_PATH}") + + # Fluid + if(FLUID_COMMAND) + set(FLTK_FLUID_EXECUTABLE ${FLUID_COMMAND} CACHE FILEPATH "Fluid executable") + else() + find_program(FLTK_FLUID_EXECUTABLE fluid PATHS + ${FLTK_EXECUTABLE_DIRS} + ${FLTK_EXECUTABLE_DIRS}/RelWithDebInfo + ${FLTK_EXECUTABLE_DIRS}/Debug + ${FLTK_EXECUTABLE_DIRS}/Release + NO_SYSTEM_PATH) + endif() + # mark_as_advanced(FLTK_FLUID_EXECUTABLE) + + set(FLTK_INCLUDE_DIR ${FLTK_DIR}) + link_directories(${FLTK_LIBRARY_DIRS}) + + set(FLTK_BASE_LIBRARY fltk) + set(FLTK_GL_LIBRARY fltk_gl) + set(FLTK_FORMS_LIBRARY fltk_forms) + set(FLTK_IMAGES_LIBRARY fltk_images) + + # Add the extra libraries + load_cache(${FLTK_DIR} + READ_WITH_PREFIX + FL FLTK_USE_SYSTEM_JPEG + FL FLTK_USE_SYSTEM_PNG + FL FLTK_USE_SYSTEM_ZLIB + ) + + set(FLTK_IMAGES_LIBS "") + if(FLFLTK_USE_SYSTEM_JPEG) + set(FLTK_IMAGES_LIBS ${FLTK_IMAGES_LIBS} fltk_jpeg) + endif() + if(FLFLTK_USE_SYSTEM_PNG) + set(FLTK_IMAGES_LIBS ${FLTK_IMAGES_LIBS} fltk_png) + endif() + if(FLFLTK_USE_SYSTEM_ZLIB) + set(FLTK_IMAGES_LIBS ${FLTK_IMAGES_LIBS} fltk_zlib) + endif() + set(FLTK_IMAGES_LIBS "${FLTK_IMAGES_LIBS}" CACHE INTERNAL + "Extra libraries for fltk_images library.") + +else() + + # if FLTK was not built using CMake + # Find fluid executable. + find_program(FLTK_FLUID_EXECUTABLE fluid ${FLTK_INCLUDE_DIR}/fluid) + + # Use location of fluid to help find everything else. + set(FLTK_INCLUDE_SEARCH_PATH "") + set(FLTK_LIBRARY_SEARCH_PATH "") + if(FLTK_FLUID_EXECUTABLE) + get_filename_component(FLTK_BIN_DIR "${FLTK_FLUID_EXECUTABLE}" PATH) + set(FLTK_INCLUDE_SEARCH_PATH ${FLTK_INCLUDE_SEARCH_PATH} + ${FLTK_BIN_DIR}/../include ${FLTK_BIN_DIR}/..) + set(FLTK_LIBRARY_SEARCH_PATH ${FLTK_LIBRARY_SEARCH_PATH} + ${FLTK_BIN_DIR}/../lib) + set(FLTK_WRAP_UI 1) + endif() + + # + # Try to find FLTK include dir using fltk-config + # + if(UNIX) + # Use fltk-config to generate a list of possible include directories + find_program(FLTK_CONFIG_SCRIPT fltk-config PATHS ${FLTK_BIN_DIR}) + if(FLTK_CONFIG_SCRIPT) + if(NOT FLTK_INCLUDE_DIR) + execute_process(COMMAND ${FLTK_CONFIG_SCRIPT} --cxxflags OUTPUT_VARIABLE FLTK_CXXFLAGS) + if(FLTK_CXXFLAGS) + string(REGEX MATCHALL "-I[^ ]*" _fltk_temp_dirs ${FLTK_CXXFLAGS}) + string(REPLACE "-I" "" _fltk_temp_dirs "${_fltk_temp_dirs}") + foreach(_dir ${_fltk_temp_dirs}) + string(STRIP ${_dir} _output) + list(APPEND _FLTK_POSSIBLE_INCLUDE_DIRS ${_output}) + endforeach() + endif() + endif() + endif() + endif() + + list(APPEND FLTK_INCLUDE_SEARCH_PATH ${_FLTK_POSSIBLE_INCLUDE_DIRS}) + + find_path(FLTK_INCLUDE_DIR + NAMES FL/Fl.h FL/Fl.H # fltk 1.1.9 has Fl.H (#8376) + PATH_SUFFIXES fltk fltk/include + PATHS ${FLTK_INCLUDE_SEARCH_PATH}) + + # + # Try to find FLTK library + if(UNIX) + if(FLTK_CONFIG_SCRIPT) + execute_process(COMMAND ${FLTK_CONFIG_SCRIPT} --libs OUTPUT_VARIABLE _FLTK_POSSIBLE_LIBS) + if(_FLTK_POSSIBLE_LIBS) + get_filename_component(_FLTK_POSSIBLE_LIBRARY_DIR ${_FLTK_POSSIBLE_LIBS} PATH) + endif() + endif() + endif() + + list(APPEND FLTK_LIBRARY_SEARCH_PATH ${FLTK_INCLUDE_DIR}/lib ${_FLTK_POSSIBLE_LIBRARY_DIR}) + + include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) + + # Allow libraries to be set manually + if(NOT FLTK_BASE_LIBRARY) + find_library(FLTK_BASE_LIBRARY_RELEASE NAMES fltk PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) + find_library(FLTK_BASE_LIBRARY_DEBUG NAMES fltkd PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) + select_library_configurations(FLTK_BASE) + endif() + if(NOT FLTK_GL_LIBRARY) + find_library(FLTK_GL_LIBRARY_RELEASE NAMES fltkgl fltk_gl PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) + find_library(FLTK_GL_LIBRARY_DEBUG NAMES fltkgld fltk_gld PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) + select_library_configurations(FLTK_GL) + endif() + if(NOT FLTK_FORMS_LIBRARY) + find_library(FLTK_FORMS_LIBRARY_RELEASE NAMES fltkforms fltk_forms PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) + find_library(FLTK_FORMS_LIBRARY_DEBUG NAMES fltkformsd fltk_formsd PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) + select_library_configurations(FLTK_FORMS) + endif() + if(NOT FLTK_IMAGES_LIBRARY) + find_library(FLTK_IMAGES_LIBRARY_RELEASE NAMES fltkimages fltk_images PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) + find_library(FLTK_IMAGES_LIBRARY_DEBUG NAMES fltkimagesd fltk_imagesd PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) + select_library_configurations(FLTK_IMAGES) + endif() + + # Find the extra libraries needed for the fltk_images library. + if(UNIX) + if(FLTK_CONFIG_SCRIPT) + execute_process(COMMAND ${FLTK_CONFIG_SCRIPT} --use-images --ldflags + OUTPUT_VARIABLE FLTK_IMAGES_LDFLAGS) + set(FLTK_LIBS_EXTRACT_REGEX ".*-lfltk_images (.*) -lfltk.*") + if("${FLTK_IMAGES_LDFLAGS}" MATCHES "${FLTK_LIBS_EXTRACT_REGEX}") + string(REGEX REPLACE " +" ";" FLTK_IMAGES_LIBS "${CMAKE_MATCH_1}") + # The execute_process() will not be inherited into subdirectories from + # the file that originally included this module. Save the answer. + set(FLTK_IMAGES_LIBS "${FLTK_IMAGES_LIBS}" CACHE INTERNAL + "Extra libraries for fltk_images library.") + endif() + endif() + endif() + +endif() + +# Append all of the required libraries together (by default, everything) +set(FLTK_LIBRARIES) +if(NOT FLTK_SKIP_IMAGES) + list(APPEND FLTK_LIBRARIES ${FLTK_IMAGES_LIBRARY}) +endif() +if(NOT FLTK_SKIP_FORMS) + list(APPEND FLTK_LIBRARIES ${FLTK_FORMS_LIBRARY}) +endif() +if(NOT FLTK_SKIP_OPENGL) + list(APPEND FLTK_LIBRARIES ${FLTK_GL_LIBRARY} ${OPENGL_gl_LIBRARY}) + list(APPEND FLTK_INCLUDE_DIR ${OPENGL_INCLUDE_DIR}) + list(REMOVE_DUPLICATES FLTK_INCLUDE_DIR) +endif() +list(APPEND FLTK_LIBRARIES ${FLTK_BASE_LIBRARY}) + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +if(FLTK_SKIP_FLUID) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(FLTK DEFAULT_MSG FLTK_LIBRARIES FLTK_INCLUDE_DIR) +else() + FIND_PACKAGE_HANDLE_STANDARD_ARGS(FLTK DEFAULT_MSG FLTK_LIBRARIES FLTK_INCLUDE_DIR FLTK_FLUID_EXECUTABLE) +endif() + +if(FLTK_FOUND) + if(APPLE) + set(FLTK_LIBRARIES ${FLTK_PLATFORM_DEPENDENT_LIBS} ${FLTK_LIBRARIES}) + else() + set(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${FLTK_PLATFORM_DEPENDENT_LIBS}) + endif() + + # The following deprecated settings are for compatibility with CMake 1.4 + set (HAS_FLTK ${FLTK_FOUND}) + set (FLTK_INCLUDE_PATH ${FLTK_INCLUDE_DIR}) + set (FLTK_FLUID_EXE ${FLTK_FLUID_EXECUTABLE}) + set (FLTK_LIBRARY ${FLTK_LIBRARIES}) +endif() diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindGIF.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindGIF.cmake new file mode 100644 index 0000000000000000000000000000000000000000..9a11b88e564fa91ec7a80d8cfa958b40f26b7f9b --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindGIF.cmake @@ -0,0 +1,133 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindGIF +------- + +This finds the Graphics Interchange Format (GIF) library (``giflib``) + +Imported targets +^^^^^^^^^^^^^^^^ + +This module defines the following :prop_tgt:`IMPORTED` target: + +``GIF::GIF`` + The ``giflib`` library, if found. + +Result variables +^^^^^^^^^^^^^^^^ + +This module will set the following variables in your project: + +``GIF_FOUND`` + If false, do not try to use GIF. +``GIF_INCLUDE_DIRS`` + where to find gif_lib.h, etc. +``GIF_LIBRARIES`` + the libraries needed to use GIF. +``GIF_VERSION`` + 3, 4 or a full version string (eg 5.1.4) for versions >= 4.1.6. + +Cache variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``GIF_INCLUDE_DIR`` + where to find the GIF headers. +``GIF_LIBRARY`` + where to find the GIF library. + +Hints +^^^^^ + +``GIF_DIR`` is an environment variable that would correspond to the +``./configure --prefix=$GIF_DIR``. +#]=======================================================================] + +cmake_policy(PUSH) +cmake_policy(SET CMP0159 NEW) # file(STRINGS) with REGEX updates CMAKE_MATCH_ + +# Created by Eric Wing. +# Modifications by Alexander Neundorf, Ben Campbell + +find_path(GIF_INCLUDE_DIR gif_lib.h + HINTS + ENV GIF_DIR + PATH_SUFFIXES include +) + +# the gif library can have many names :-/ +set(POTENTIAL_GIF_LIBS gif libgif ungif libungif giflib giflib4) + +find_library(GIF_LIBRARY + NAMES ${POTENTIAL_GIF_LIBS} + NAMES_PER_DIR + HINTS + ENV GIF_DIR + PATH_SUFFIXES lib +) + +# Very basic version detection. +# The GIF_LIB_VERSION string in gif_lib.h seems to be unreliable, since it seems +# to be always " Version 2.0, " in versions 3.x of giflib. +# In version 4 the member UserData was added to GifFileType, so we check for this +# one. +# Versions after 4.1.6 define GIFLIB_MAJOR, GIFLIB_MINOR, and GIFLIB_RELEASE +# see http://giflib.sourceforge.net/gif_lib.html#compatibility +if(GIF_INCLUDE_DIR) + include(${CMAKE_CURRENT_LIST_DIR}/CMakePushCheckState.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/CheckStructHasMember.cmake) + CMAKE_PUSH_CHECK_STATE() + set(CMAKE_REQUIRED_QUIET ${GIF_FIND_QUIETLY}) + set(CMAKE_REQUIRED_INCLUDES "${GIF_INCLUDE_DIR}") + + # Check for the specific version defines (>=4.1.6 only) + file(STRINGS ${GIF_INCLUDE_DIR}/gif_lib.h _GIF_DEFS REGEX "^[ \t]*#define[ \t]+GIFLIB_(MAJOR|MINOR|RELEASE)") + if(_GIF_DEFS) + # yay - got exact version info + string(REGEX REPLACE ".*GIFLIB_MAJOR ([0-9]+).*" "\\1" _GIF_MAJ "${_GIF_DEFS}") + string(REGEX REPLACE ".*GIFLIB_MINOR ([0-9]+).*" "\\1" _GIF_MIN "${_GIF_DEFS}") + string(REGEX REPLACE ".*GIFLIB_RELEASE ([0-9]+).*" "\\1" _GIF_REL "${_GIF_DEFS}") + set(GIF_VERSION "${_GIF_MAJ}.${_GIF_MIN}.${_GIF_REL}") + else() + # use UserData field to sniff version instead + CHECK_STRUCT_HAS_MEMBER(GifFileType UserData gif_lib.h GIF_GifFileType_UserData ) + if(GIF_GifFileType_UserData) + set(GIF_VERSION 4) + else() + set(GIF_VERSION 3) + endif() + endif() + + unset(_GIF_MAJ) + unset(_GIF_MIN) + unset(_GIF_REL) + unset(_GIF_DEFS) + CMAKE_POP_CHECK_STATE() +endif() + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GIF REQUIRED_VARS GIF_LIBRARY GIF_INCLUDE_DIR + VERSION_VAR GIF_VERSION ) + +if(GIF_FOUND) + set(GIF_INCLUDE_DIRS "${GIF_INCLUDE_DIR}") + set(GIF_LIBRARIES ${GIF_LIBRARY}) + + if(NOT TARGET GIF::GIF) + add_library(GIF::GIF UNKNOWN IMPORTED) + set_target_properties(GIF::GIF PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${GIF_INCLUDE_DIRS}") + if(EXISTS "${GIF_LIBRARY}") + set_target_properties(GIF::GIF PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${GIF_LIBRARY}") + endif() + endif() +endif() + +mark_as_advanced(GIF_INCLUDE_DIR GIF_LIBRARY) + +cmake_policy(POP) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindGnuTLS.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindGnuTLS.cmake new file mode 100644 index 0000000000000000000000000000000000000000..e4c42f3bc026cee43d4f045e1c2d4ab199eb23d3 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindGnuTLS.cmake @@ -0,0 +1,86 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindGnuTLS +---------- + +Find the GNU Transport Layer Security library (gnutls) + +IMPORTED Targets +^^^^^^^^^^^^^^^^ + +.. versionadded:: 3.16 + +This module defines :prop_tgt:`IMPORTED` target ``GnuTLS::GnuTLS``, if +gnutls has been found. + +Result Variables +^^^^^^^^^^^^^^^^ + +``GNUTLS_FOUND`` + System has gnutls +``GNUTLS_INCLUDE_DIR`` + The gnutls include directory +``GNUTLS_LIBRARIES`` + The libraries needed to use gnutls +``GNUTLS_DEFINITIONS`` + Compiler switches required for using gnutls +``GNUTLS_VERSION`` + version of gnutls. +#]=======================================================================] + +# Note that this doesn't try to find the gnutls-extra package. + + +if (GNUTLS_INCLUDE_DIR AND GNUTLS_LIBRARY) + # in cache already + set(gnutls_FIND_QUIETLY TRUE) +endif () + +if (NOT WIN32) + # try using pkg-config to get the directories and then use these values + # in the find_path() and find_library() calls + # also fills in GNUTLS_DEFINITIONS, although that isn't normally useful + find_package(PkgConfig QUIET) + if(PKG_CONFIG_FOUND) + PKG_CHECK_MODULES(PC_GNUTLS QUIET gnutls) + endif() + set(GNUTLS_DEFINITIONS ${PC_GNUTLS_CFLAGS_OTHER}) + set(GNUTLS_VERSION ${PC_GNUTLS_VERSION}) + # keep for backward compatibility + set(GNUTLS_VERSION_STRING ${PC_GNUTLS_VERSION}) +endif () + +find_path(GNUTLS_INCLUDE_DIR gnutls/gnutls.h + HINTS + ${PC_GNUTLS_INCLUDEDIR} + ${PC_GNUTLS_INCLUDE_DIRS} + ) + +find_library(GNUTLS_LIBRARY NAMES gnutls libgnutls + HINTS + ${PC_GNUTLS_LIBDIR} + ${PC_GNUTLS_LIBRARY_DIRS} + ) + +mark_as_advanced(GNUTLS_INCLUDE_DIR GNUTLS_LIBRARY) + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GnuTLS + REQUIRED_VARS GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR + VERSION_VAR GNUTLS_VERSION_STRING) + +if(GNUTLS_FOUND) + set(GNUTLS_LIBRARIES ${GNUTLS_LIBRARY}) + set(GNUTLS_INCLUDE_DIRS ${GNUTLS_INCLUDE_DIR}) + + if(NOT TARGET GnuTLS::GnuTLS) + add_library(GnuTLS::GnuTLS UNKNOWN IMPORTED) + set_target_properties(GnuTLS::GnuTLS PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${GNUTLS_INCLUDE_DIRS}" + INTERFACE_COMPILE_DEFINITIONS "${GNUTLS_DEFINITIONS}" + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${GNUTLS_LIBRARIES}") + endif() +endif() diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindICU.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindICU.cmake new file mode 100644 index 0000000000000000000000000000000000000000..63c25760ec1a2294e63d3befbff048d9ba31da5d --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindICU.cmake @@ -0,0 +1,363 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindICU +------- + +.. versionadded:: 3.7 + +Find the International Components for Unicode (ICU) libraries and +programs. + +This module supports multiple components. +Components can include any of: ``data``, ``i18n``, ``io``, ``le``, +``lx``, ``test``, ``tu`` and ``uc``. + +Note that on Windows ``data`` is named ``dt`` and ``i18n`` is named +``in``; any of the names may be used, and the appropriate +platform-specific library name will be automatically selected. + +.. versionadded:: 3.11 + Added support for static libraries on Windows. + +This module reports information about the ICU installation in +several variables. General variables:: + + ICU_FOUND - true if the main programs and libraries were found + ICU_INCLUDE_DIRS - the directories containing the ICU headers + ICU_LIBRARIES - component libraries to be linked + ICU_VERSION - ICU release version + +Imported targets:: + + ICU:: + +Where ```` is the name of an ICU component, for example +``ICU::i18n``; ```` is lower-case. + +ICU programs are reported in:: + + ICU_GENCNVAL_EXECUTABLE - path to gencnval executable + ICU_ICUINFO_EXECUTABLE - path to icuinfo executable + ICU_GENBRK_EXECUTABLE - path to genbrk executable + ICU_ICU-CONFIG_EXECUTABLE - path to icu-config executable + ICU_GENRB_EXECUTABLE - path to genrb executable + ICU_GENDICT_EXECUTABLE - path to gendict executable + ICU_DERB_EXECUTABLE - path to derb executable + ICU_PKGDATA_EXECUTABLE - path to pkgdata executable + ICU_UCONV_EXECUTABLE - path to uconv executable + ICU_GENCFU_EXECUTABLE - path to gencfu executable + ICU_MAKECONV_EXECUTABLE - path to makeconv executable + ICU_GENNORM2_EXECUTABLE - path to gennorm2 executable + ICU_GENCCODE_EXECUTABLE - path to genccode executable + ICU_GENSPREP_EXECUTABLE - path to gensprep executable + ICU_ICUPKG_EXECUTABLE - path to icupkg executable + ICU_GENCMN_EXECUTABLE - path to gencmn executable + +ICU component libraries are reported in:: + + ICU__FOUND - ON if component was found; ```` is upper-case. + ICU__LIBRARIES - libraries for component; ```` is upper-case. + +ICU datafiles are reported in:: + + ICU_MAKEFILE_INC - Makefile.inc + ICU_PKGDATA_INC - pkgdata.inc + +This module reads hints about search results from:: + + ICU_ROOT - the root of the ICU installation + +The environment variable ``ICU_ROOT`` may also be used; the +ICU_ROOT variable takes precedence. + +The following cache variables may also be set:: + + ICU_

_EXECUTABLE - the path to executable

; ``

`` is upper-case. + ICU_INCLUDE_DIR - the directory containing the ICU headers + ICU__LIBRARY - the library for component ; ```` is upper-case. + +.. note:: + + In most cases none of the above variables will require setting, + unless multiple ICU versions are available and a specific version + is required. +#]=======================================================================] + +cmake_policy(PUSH) +cmake_policy(SET CMP0159 NEW) # file(STRINGS) with REGEX updates CMAKE_MATCH_ +# Written by Roger Leigh + +set(icu_programs + gencnval + icuinfo + genbrk + icu-config + genrb + gendict + derb + pkgdata + uconv + gencfu + makeconv + gennorm2 + genccode + gensprep + icupkg + gencmn) + +set(icu_data + Makefile.inc + pkgdata.inc) + +# The ICU checks are contained in a function due to the large number +# of temporary variables needed. +function(_ICU_FIND) + # Set up search paths, taking compiler into account. Search ICU_ROOT, + # with ICU_ROOT in the environment as a fallback if unset. + if(ICU_ROOT) + list(APPEND icu_roots "${ICU_ROOT}") + else() + if(NOT "$ENV{ICU_ROOT}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{ICU_ROOT}" NATIVE_PATH) + list(APPEND icu_roots "${NATIVE_PATH}") + set(ICU_ROOT "${NATIVE_PATH}" + CACHE PATH "Location of the ICU installation" FORCE) + endif() + endif() + + # Find include directory + list(APPEND icu_include_suffixes "include") + find_path(ICU_INCLUDE_DIR + NAMES "unicode/utypes.h" + HINTS ${icu_roots} + PATH_SUFFIXES ${icu_include_suffixes} + DOC "ICU include directory") + mark_as_advanced(ICU_INCLUDE_DIR) + set(ICU_INCLUDE_DIR "${ICU_INCLUDE_DIR}" PARENT_SCOPE) + + # Get version + if(ICU_INCLUDE_DIR AND EXISTS "${ICU_INCLUDE_DIR}/unicode/uvernum.h") + file(STRINGS "${ICU_INCLUDE_DIR}/unicode/uvernum.h" icu_header_str + REGEX "^#define[\t ]+U_ICU_VERSION[\t ]+\".*\".*") + + string(REGEX REPLACE "^#define[\t ]+U_ICU_VERSION[\t ]+\"([^ \\n]*)\".*" + "\\1" icu_version_string "${icu_header_str}") + set(ICU_VERSION "${icu_version_string}") + set(ICU_VERSION "${icu_version_string}" PARENT_SCOPE) + unset(icu_header_str) + unset(icu_version_string) + endif() + + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + # 64-bit binary directory + set(_bin64 "bin64") + # 64-bit library directory + set(_lib64 "lib64") + endif() + + + # Find all ICU programs + list(APPEND icu_binary_suffixes "${_bin64}" "bin" "sbin") + foreach(program ${icu_programs}) + string(TOUPPER "${program}" program_upcase) + set(cache_var "ICU_${program_upcase}_EXECUTABLE") + set(program_var "ICU_${program_upcase}_EXECUTABLE") + find_program("${cache_var}" + NAMES "${program}" + HINTS ${icu_roots} + PATH_SUFFIXES ${icu_binary_suffixes} + DOC "ICU ${program} executable" + NO_PACKAGE_ROOT_PATH + ) + mark_as_advanced("${cache_var}") + set("${program_var}" "${${cache_var}}" PARENT_SCOPE) + endforeach() + + # Find all ICU libraries + list(APPEND icu_library_suffixes "${_lib64}" "lib") + set(static_prefix ) + # static icu libraries compiled with MSVC have the prefix 's' + if(MSVC) + set(static_prefix "s") + endif() + foreach(component ${ICU_FIND_COMPONENTS}) + string(TOUPPER "${component}" component_upcase) + set(component_cache "ICU_${component_upcase}_LIBRARY") + set(component_cache_release "${component_cache}_RELEASE") + set(component_cache_debug "${component_cache}_DEBUG") + set(component_found "ICU_${component}_FOUND") + set(component_found_compat "${component_upcase}_FOUND") + set(component_found_compat2 "ICU_${component_upcase}_FOUND") + set(component_libnames "icu${component}") + set(component_debug_libnames "icu${component}d") + + # Special case deliberate library naming mismatches between Unix + # and Windows builds + unset(component_libnames) + unset(component_debug_libnames) + list(APPEND component_libnames "icu${component}") + list(APPEND component_debug_libnames "icu${component}d") + if(component STREQUAL "data") + list(APPEND component_libnames "icudt") + # Note there is no debug variant at present + list(APPEND component_debug_libnames "icudtd") + endif() + if(component STREQUAL "dt") + list(APPEND component_libnames "icudata") + # Note there is no debug variant at present + list(APPEND component_debug_libnames "icudatad") + endif() + if(component STREQUAL "i18n") + list(APPEND component_libnames "icuin") + list(APPEND component_debug_libnames "icuind") + endif() + if(component STREQUAL "in") + list(APPEND component_libnames "icui18n") + list(APPEND component_debug_libnames "icui18nd") + endif() + + if(static_prefix) + unset(static_component_libnames) + unset(static_component_debug_libnames) + foreach(component_libname ${component_libnames}) + list(APPEND static_component_libnames + ${static_prefix}${component_libname}) + endforeach() + foreach(component_libname ${component_debug_libnames}) + list(APPEND static_component_debug_libnames + ${static_prefix}${component_libname}) + endforeach() + list(APPEND component_libnames ${static_component_libnames}) + list(APPEND component_debug_libnames ${static_component_debug_libnames}) + endif() + find_library("${component_cache_release}" + NAMES ${component_libnames} + HINTS ${icu_roots} + PATH_SUFFIXES ${icu_library_suffixes} + DOC "ICU ${component} library (release)" + NO_PACKAGE_ROOT_PATH + ) + find_library("${component_cache_debug}" + NAMES ${component_debug_libnames} + HINTS ${icu_roots} + PATH_SUFFIXES ${icu_library_suffixes} + DOC "ICU ${component} library (debug)" + NO_PACKAGE_ROOT_PATH + ) + include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) + select_library_configurations(ICU_${component_upcase}) + mark_as_advanced("${component_cache_release}" "${component_cache_debug}") + if(${component_cache}) + set("${component_found}" ON) + set("${component_found_compat}" ON) + set("${component_found_compat2}" ON) + list(APPEND ICU_LIBRARY "${${component_cache}}") + endif() + mark_as_advanced("${component_found}") + mark_as_advanced("${component_found_compat}") + mark_as_advanced("${component_found_compat2}") + set("${component_cache}" "${${component_cache}}" PARENT_SCOPE) + set("${component_found}" "${${component_found}}" PARENT_SCOPE) + set("${component_found_compat}" "${${component_found_compat}}" PARENT_SCOPE) + set("${component_found_compat2}" "${${component_found_compat2}}" PARENT_SCOPE) + endforeach() + set(ICU_LIBRARY "${ICU_LIBRARY}" PARENT_SCOPE) + + # Find all ICU data files + if(CMAKE_LIBRARY_ARCHITECTURE) + list(APPEND icu_data_suffixes + "${_lib64}/${CMAKE_LIBRARY_ARCHITECTURE}/icu/${ICU_VERSION}" + "lib/${CMAKE_LIBRARY_ARCHITECTURE}/icu/${ICU_VERSION}" + "${_lib64}/${CMAKE_LIBRARY_ARCHITECTURE}/icu" + "lib/${CMAKE_LIBRARY_ARCHITECTURE}/icu") + endif() + list(APPEND icu_data_suffixes + "${_lib64}/icu/${ICU_VERSION}" + "lib/icu/${ICU_VERSION}" + "${_lib64}/icu" + "lib/icu") + foreach(data ${icu_data}) + string(TOUPPER "${data}" data_upcase) + string(REPLACE "." "_" data_upcase "${data_upcase}") + set(cache_var "ICU_${data_upcase}") + set(data_var "ICU_${data_upcase}") + find_file("${cache_var}" + NAMES "${data}" + HINTS ${icu_roots} + PATH_SUFFIXES ${icu_data_suffixes} + DOC "ICU ${data} data file") + mark_as_advanced("${cache_var}") + set("${data_var}" "${${cache_var}}" PARENT_SCOPE) + endforeach() +endfunction() + +_ICU_FIND() + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +find_package_handle_standard_args(ICU + REQUIRED_VARS + ICU_INCLUDE_DIR + ICU_LIBRARY + VERSION_VAR + ICU_VERSION + HANDLE_COMPONENTS + FAIL_MESSAGE + "Failed to find all ICU components" +) + +if(ICU_FOUND) + set(ICU_INCLUDE_DIRS "${ICU_INCLUDE_DIR}") + set(ICU_LIBRARIES "${ICU_LIBRARY}") + foreach(_ICU_component ${ICU_FIND_COMPONENTS}) + string(TOUPPER "${_ICU_component}" _ICU_component_upcase) + set(_ICU_component_cache "ICU_${_ICU_component_upcase}_LIBRARY") + set(_ICU_component_cache_release "ICU_${_ICU_component_upcase}_LIBRARY_RELEASE") + set(_ICU_component_cache_debug "ICU_${_ICU_component_upcase}_LIBRARY_DEBUG") + set(_ICU_component_lib "ICU_${_ICU_component_upcase}_LIBRARIES") + set(_ICU_component_found "ICU_${_ICU_component_upcase}_FOUND") + set(_ICU_imported_target "ICU::${_ICU_component}") + if(${_ICU_component_found}) + set("${_ICU_component_lib}" "${${_ICU_component_cache}}") + if(NOT TARGET ${_ICU_imported_target}) + add_library(${_ICU_imported_target} UNKNOWN IMPORTED) + if(ICU_INCLUDE_DIR) + set_target_properties(${_ICU_imported_target} PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${ICU_INCLUDE_DIR}") + endif() + if(EXISTS "${${_ICU_component_cache}}") + set_target_properties(${_ICU_imported_target} PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" + IMPORTED_LOCATION "${${_ICU_component_cache}}") + endif() + if(EXISTS "${${_ICU_component_cache_release}}") + set_property(TARGET ${_ICU_imported_target} APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(${_ICU_imported_target} PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" + IMPORTED_LOCATION_RELEASE "${${_ICU_component_cache_release}}") + endif() + if(EXISTS "${${_ICU_component_cache_debug}}") + set_property(TARGET ${_ICU_imported_target} APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(${_ICU_imported_target} PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" + IMPORTED_LOCATION_DEBUG "${${_ICU_component_cache_debug}}") + endif() + if(CMAKE_DL_LIBS AND _ICU_component STREQUAL "uc") + set_target_properties(${_ICU_imported_target} PROPERTIES + INTERFACE_LINK_LIBRARIES "${CMAKE_DL_LIBS}") + endif() + endif() + endif() + unset(_ICU_component_upcase) + unset(_ICU_component_cache) + unset(_ICU_component_lib) + unset(_ICU_component_found) + unset(_ICU_imported_target) + endforeach() +endif() + +unset(icu_programs) +cmake_policy(POP) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindJasper.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindJasper.cmake new file mode 100644 index 0000000000000000000000000000000000000000..79afcd508d6d2aa8e5c07d3291ca8f403fd4335c --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindJasper.cmake @@ -0,0 +1,95 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindJasper +---------- + +Find the Jasper JPEG2000 library. + +IMPORTED Targets +^^^^^^^^^^^^^^^^ + +``Jasper::Jasper`` + The jasper library, if found. + +Result Variables +^^^^^^^^^^^^^^^^ + +This module defines the following variables: + +``JASPER_FOUND`` + system has Jasper +``JASPER_INCLUDE_DIRS`` + .. versionadded:: 3.22 + + the Jasper include directory +``JASPER_LIBRARIES`` + the libraries needed to use Jasper +``JASPER_VERSION_STRING`` + the version of Jasper found + +Cache variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``JASPER_INCLUDE_DIR`` + where to find jasper/jasper.h, etc. +``JASPER_LIBRARY_RELEASE`` + where to find the Jasper library (optimized). +``JASPER_LIBARRY_DEBUG`` + where to find the Jasper library (debug). +#]=======================================================================] + +cmake_policy(PUSH) +cmake_policy(SET CMP0159 NEW) # file(STRINGS) with REGEX updates CMAKE_MATCH_ + +find_path(JASPER_INCLUDE_DIR jasper/jasper.h) +mark_as_advanced(JASPER_INCLUDE_DIR) + +if(NOT JASPER_LIBRARIES) + find_package(JPEG) + find_library(JASPER_LIBRARY_RELEASE NAMES jasper libjasper) + find_library(JASPER_LIBRARY_DEBUG NAMES jasperd) + include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) + select_library_configurations(JASPER) +endif() + +if(JASPER_INCLUDE_DIR AND EXISTS "${JASPER_INCLUDE_DIR}/jasper/jas_config.h") + file(STRINGS "${JASPER_INCLUDE_DIR}/jasper/jas_config.h" jasper_version_str REGEX "^#define[\t ]+JAS_VERSION[\t ]+\".*\".*") + string(REGEX REPLACE "^#define[\t ]+JAS_VERSION[\t ]+\"([^\"]+)\".*" "\\1" JASPER_VERSION_STRING "${jasper_version_str}") +endif() + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +find_package_handle_standard_args(Jasper + REQUIRED_VARS JASPER_LIBRARIES JASPER_INCLUDE_DIR JPEG_LIBRARIES + VERSION_VAR JASPER_VERSION_STRING) + +if(JASPER_FOUND) + set(JASPER_LIBRARIES ${JASPER_LIBRARIES} ${JPEG_LIBRARIES}) + set(JASPER_INCLUDE_DIRS ${JASPER_INCLUDE_DIR}) + if(NOT TARGET Jasper::Jasper) + add_library(Jasper::Jasper UNKNOWN IMPORTED) + if(JASPER_INCLUDE_DIRS) + set_target_properties(Jasper::Jasper PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${JASPER_INCLUDE_DIRS}") + endif() + if(EXISTS "${JASPER_LIBRARY_RELEASE}") + set_property(TARGET Jasper::Jasper APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(Jasper::Jasper PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" + IMPORTED_LOCATION "${JASPER_LIBRARY_RELEASE}") + endif() + if(EXISTS "${JASPER_LIBRARY_DEBUG}") + set_property(TARGET Jasper::Jasper APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(Jasper::Jasper PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C" + IMPORTED_LOCATION "${JASPER_LIBRARY_DEBUG}") + endif() + endif() +endif() + +cmake_policy(POP) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindJava.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindJava.cmake new file mode 100644 index 0000000000000000000000000000000000000000..74e424b354dae196b23e2a452314dab7f53e5858 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindJava.cmake @@ -0,0 +1,354 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindJava +-------- + +Find Java + +This module finds if Java is installed and determines where the +include files and libraries are. The caller may set variable ``JAVA_HOME`` +to specify a Java installation prefix explicitly. + +See also the :module:`FindJNI` module to find Java Native Interface (JNI). + +.. versionadded:: 3.10 + Added support for Java 9+ version parsing. + +Specify one or more of the following components as you call this find module. See example below. + +:: + + Runtime = Java Runtime Environment used to execute Java byte-compiled applications + Development = Development tools (java, javac, javah, jar and javadoc), includes Runtime component + IdlJ = Interface Description Language (IDL) to Java compiler + JarSigner = Signer and verifier tool for Java Archive (JAR) files + + +This module sets the following result variables: + +:: + + Java_JAVA_EXECUTABLE = the full path to the Java runtime + Java_JAVAC_EXECUTABLE = the full path to the Java compiler + Java_JAVAH_EXECUTABLE = the full path to the Java header generator + Java_JAVADOC_EXECUTABLE = the full path to the Java documentation generator + Java_IDLJ_EXECUTABLE = the full path to the Java idl compiler + Java_JAR_EXECUTABLE = the full path to the Java archiver + Java_JARSIGNER_EXECUTABLE = the full path to the Java jar signer + Java_VERSION_STRING = Version of java found, eg. 1.6.0_12 + Java_VERSION_MAJOR = The major version of the package found. + Java_VERSION_MINOR = The minor version of the package found. + Java_VERSION_PATCH = The patch version of the package found. + Java_VERSION_TWEAK = The tweak version of the package found (after '_') + Java_VERSION = This is set to: $major[.$minor[.$patch[.$tweak]]] + +.. versionadded:: 3.4 + Added the ``Java_IDLJ_EXECUTABLE`` and ``Java_JARSIGNER_EXECUTABLE`` + variables. + +The minimum required version of Java can be specified using the +:command:`find_package` syntax, e.g. + +.. code-block:: cmake + + find_package(Java 1.8) + +NOTE: ``${Java_VERSION}`` and ``${Java_VERSION_STRING}`` are not guaranteed to +be identical. For example some java version may return: +``Java_VERSION_STRING = 1.8.0_17`` and ``Java_VERSION = 1.8.0.17`` + +another example is the Java OEM, with: ``Java_VERSION_STRING = 1.8.0-oem`` +and ``Java_VERSION = 1.8.0`` + +For these components the following variables are set: + +:: + + Java_FOUND - TRUE if all components are found. + Java__FOUND - TRUE if is found. + + + +Example Usages: + +:: + + find_package(Java) + find_package(Java 1.8 REQUIRED) + find_package(Java COMPONENTS Runtime) + find_package(Java COMPONENTS Development) +#]=======================================================================] + +include(${CMAKE_CURRENT_LIST_DIR}/CMakeFindJavaCommon.cmake) + +# The HINTS option should only be used for values computed from the system. +set(_JAVA_HINTS) +if(_JAVA_HOME) + list(APPEND _JAVA_HINTS ${_JAVA_HOME}/bin) +endif() +if (WIN32) + macro (_JAVA_GET_INSTALLED_VERSIONS _KIND) + cmake_host_system_information(RESULT _JAVA_VERSIONS + QUERY WINDOWS_REGISTRY "HKLM/SOFTWARE/JavaSoft/${_KIND}" + SUBKEYS) + if (_JAVA_VERSIONS) + string (REGEX MATCHALL "[0-9._]+" _JAVA_VERSIONS "${_JAVA_VERSIONS}") + string (REGEX REPLACE "([0-9._]+)" "\\1" _JAVA_VERSIONS "${_JAVA_VERSIONS}") + if (_JAVA_VERSIONS) + # sort versions. Most recent first + list (SORT _JAVA_VERSIONS COMPARE NATURAL ORDER DESCENDING) + foreach (_JAVA_VERSION IN LISTS _JAVA_VERSIONS) + string(REPLACE "_" "." _JAVA_CMAKE_VERSION "${_JAVA_VERSION}") + if (Java_FIND_VERSION_EXACT + AND NOT _JAVA_CMAKE_VERSION MATCHES "^${Java_FIND_VERSION}") + continue() + endif() + list(APPEND _JAVA_HINTS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\${_KIND}\\${_JAVA_VERSION};JavaHome]/bin") + endforeach() + endif() + endif() + endmacro() + + # for version 9 and upper + _JAVA_GET_INSTALLED_VERSIONS("JDK") + _JAVA_GET_INSTALLED_VERSIONS("JRE") + + # for versions older than 9 + _JAVA_GET_INSTALLED_VERSIONS("Java Development Kit") + _JAVA_GET_INSTALLED_VERSIONS("Java Runtime Environment") +endif() + +# Hard-coded guesses should still go in PATHS. This ensures that the user +# environment can always override hard guesses. +set(_JAVA_PATHS + /usr/lib/java/bin + /usr/share/java/bin + /usr/local/java/bin + /usr/local/java/share/bin + /usr/java/j2sdk1.4.2_04 + /usr/lib/j2sdk1.4-sun/bin + /usr/java/j2sdk1.4.2_09/bin + /usr/lib/j2sdk1.5-sun/bin + /opt/sun-jdk-1.5.0.04/bin + /usr/local/jdk-1.7.0/bin + /usr/local/jdk-1.6.0/bin + ) +find_program(Java_JAVA_EXECUTABLE + NAMES java + HINTS ${_JAVA_HINTS} + PATHS ${_JAVA_PATHS} +) + +if(Java_JAVA_EXECUTABLE) + execute_process(COMMAND "${Java_JAVA_EXECUTABLE}" -version + RESULT_VARIABLE _java_res + OUTPUT_VARIABLE _java_var + ERROR_VARIABLE _java_var # sun-java output to stderr + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE) + if(_java_res) + if(NOT Java_FIND_QUIETLY) + message(STATUS "Java version check failed: " + "${Java_JAVA_EXECUTABLE} -version returned an error: \"${_java_var}\"") + endif() + if(_java_var MATCHES "Unable to locate a Java Runtime|No Java runtime present, requesting install") + # macOS distributes a java stub that provides an error message + set(Java_JAVA_EXECUTABLE "Java_JAVA_EXECUTABLE-NOTFOUND" CACHE PATH + "Path to the Java executable" FORCE) + endif() + else() + # Extract version components (up to 4 levels) from "java -version" output. + set(_java_version_regex [[(([0-9]+)(\.([0-9]+)(\.([0-9]+)(_([0-9]+))?)?)?.*)]]) + if(_java_var MATCHES "java version \"${_java_version_regex}\"") + # Sun, GCJ, older OpenJDK + set(Java_VERSION_STRING "${CMAKE_MATCH_1}") + set(Java_VERSION_MAJOR "${CMAKE_MATCH_2}") + if (CMAKE_MATCH_4) + set(Java_VERSION_MINOR "${CMAKE_MATCH_4}") + else() + set(Java_VERSION_MINOR 0) + endif() + if (CMAKE_MATCH_6) + set(Java_VERSION_PATCH "${CMAKE_MATCH_6}") + else() + set(Java_VERSION_PATCH 0) + endif() + set(Java_VERSION_TWEAK "${CMAKE_MATCH_8}") + elseif(_java_var MATCHES "openjdk version \"${_java_version_regex}\"") + # OpenJDK + set(Java_VERSION_STRING "${CMAKE_MATCH_1}") + set(Java_VERSION_MAJOR "${CMAKE_MATCH_2}") + if (CMAKE_MATCH_4) + set(Java_VERSION_MINOR "${CMAKE_MATCH_4}") + else() + set(Java_VERSION_MINOR 0) + endif() + if (CMAKE_MATCH_6) + set(Java_VERSION_PATCH "${CMAKE_MATCH_6}") + else() + set(Java_VERSION_PATCH 0) + endif() + set(Java_VERSION_TWEAK "${CMAKE_MATCH_8}") + elseif(_java_var MATCHES "openjdk version \"([0-9]+)-[A-Za-z]+\"") + # OpenJDK 9 early access builds or locally built + set(Java_VERSION_STRING "1.${CMAKE_MATCH_1}.0") + set(Java_VERSION_MAJOR "1") + set(Java_VERSION_MINOR "${CMAKE_MATCH_1}") + set(Java_VERSION_PATCH "0") + set(Java_VERSION_TWEAK "") + elseif(_java_var MATCHES "java full version \"kaffe-${_java_version_regex}\"") + # Kaffe style + set(Java_VERSION_STRING "${CMAKE_MATCH_1}") + set(Java_VERSION_MAJOR "${CMAKE_MATCH_2}") + set(Java_VERSION_MINOR "${CMAKE_MATCH_4}") + set(Java_VERSION_PATCH "${CMAKE_MATCH_6}") + set(Java_VERSION_TWEAK "${CMAKE_MATCH_8}") + else() + if(NOT Java_FIND_QUIETLY) + string(REPLACE "\n" "\n " ver_msg "\n${_java_var}") + message(WARNING "Java version not recognized:${ver_msg}\nPlease report.") + endif() + set(Java_VERSION_STRING "") + set(Java_VERSION_MAJOR "") + set(Java_VERSION_MINOR "") + set(Java_VERSION_PATCH "") + set(Java_VERSION_TWEAK "") + endif() + unset(_java_version_regex) + unset(_java_var) + set(Java_VERSION "${Java_VERSION_MAJOR}") + if(NOT "x${Java_VERSION}" STREQUAL "x") + foreach(_java_c IN ITEMS "MINOR" "PATCH" "TWEAK") + if(NOT "x${Java_VERSION_${_java_c}}" STREQUAL "x") + string(APPEND Java_VERSION ".${Java_VERSION_${_java_c}}") + else() + break() + endif() + endforeach() + unset(_java_c) + endif() + endif() + unset(_java_res) +endif() + + +find_program(Java_JAR_EXECUTABLE + NAMES jar + HINTS ${_JAVA_HINTS} + PATHS ${_JAVA_PATHS} +) + +find_program(Java_JAVAC_EXECUTABLE + NAMES javac + HINTS ${_JAVA_HINTS} + PATHS ${_JAVA_PATHS} +) + +find_program(Java_JAVAH_EXECUTABLE + NAMES javah + HINTS ${_JAVA_HINTS} + PATHS ${_JAVA_PATHS} +) + +find_program(Java_JAVADOC_EXECUTABLE + NAMES javadoc + HINTS ${_JAVA_HINTS} + PATHS ${_JAVA_PATHS} +) + +find_program(Java_IDLJ_EXECUTABLE + NAMES idlj + HINTS ${_JAVA_HINTS} + PATHS ${_JAVA_PATHS} +) + +find_program(Java_JARSIGNER_EXECUTABLE + NAMES jarsigner + HINTS ${_JAVA_HINTS} + PATHS ${_JAVA_PATHS} +) + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +if(Java_FIND_COMPONENTS) + set(_JAVA_REQUIRED_VARS) + foreach(component IN LISTS Java_FIND_COMPONENTS) + # User just want to execute some Java byte-compiled + If(component STREQUAL "Runtime") + list(APPEND _JAVA_REQUIRED_VARS Java_JAVA_EXECUTABLE) + if(Java_JAVA_EXECUTABLE) + set(Java_Runtime_FOUND TRUE) + endif() + elseif(component STREQUAL "Development") + list(APPEND _JAVA_REQUIRED_VARS Java_JAVA_EXECUTABLE Java_JAVAC_EXECUTABLE + Java_JAR_EXECUTABLE Java_JAVADOC_EXECUTABLE) + if(Java_VERSION VERSION_LESS "10") + list(APPEND _JAVA_REQUIRED_VARS Java_JAVAH_EXECUTABLE) + if(Java_JAVA_EXECUTABLE AND Java_JAVAC_EXECUTABLE + AND Java_JAVAH_EXECUTABLE AND Java_JAR_EXECUTABLE AND Java_JAVADOC_EXECUTABLE) + set(Java_Development_FOUND TRUE) + endif() + else() + if(Java_JAVA_EXECUTABLE AND Java_JAVAC_EXECUTABLE + AND Java_JAR_EXECUTABLE AND Java_JAVADOC_EXECUTABLE) + set(Java_Development_FOUND TRUE) + endif() + endif() + elseif(component STREQUAL "IdlJ") + list(APPEND _JAVA_REQUIRED_VARS Java_IDLJ_EXECUTABLE) + if(Java_IDLJ_EXECUTABLE) + set(Java_IdlJ_FOUND TRUE) + endif() + elseif(component STREQUAL "JarSigner") + list(APPEND _JAVA_REQUIRED_VARS Java_JARSIGNER_EXECUTABLE) + if(Java_JARSIGNER_EXECUTABLE) + set(Java_JarSigner_FOUND TRUE) + endif() + else() + message(FATAL_ERROR "Comp: ${component} is not handled") + endif() + endforeach() + list (REMOVE_DUPLICATES _JAVA_REQUIRED_VARS) + find_package_handle_standard_args(Java + REQUIRED_VARS ${_JAVA_REQUIRED_VARS} HANDLE_COMPONENTS + VERSION_VAR Java_VERSION + ) + if(Java_FOUND) + foreach(component IN LISTS Java_FIND_COMPONENTS) + set(Java_${component}_FOUND TRUE) + endforeach() + endif() + unset(_JAVA_REQUIRED_VARS) +else() + # Check for Development + if(Java_VERSION VERSION_LESS "10") + find_package_handle_standard_args(Java + REQUIRED_VARS Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE + Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE + VERSION_VAR Java_VERSION + ) + else() + find_package_handle_standard_args(Java + REQUIRED_VARS Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE + Java_JAVADOC_EXECUTABLE + VERSION_VAR Java_VERSION + ) + endif() +endif() + + +mark_as_advanced( + Java_JAVA_EXECUTABLE + Java_JAR_EXECUTABLE + Java_JAVAC_EXECUTABLE + Java_JAVAH_EXECUTABLE + Java_JAVADOC_EXECUTABLE + Java_IDLJ_EXECUTABLE + Java_JARSIGNER_EXECUTABLE +) + +# LEGACY +set(JAVA_RUNTIME ${Java_JAVA_EXECUTABLE}) +set(JAVA_ARCHIVE ${Java_JAR_EXECUTABLE}) +set(JAVA_COMPILE ${Java_JAVAC_EXECUTABLE}) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindMPI.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindMPI.cmake new file mode 100644 index 0000000000000000000000000000000000000000..0f06c577da1b2668b07c7972825422b587d1046a --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindMPI.cmake @@ -0,0 +1,1912 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindMPI +------- + +Find a Message Passing Interface (MPI) implementation. + +The Message Passing Interface (MPI) is a library used to write +high-performance distributed-memory parallel applications, and is +typically deployed on a cluster. MPI is a standard interface (defined +by the MPI forum) for which many implementations are available. + +.. versionadded:: 3.10 + Major overhaul of the module: many new variables, per-language components, + support for a wider variety of runtimes. + +Variables for using MPI +^^^^^^^^^^^^^^^^^^^^^^^ + +The module exposes the components ``C``, ``CXX``, ``MPICXX`` and ``Fortran``. +Each of these controls the various MPI languages to search for. +The difference between ``CXX`` and ``MPICXX`` is that ``CXX`` refers to the +MPI C API being usable from C++, whereas ``MPICXX`` refers to the MPI-2 C++ API +that was removed again in MPI-3. + +Depending on the enabled components the following variables will be set: + +``MPI_FOUND`` + Variable indicating that MPI settings for all requested languages have been found. + If no components are specified, this is true if MPI settings for all enabled languages + were detected. Note that the ``MPICXX`` component does not affect this variable. +``MPI_VERSION`` + Minimal version of MPI detected among the requested languages, or all enabled languages + if no components were specified. + +This module will set the following variables per language in your +project, where ```` is one of C, CXX, or Fortran: + +``MPI__FOUND`` + Variable indicating the MPI settings for ```` were found and that + simple MPI test programs compile with the provided settings. +``MPI__COMPILER`` + MPI compiler for ```` if such a program exists. +``MPI__COMPILE_OPTIONS`` + Compilation options for MPI programs in ````, given as a :ref:`;-list `. +``MPI__COMPILE_DEFINITIONS`` + Compilation definitions for MPI programs in ````, given as a :ref:`;-list `. +``MPI__INCLUDE_DIRS`` + Include path(s) for MPI header. +``MPI__LINK_FLAGS`` + Linker flags for MPI programs. +``MPI__LIBRARIES`` + All libraries to link MPI programs against. + +.. versionadded:: 3.9 + Additionally, the following :prop_tgt:`IMPORTED` targets are defined: + +``MPI::MPI_`` + Target for using MPI from ````. + +The following variables indicating which bindings are present will be defined: + +``MPI_MPICXX_FOUND`` + Variable indicating whether the MPI-2 C++ bindings are present (introduced in MPI-2, removed with MPI-3). +``MPI_Fortran_HAVE_F77_HEADER`` + True if the Fortran 77 header ``mpif.h`` is available. +``MPI_Fortran_HAVE_F90_MODULE`` + True if the Fortran 90 module ``mpi`` can be used for accessing MPI (MPI-2 and higher only). +``MPI_Fortran_HAVE_F08_MODULE`` + True if the Fortran 2008 ``mpi_f08`` is available to MPI programs (MPI-3 and higher only). + +If possible, the MPI version will be determined by this module. The facilities to detect the MPI version +were introduced with MPI-1.2, and therefore cannot be found for older MPI versions. + +``MPI__VERSION_MAJOR`` + Major version of MPI implemented for ```` by the MPI distribution. +``MPI__VERSION_MINOR`` + Minor version of MPI implemented for ```` by the MPI distribution. +``MPI__VERSION`` + MPI version implemented for ```` by the MPI distribution. + +Note that there's no variable for the C bindings being accessible through ``mpi.h``, since the MPI standards +always have required this binding to work in both C and C++ code. + +For running MPI programs, the module sets the following variables + +``MPIEXEC_EXECUTABLE`` + Executable for running MPI programs, if such exists. +``MPIEXEC_NUMPROC_FLAG`` + Flag to pass to ``mpiexec`` before giving it the number of processors to run on. +``MPIEXEC_MAX_NUMPROCS`` + Number of MPI processors to utilize. Defaults to the number + of processors detected on the host system. +``MPIEXEC_PREFLAGS`` + Flags to pass to ``mpiexec`` directly before the executable to run. +``MPIEXEC_POSTFLAGS`` + Flags to pass to ``mpiexec`` after other flags. + +Variables for locating MPI +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This module performs a four step search for an MPI implementation: + +1. Search for ``MPIEXEC_EXECUTABLE`` and, if found, use its base directory. +2. Check if the compiler has MPI support built-in. This is the case if the user passed a + compiler wrapper as ``CMAKE__COMPILER`` or if they use Cray system compiler wrappers. +3. Attempt to find an MPI compiler wrapper and determine the compiler information from it. +4. Try to find an MPI implementation that does not ship such a wrapper by guessing settings. + Currently, only Microsoft MPI and MPICH2 on Windows are supported. + +For controlling the ``MPIEXEC_EXECUTABLE`` step, the following variables may be set: + +``MPIEXEC_EXECUTABLE`` + Manually specify the location of ``mpiexec``. +``MPI_HOME`` + Specify the base directory of the MPI installation. +``ENV{MPI_HOME}`` + Environment variable to specify the base directory of the MPI installation. +``ENV{I_MPI_ROOT}`` + Environment variable to specify the base directory of the MPI installation. + +For controlling the compiler wrapper step, the following variables may be set: + +``MPI__COMPILER`` + Search for the specified compiler wrapper and use it. +``MPI__COMPILER_FLAGS`` + Flags to pass to the MPI compiler wrapper during interrogation. Some compiler wrappers + support linking debug or tracing libraries if a specific flag is passed and this variable + may be used to obtain them. +``MPI_COMPILER_FLAGS`` + Used to initialize ``MPI__COMPILER_FLAGS`` if no language specific flag has been given. + Empty by default. +``MPI_EXECUTABLE_SUFFIX`` + A suffix which is appended to all names that are being looked for. For instance you may set this + to ``.mpich`` or ``.openmpi`` to prefer the one or the other on Debian and its derivatives. + +In order to control the guessing step, the following variable may be set: + +``MPI_GUESS_LIBRARY_NAME`` + Valid values are ``MSMPI`` and ``MPICH2``. If set, only the given library will be searched for. + By default, ``MSMPI`` will be preferred over ``MPICH2`` if both are available. + This also sets ``MPI_SKIP_COMPILER_WRAPPER`` to ``true``, which may be overridden. + +Each of the search steps may be skipped with the following control variables: + +``MPI_ASSUME_NO_BUILTIN_MPI`` + If true, the module assumes that the compiler itself does not provide an MPI implementation and + skips to step 2. +``MPI_SKIP_COMPILER_WRAPPER`` + If true, no compiler wrapper will be searched for. +``MPI_SKIP_GUESSING`` + If true, the guessing step will be skipped. + +Additionally, the following control variable is available to change search behavior: + +``MPI_CXX_SKIP_MPICXX`` + Add some definitions that will disable the MPI-2 C++ bindings. + Currently supported are MPICH, Open MPI, Platform MPI and derivatives thereof, + for example MVAPICH or Intel MPI. + +If the find procedure fails for a variable ``MPI__WORKS``, then the settings detected by or passed to +the module did not work and even a simple MPI test program failed to compile. + +If all of these parameters were not sufficient to find the right MPI implementation, a user may +disable the entire autodetection process by specifying both a list of libraries in ``MPI__LIBRARIES`` +and a list of include directories in ``MPI__ADDITIONAL_INCLUDE_DIRS``. +Any other variable may be set in addition to these two. The module will then validate the MPI settings and store the +settings in the cache. + +Cache variables for MPI +^^^^^^^^^^^^^^^^^^^^^^^ + +The variable ``MPI__INCLUDE_DIRS`` will be assembled from the following variables. +For C and CXX: + +``MPI__HEADER_DIR`` + Location of the ``mpi.h`` header on disk. + +For Fortran: + +``MPI_Fortran_F77_HEADER_DIR`` + Location of the Fortran 77 header ``mpif.h``, if it exists. +``MPI_Fortran_MODULE_DIR`` + Location of the ``mpi`` or ``mpi_f08`` modules, if available. + +For all languages the following variables are additionally considered: + +``MPI__ADDITIONAL_INCLUDE_DIRS`` + A :ref:`;-list ` of paths needed in addition to the normal include directories. +``MPI__INCLUDE_DIR`` + Path variables for include folders referred to by ````. +``MPI__ADDITIONAL_INCLUDE_VARS`` + A :ref:`;-list ` of ```` that will be added to the include locations of ````. + +The variable ``MPI__LIBRARIES`` will be assembled from the following variables: + +``MPI__LIBRARY`` + The location of a library called ```` for use with MPI. +``MPI__LIB_NAMES`` + A :ref:`;-list ` of ```` that will be added to the include locations of ````. + +Usage of mpiexec +^^^^^^^^^^^^^^^^ + +When using ``MPIEXEC_EXECUTABLE`` to execute MPI applications, you should typically +use all of the ``MPIEXEC_EXECUTABLE`` flags as follows: + +:: + + ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} + ${MPIEXEC_PREFLAGS} EXECUTABLE ${MPIEXEC_POSTFLAGS} ARGS + +where ``EXECUTABLE`` is the MPI program, and ``ARGS`` are the arguments to +pass to the MPI program. + +Advanced variables for using MPI +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The module can perform some advanced feature detections upon explicit request. + +**Important notice:** The following checks cannot be performed without *executing* an MPI test program. +Consider the special considerations for the behavior of :command:`try_run` during cross compilation. +Moreover, running an MPI program can cause additional issues, like a firewall notification on some systems. +You should only enable these detections if you absolutely need the information. + +If the following variables are set to true, the respective search will be performed: + +``MPI_DETERMINE_Fortran_CAPABILITIES`` + Determine for all available Fortran bindings what the values of ``MPI_SUBARRAYS_SUPPORTED`` and + ``MPI_ASYNC_PROTECTS_NONBLOCKING`` are and make their values available as ``MPI_Fortran__SUBARRAYS`` + and ``MPI_Fortran__ASYNCPROT``, where ```` is one of ``F77_HEADER``, ``F90_MODULE`` and + ``F08_MODULE``. +``MPI_DETERMINE_LIBRARY_VERSION`` + For each language, find the output of ``MPI_Get_library_version`` and make it available as ``MPI__LIBRARY_VERSION_STRING``. + This information is usually tied to the runtime component of an MPI implementation and might differ depending on ````. + Note that the return value is entirely implementation defined. This information might be used to identify + the MPI vendor and for example pick the correct one of multiple third party binaries that matches the MPI vendor. + +Backward Compatibility +^^^^^^^^^^^^^^^^^^^^^^ + +.. deprecated:: 3.10 + +For backward compatibility with older versions of FindMPI, these +variables are set: + +:: + + MPI_COMPILER MPI_LIBRARY MPI_EXTRA_LIBRARY + MPI_COMPILE_FLAGS MPI_INCLUDE_PATH MPI_LINK_FLAGS + MPI_LIBRARIES + +In new projects, please use the ``MPI__XXX`` equivalents. +Additionally, the following variables are deprecated: + +``MPI__COMPILE_FLAGS`` + Use ``MPI__COMPILE_OPTIONS`` and ``MPI__COMPILE_DEFINITIONS`` instead. +``MPI__INCLUDE_PATH`` + For consumption use ``MPI__INCLUDE_DIRS`` and for specifying folders use ``MPI__ADDITIONAL_INCLUDE_DIRS`` instead. +``MPIEXEC`` + Use ``MPIEXEC_EXECUTABLE`` instead. +#]=======================================================================] + +cmake_policy(PUSH) +cmake_policy(SET CMP0057 NEW) # if IN_LIST +cmake_policy(SET CMP0159 NEW) # file(STRINGS) with REGEX updates CMAKE_MATCH_ + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +find_package(PkgConfig QUIET) + +# Generic compiler names +set(_MPI_C_GENERIC_COMPILER_NAMES mpicc mpcc mpicc_r mpcc_r) +set(_MPI_CXX_GENERIC_COMPILER_NAMES mpicxx mpiCC mpcxx mpCC mpic++ mpc++ + mpicxx_r mpiCC_r mpcxx_r mpCC_r mpic++_r mpc++_r) +set(_MPI_Fortran_GENERIC_COMPILER_NAMES mpif95 mpif95_r mpf95 mpf95_r + mpif90 mpif90_r mpf90 mpf90_r + mpif77 mpif77_r mpf77 mpf77_r + mpifc) + +#Fujitsu cross/own compiler names +set(_MPI_Fujitsu_C_COMPILER_NAMES mpifccpx mpifcc) +set(_MPI_Fujitsu_CXX_COMPILER_NAMES mpiFCCpx mpiFCC) +set(_MPI_Fujitsu_Fortran_COMPILER_NAMES mpifrtpx mpifrt) +set(_MPI_FujitsuClang_C_COMPILER_NAMES mpifccpx mpifcc) +set(_MPI_FujitsuClang_CXX_COMPILER_NAMES mpiFCCpx mpiFCC) +set(_MPI_FujitsuClang_Fortran_COMPILER_NAMES mpifrtpx mpifrt) + +# GNU compiler names +set(_MPI_GNU_C_COMPILER_NAMES mpigcc mpgcc mpigcc_r mpgcc_r) +set(_MPI_GNU_CXX_COMPILER_NAMES mpig++ mpg++ mpig++_r mpg++_r mpigxx) +set(_MPI_GNU_Fortran_COMPILER_NAMES mpigfortran mpgfortran mpigfortran_r mpgfortran_r + mpig77 mpig77_r mpg77 mpg77_r) + +# Intel MPI compiler names on Windows +if(WIN32) + list(APPEND _MPI_C_GENERIC_COMPILER_NAMES mpicc.bat) + list(APPEND _MPI_CXX_GENERIC_COMPILER_NAMES mpicxx.bat) + list(APPEND _MPI_Fortran_GENERIC_COMPILER_NAMES mpifc.bat) + + # Intel MPI compiler names + set(_MPI_Intel_C_COMPILER_NAMES mpiicc.bat) + set(_MPI_Intel_CXX_COMPILER_NAMES mpiicpc.bat) + set(_MPI_Intel_Fortran_COMPILER_NAMES mpiifort.bat mpif77.bat mpif90.bat) + + # Intel MPI compiler names + set(_MPI_IntelLLVM_C_COMPILER_NAMES mpiicx.bat mpiicc.bat) + set(_MPI_IntelLLVM_CXX_COMPILER_NAMES mpiicx.bat mpiicpc.bat) # Not GNU-like mpiicpx.bat + set(_MPI_IntelLLVM_Fortran_COMPILER_NAMES mpiifx.bat mpiifort.bat mpif77.bat mpif90.bat) + + # Intel MPI compiler names for MSMPI + set(_MPI_MSVC_C_COMPILER_NAMES mpicl.bat) + set(_MPI_MSVC_CXX_COMPILER_NAMES mpicl.bat) +else() + # Intel compiler names + set(_MPI_Intel_C_COMPILER_NAMES mpiicc) + set(_MPI_Intel_CXX_COMPILER_NAMES mpiicpc mpiicxx mpiic++) + set(_MPI_Intel_Fortran_COMPILER_NAMES mpiifort mpiif95 mpiif90 mpiif77) + + # Intel compiler names + set(_MPI_IntelLLVM_C_COMPILER_NAMES mpiicx mpiicc) + set(_MPI_IntelLLVM_CXX_COMPILER_NAMES mpiicpx mpiicpc mpiicxx mpiic++) + set(_MPI_IntelLLVM_Fortran_COMPILER_NAMES mpiifx mpiifort mpiif95 mpiif90 mpiif77) +endif() + +# PGI compiler names +set(_MPI_PGI_C_COMPILER_NAMES mpipgicc mpipgcc mppgcc) +set(_MPI_PGI_CXX_COMPILER_NAMES mpipgic++ mpipgCC mppgCC) +set(_MPI_PGI_Fortran_COMPILER_NAMES mpipgifort mpipgf95 mpipgf90 mppgf95 mppgf90 mpipgf77 mppgf77) + +# XLC MPI Compiler names +set(_MPI_XL_C_COMPILER_NAMES mpxlc mpxlc_r mpixlc mpixlc_r) +set(_MPI_XL_CXX_COMPILER_NAMES mpixlcxx mpixlC mpixlc++ mpxlcxx mpxlc++ mpixlc++ mpxlCC + mpixlcxx_r mpixlC_r mpixlc++_r mpxlcxx_r mpxlc++_r mpixlc++_r mpxlCC_r) +set(_MPI_XL_Fortran_COMPILER_NAMES mpixlf95 mpixlf95_r mpxlf95 mpxlf95_r + mpixlf90 mpixlf90_r mpxlf90 mpxlf90_r + mpixlf77 mpixlf77_r mpxlf77 mpxlf77_r + mpixlf mpixlf_r mpxlf mpxlf_r) + +# Cray Compiler names +set(_MPI_Cray_C_COMPILER_NAMES cc) +set(_MPI_Cray_CXX_COMPILER_NAMES CC) +set(_MPI_Cray_Fortran_COMPILER_NAMES ftn) + +# Prepend vendor-specific compiler wrappers to the list. If we don't know the compiler, +# attempt all of them. +# By attempting vendor-specific compiler names first, we should avoid situations where the compiler wrapper +# stems from a proprietary MPI and won't know which compiler it's being used for. For instance, Intel MPI +# controls its settings via the I_MPI_CC environment variables if the generic name is being used. +# If we know which compiler we're working with, we can use the most specialized wrapper there is in order to +# pick up the right settings for it. +foreach (LANG IN ITEMS C CXX Fortran) + set(_MPI_${LANG}_COMPILER_NAMES "") + foreach (id IN ITEMS Fujitsu FujitsuClang GNU Intel IntelLLVM MSVC PGI XL) + if (NOT CMAKE_${LANG}_COMPILER_ID OR CMAKE_${LANG}_COMPILER_ID STREQUAL id) + foreach(_COMPILER_NAME IN LISTS _MPI_${id}_${LANG}_COMPILER_NAMES) + list(APPEND _MPI_${LANG}_COMPILER_NAMES ${_COMPILER_NAME}${MPI_EXECUTABLE_SUFFIX}) + endforeach() + endif() + unset(_MPI_${id}_${LANG}_COMPILER_NAMES) + endforeach() + foreach(_COMPILER_NAME IN LISTS _MPI_${LANG}_GENERIC_COMPILER_NAMES) + list(APPEND _MPI_${LANG}_COMPILER_NAMES ${_COMPILER_NAME}${MPI_EXECUTABLE_SUFFIX}) + endforeach() + unset(_MPI_${LANG}_GENERIC_COMPILER_NAMES) +endforeach() + +# Names to try for mpiexec +# Only mpiexec commands are guaranteed to behave as described in the standard, +# mpirun commands are not covered by the standard in any way whatsoever. +# lamexec is the executable for LAM/MPI, srun is for SLURM or Open MPI with SLURM support. +# srun -n X is however a valid command, so it behaves 'like' mpiexec. +set(_MPIEXEC_NAMES_BASE mpiexec mpiexec.hydra mpiexec.mpd mpirun lamexec srun) + +unset(_MPIEXEC_NAMES) +foreach(_MPIEXEC_NAME IN LISTS _MPIEXEC_NAMES_BASE) + list(APPEND _MPIEXEC_NAMES "${_MPIEXEC_NAME}${MPI_EXECUTABLE_SUFFIX}") +endforeach() +unset(_MPIEXEC_NAMES_BASE) + +function (_MPI_check_compiler LANG QUERY_FLAG OUTPUT_VARIABLE RESULT_VARIABLE) + if(DEFINED MPI_${LANG}_COMPILER_FLAGS) + separate_arguments(_MPI_COMPILER_WRAPPER_OPTIONS NATIVE_COMMAND "${MPI_${LANG}_COMPILER_FLAGS}") + else() + separate_arguments(_MPI_COMPILER_WRAPPER_OPTIONS NATIVE_COMMAND "${MPI_COMPILER_FLAGS}") + endif() + execute_process( + COMMAND ${MPI_${LANG}_COMPILER} ${_MPI_COMPILER_WRAPPER_OPTIONS} ${QUERY_FLAG} + OUTPUT_VARIABLE WRAPPER_OUTPUT OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_VARIABLE WRAPPER_OUTPUT ERROR_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE WRAPPER_RETURN) + # Some compiler wrappers will yield spurious zero return values, for example + # Intel MPI tolerates unknown arguments and if the MPI wrappers loads a shared + # library that has invalid or missing version information there would be warning + # messages emitted by ld.so in the compiler output. In either case, we'll treat + # the output as invalid. + if(WRAPPER_OUTPUT MATCHES "undefined reference|unrecognized|need to set|no version information available|command not found") + set(WRAPPER_RETURN 255) + endif() + # Ensure that no error output might be passed upwards. + if(NOT WRAPPER_RETURN EQUAL "0") + unset(WRAPPER_OUTPUT) + else() + # Strip leading whitespace + string(REGEX REPLACE "^ +" "" WRAPPER_OUTPUT "${WRAPPER_OUTPUT}") + endif() + set(${OUTPUT_VARIABLE} "${WRAPPER_OUTPUT}" PARENT_SCOPE) + set(${RESULT_VARIABLE} "${WRAPPER_RETURN}" PARENT_SCOPE) +endfunction() + +macro(_MPI_env_set_ifnot VAR VALUE) + if(NOT DEFINED ENV{${VAR}}) + set(_MPI_${VAR}_WAS_SET FALSE) + set(ENV{${VAR}} ${${VALUE}}) + else() + set(_MPI_${VAR}_WAS_SET TRUE) + endif() +endmacro() + +macro(_MPI_env_unset_ifnot VAR) + if(NOT _MPI_${VAR}_WAS_SET) + unset(ENV{${VAR}}) + endif() +endmacro() + +function (_MPI_interrogate_compiler LANG) + unset(MPI_COMPILE_CMDLINE) + unset(MPI_LINK_CMDLINE) + + unset(MPI_COMPILE_OPTIONS_WORK) + unset(MPI_COMPILE_DEFINITIONS_WORK) + unset(MPI_INCLUDE_DIRS_WORK) + unset(MPI_LINK_FLAGS_WORK) + unset(MPI_LIB_NAMES_WORK) + unset(MPI_LIB_FULLPATHS_WORK) + + # Define the MPICH and Intel MPI compiler variables to the compilers set in CMake. + # It's possible to have a per-compiler configuration in these MPI implementations and + # a particular MPICH derivate might check compiler interoperability. + # Intel MPI in particular does this with I_MPI_CHECK_COMPILER. + file(TO_NATIVE_PATH "${CMAKE_${LANG}_COMPILER}" _MPI_UNDERLAYING_COMPILER) + # On Windows, the Intel MPI batch scripts can only work with filenames - Full paths will break them. + # Due to the lack of other MPICH-based wrappers for Visual C++, we may treat this as default. + if(MSVC) + get_filename_component(_MPI_UNDERLAYING_COMPILER "${_MPI_UNDERLAYING_COMPILER}" NAME) + endif() + if(LANG STREQUAL "C") + _MPI_env_set_ifnot(I_MPI_CC _MPI_UNDERLAYING_COMPILER) + _MPI_env_set_ifnot(MPICH_CC _MPI_UNDERLAYING_COMPILER) + elseif(LANG STREQUAL "CXX") + _MPI_env_set_ifnot(I_MPI_CXX _MPI_UNDERLAYING_COMPILER) + _MPI_env_set_ifnot(MPICH_CXX _MPI_UNDERLAYING_COMPILER) + elseif(LANG STREQUAL "Fortran") + _MPI_env_set_ifnot(I_MPI_FC _MPI_UNDERLAYING_COMPILER) + _MPI_env_set_ifnot(MPICH_FC _MPI_UNDERLAYING_COMPILER) + _MPI_env_set_ifnot(I_MPI_F77 _MPI_UNDERLAYING_COMPILER) + _MPI_env_set_ifnot(MPICH_F77 _MPI_UNDERLAYING_COMPILER) + _MPI_env_set_ifnot(I_MPI_F90 _MPI_UNDERLAYING_COMPILER) + _MPI_env_set_ifnot(MPICH_F90 _MPI_UNDERLAYING_COMPILER) + endif() + + # Set these two variables for Intel MPI: + # - I_MPI_DEBUG_INFO_STRIP: It adds 'objcopy' lines to the compiler output. We support stripping them + # (see below), but if we can avoid them in the first place, we should. + # - I_MPI_FORT_BIND: By default Intel MPI makes the C/C++ compiler wrappers link Fortran bindings. + # This is so that mixed-language code doesn't require additional libraries when linking with mpicc. + # For our purposes, this makes little sense, since correct MPI usage from CMake already circumvenes this. + set(_MPI_ENV_VALUE "disable") + _MPI_env_set_ifnot(I_MPI_DEBUG_INFO_STRIP _MPI_ENV_VALUE) + _MPI_env_set_ifnot(I_MPI_FORT_BIND _MPI_ENV_VALUE) + + # Check whether the -showme:compile option works. This indicates that we have either Open MPI + # or a newer version of LAM/MPI, and implies that -showme:link will also work. + # Open MPI also supports -show, but separates linker and compiler information + _MPI_check_compiler(${LANG} "-showme:compile" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) + if (MPI_COMPILER_RETURN EQUAL "0") + _MPI_check_compiler(${LANG} "-showme:link" MPI_LINK_CMDLINE MPI_COMPILER_RETURN) + + if (NOT MPI_COMPILER_RETURN EQUAL "0") + unset(MPI_COMPILE_CMDLINE) + endif() + endif() + + # MPICH and MVAPICH offer -compile-info and -link-info. + # For modern versions, both do the same as -show. However, for old versions, they do differ + # when called for mpicxx and mpif90 and it's necessary to use them over -show in order to find the + # removed MPI C++ bindings. + if (NOT MPI_COMPILER_RETURN EQUAL "0") + _MPI_check_compiler(${LANG} "-compile-info" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) + + if (MPI_COMPILER_RETURN EQUAL "0") + _MPI_check_compiler(${LANG} "-link-info" MPI_LINK_CMDLINE MPI_COMPILER_RETURN) + + if (NOT MPI_COMPILER_RETURN EQUAL "0") + unset(MPI_COMPILE_CMDLINE) + endif() + endif() + endif() + + # Cray compiler wrappers come usually without a separate mpicc/c++/ftn, but offer + # --cray-print-opts=... + if (NOT MPI_COMPILER_RETURN EQUAL "0") + _MPI_check_compiler(${LANG} "--cray-print-opts=cflags" + MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) + + if (MPI_COMPILER_RETURN EQUAL "0") + # Pass --no-as-needed so the mpi library is always linked. Otherwise, the + # Cray compiler wrapper puts an --as-needed flag around the mpi library, + # and it is not linked unless code directly refers to it. + _MPI_check_compiler(${LANG} "--no-as-needed;--cray-print-opts=libs" + MPI_LINK_CMDLINE MPI_COMPILER_RETURN) + + if (NOT MPI_COMPILER_RETURN EQUAL "0") + unset(MPI_COMPILE_CMDLINE) + unset(MPI_LINK_CMDLINE) + endif() + endif() + endif() + + # MPICH, MVAPICH2 and Intel MPI just use "-show". Open MPI also offers this, but the + # -showme commands are more specialized. + if (NOT MPI_COMPILER_RETURN EQUAL "0") + _MPI_check_compiler(${LANG} "-show" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) + endif() + + # Older versions of LAM/MPI have "-showme". Open MPI also supports this. + # Unknown to MPICH, MVAPICH and Intel MPI. + if (NOT MPI_COMPILER_RETURN EQUAL "0") + _MPI_check_compiler(${LANG} "-showme" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) + endif() + + if (MPI_COMPILER_RETURN EQUAL "0" AND DEFINED MPI_COMPILE_CMDLINE) + # Intel MPI can be run with -compchk or I_MPI_CHECK_COMPILER set to 1. + # In this case, -show will be prepended with a line to the compiler checker. This is a script that performs + # compatibility checks and returns a non-zero exit code together with an error if something fails. + # It has to be called as "compchk.sh ". Here, is one out of 32 (i686), 64 (ia64) or 32e (x86_64). + # The compiler is identified by filename, and can be either the MPI compiler or the underlying compiler. + # NOTE: It is vital to run this script while the environment variables are set up, otherwise it can check the wrong compiler. + if(MPI_COMPILE_CMDLINE MATCHES "^([^\" ]+/compchk.sh|\"[^\"]+/compchk.sh\") +([^ ]+)") + # Now CMAKE_MATCH_1 contains the path to the compchk.sh file and CMAKE_MATCH_2 the architecture flag. + unset(COMPILER_CHECKER_OUTPUT) + execute_process( + COMMAND ${CMAKE_MATCH_1} ${CMAKE_MATCH_2} ${MPI_${LANG}_COMPILER} + OUTPUT_VARIABLE COMPILER_CHECKER_OUTPUT OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_VARIABLE COMPILER_CHECKER_OUTPUT ERROR_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE MPI_COMPILER_RETURN) + # If it returned a non-zero value, the check below will fail and cause the interrogation to be aborted. + if(NOT MPI_COMPILER_RETURN EQUAL "0") + if(NOT MPI_FIND_QUIETLY) + message(STATUS "Intel MPI compiler check failed: ${COMPILER_CHECKER_OUTPUT}") + endif() + else() + # Since the check passed, we can remove the compchk.sh script. + string(REGEX REPLACE "^([^\" ]+|\"[^\"]+\")/compchk.sh.*\n" "" MPI_COMPILE_CMDLINE "${MPI_COMPILE_CMDLINE}") + endif() + endif() + endif() + + # Revert changes to the environment made previously + if(LANG STREQUAL "C") + _MPI_env_unset_ifnot(I_MPI_CC) + _MPI_env_unset_ifnot(MPICH_CC) + elseif(LANG STREQUAL "CXX") + _MPI_env_unset_ifnot(I_MPI_CXX) + _MPI_env_unset_ifnot(MPICH_CXX) + elseif(LANG STREQUAL "Fortran") + _MPI_env_unset_ifnot(I_MPI_FC) + _MPI_env_unset_ifnot(MPICH_FC) + _MPI_env_unset_ifnot(I_MPI_F77) + _MPI_env_unset_ifnot(MPICH_F77) + _MPI_env_unset_ifnot(I_MPI_F90) + _MPI_env_unset_ifnot(MPICH_F90) + endif() + + _MPI_env_unset_ifnot(I_MPI_DEBUG_INFO_STRIP) + _MPI_env_unset_ifnot(I_MPI_FORT_BIND) + + if (NOT (MPI_COMPILER_RETURN EQUAL "0") OR NOT (DEFINED MPI_COMPILE_CMDLINE)) + # Cannot interrogate this compiler, so exit. + set(MPI_${LANG}_WRAPPER_FOUND FALSE PARENT_SCOPE) + return() + endif() + unset(MPI_COMPILER_RETURN) + + # We have our command lines, but we might need to copy MPI_COMPILE_CMDLINE + # into MPI_LINK_CMDLINE, if we didn't find the link line. + if (NOT DEFINED MPI_LINK_CMDLINE) + set(MPI_LINK_CMDLINE "${MPI_COMPILE_CMDLINE}") + endif() + + # Visual Studio parsers permit each flag prefixed by either / or -. + # We'll normalize this to the - syntax we use for CMake purposes anyways. + if(MSVC) + foreach(_MPI_VARIABLE IN ITEMS COMPILE LINK) + # The Intel MPI wrappers on Windows prefix their output with some copyright boilerplate. + # To prevent possible problems, we discard this text before proceeding with any further matching. + string(REGEX REPLACE "^[^ ]+ for the Intel\\(R\\) MPI Library [^\n]+ for Windows\\*\nCopyright\\(C\\) [^\n]+, Intel Corporation\\. All rights reserved\\.\n\n" "" + MPI_${_MPI_VARIABLE}_CMDLINE "${MPI_${_MPI_VARIABLE}_CMDLINE}") + string(REGEX REPLACE "(^| )/" "\\1-" MPI_${_MPI_VARIABLE}_CMDLINE "${MPI_${_MPI_VARIABLE}_CMDLINE}") + string(REPLACE "-libpath:" "-LIBPATH:" MPI_${_MPI_VARIABLE}_CMDLINE "${MPI_${_MPI_VARIABLE}_CMDLINE}") + endforeach() + endif() + + # For MSVC and cl-compatible compilers, the keyword /link indicates a point after which + # everything following is passed to the linker. In this case, we drop all prior information + # from the link line and treat any unknown extra flags as linker flags. + set(_MPI_FILTERED_LINK_INFORMATION FALSE) + if(MSVC) + if(MPI_LINK_CMDLINE MATCHES " -(link|LINK) ") + string(REGEX REPLACE ".+-(link|LINK) +" "" MPI_LINK_CMDLINE "${MPI_LINK_CMDLINE}") + set(_MPI_FILTERED_LINK_INFORMATION TRUE) + endif() + string(REGEX REPLACE " +-(link|LINK) .+" "" MPI_COMPILE_CMDLINE "${MPI_COMPILE_CMDLINE}") + endif() + + if(UNIX) + # At this point, we obtained some output from a compiler wrapper that works. + # We'll now try to parse it into variables with meaning to us. + if(LANG STREQUAL "Fortran") + # If MPICH (and derivates) didn't recognize the Fortran compiler include flag during configuration, + # they'll return a set of three commands, consisting out of a symlink command for mpif.h, + # the actual compiler command and deletion of the created symlink. + # Especially with M(VA)PICH-1, this appears to happen erroneously, and therefore we should translate + # this output into an additional include directory and then drop it from the output. + if(MPI_COMPILE_CMDLINE MATCHES "^ln -s ([^\" ]+|\"[^\"]+\") mpif.h") + get_filename_component(MPI_INCLUDE_DIRS_WORK "${CMAKE_MATCH_1}" DIRECTORY) + string(REGEX REPLACE "^ln -s ([^\" ]+|\"[^\"]+\") mpif.h\n" "" MPI_COMPILE_CMDLINE "${MPI_COMPILE_CMDLINE}") + string(REGEX REPLACE "^ln -s ([^\" ]+|\"[^\"]+\") mpif.h\n" "" MPI_LINK_CMDLINE "${MPI_LINK_CMDLINE}") + string(REGEX REPLACE "\nrm -f mpif.h$" "" MPI_COMPILE_CMDLINE "${MPI_COMPILE_CMDLINE}") + string(REGEX REPLACE "\nrm -f mpif.h$" "" MPI_LINK_CMDLINE "${MPI_LINK_CMDLINE}") + endif() + endif() + + # If Intel MPI was configured for static linkage with -static_mpi, the wrapper will by default strip + # debug information from resulting binaries (see I_MPI_DEBUG_INFO_STRIP). + # Since we cannot process this information into CMake logic, we need to discard the resulting objcopy + # commands from the output. + string(REGEX REPLACE "(^|\n)objcopy[^\n]+(\n|$)" "" MPI_COMPILE_CMDLINE "${MPI_COMPILE_CMDLINE}") + string(REGEX REPLACE "(^|\n)objcopy[^\n]+(\n|$)" "" MPI_LINK_CMDLINE "${MPI_LINK_CMDLINE}") + endif() + + # For Visual C++, extracting compiler options in a generic fashion isn't easy. However, no MPI implementation + # on Windows seems to require any specific ones, either. + if(NOT MSVC) + # Extract compile options from the compile command line. + string(REGEX MATCHALL "(^| )-f([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_OPTIONS "${MPI_COMPILE_CMDLINE}") + + foreach(_MPI_COMPILE_OPTION IN LISTS MPI_ALL_COMPILE_OPTIONS) + string(REGEX REPLACE "^ " "" _MPI_COMPILE_OPTION "${_MPI_COMPILE_OPTION}") + + # Ignore -fstack-protector directives: These occur on MPICH and MVAPICH when the libraries + # themselves were built with this flag. However, this flag is unrelated to using MPI, and + # we won't match the accompanying --param-ssp-size and -Wp,-D_FORTIFY_SOURCE flags and therefore + # produce inconsistent results with the regularly flags. + # Similarly, aliasing flags do not belong into our flag array. + # Also strip out `-framework` flags. + if(NOT _MPI_COMPILE_OPTION MATCHES "^-f((no-|)(stack-protector|strict-aliasing)|PI[CE]|pi[ce]|ramework)") + list(APPEND MPI_COMPILE_OPTIONS_WORK "${_MPI_COMPILE_OPTION}") + endif() + endforeach() + endif() + + # For GNU-style compilers, it's possible to prefix includes and definitions with certain flags to pass them + # only to the preprocessor. For CMake purposes, we need to treat, but ignore such scopings. + # Note that we do not support spaces between the arguments, i.e. -Wp,-I -Wp,/opt/mympi will not be parsed + # correctly. This form does not seem to occur in any common MPI implementation, however. + if(NOT MSVC) + set(_MPI_PREPROCESSOR_FLAG_REGEX "(-Wp,|-Xpreprocessor )?") + else() + set(_MPI_PREPROCESSOR_FLAG_REGEX "") + endif() + + # Same deal as above, for the definitions. + string(REGEX MATCHALL "(^| )${_MPI_PREPROCESSOR_FLAG_REGEX}-D *([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_DEFINITIONS "${MPI_COMPILE_CMDLINE}") + + foreach(_MPI_COMPILE_DEFINITION IN LISTS MPI_ALL_COMPILE_DEFINITIONS) + string(REGEX REPLACE "^ ?${_MPI_PREPROCESSOR_FLAG_REGEX}-D *" "" _MPI_COMPILE_DEFINITION "${_MPI_COMPILE_DEFINITION}") + string(REPLACE "\"" "" _MPI_COMPILE_DEFINITION "${_MPI_COMPILE_DEFINITION}") + if(NOT _MPI_COMPILE_DEFINITION MATCHES "^_FORTIFY_SOURCE.*") + list(APPEND MPI_COMPILE_DEFINITIONS_WORK "${_MPI_COMPILE_DEFINITION}") + endif() + endforeach() + + # Extract include paths from compile command line + string(REGEX MATCHALL "(^|\n| )${_MPI_PREPROCESSOR_FLAG_REGEX}${CMAKE_INCLUDE_FLAG_${LANG}} *([^\" ]+|\"[^\"]+\")" + MPI_ALL_INCLUDE_PATHS "${MPI_COMPILE_CMDLINE}") + + # If extracting failed to work, we'll try using -showme:incdirs. + # Unlike before, we do this without the environment variables set up, but since only MPICH derivates are affected by any of them, and + # -showme:... is only supported by Open MPI and LAM/MPI, this isn't a concern. + if (NOT MPI_ALL_INCLUDE_PATHS) + _MPI_check_compiler(${LANG} "-showme:incdirs" MPI_INCDIRS_CMDLINE MPI_INCDIRS_COMPILER_RETURN) + if(MPI_INCDIRS_COMPILER_RETURN) + separate_arguments(MPI_ALL_INCLUDE_PATHS NATIVE_COMMAND "${MPI_INCDIRS_CMDLINE}") + endif() + endif() + + foreach(_MPI_INCLUDE_PATH IN LISTS MPI_ALL_INCLUDE_PATHS) + string(REGEX REPLACE "^ ?${_MPI_PREPROCESSOR_FLAG_REGEX}${CMAKE_INCLUDE_FLAG_${LANG}} *" "" _MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}") + string(REPLACE "\n" "" _MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}") + string(REPLACE "\"" "" _MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}") + string(REPLACE "'" "" _MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}") + get_filename_component(_MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}" REALPATH) + list(APPEND MPI_INCLUDE_DIRS_WORK "${_MPI_INCLUDE_PATH}") + endforeach() + + # The next step are linker flags and library directories. Here, we first take the flags given in raw -L or -LIBPATH: syntax. + string(REGEX MATCHALL "(^| )${CMAKE_LIBRARY_PATH_FLAG} *([^\" ]+|\"[^\"]+\")" MPI_DIRECT_LINK_PATHS "${MPI_LINK_CMDLINE}") + foreach(_MPI_LPATH IN LISTS MPI_DIRECT_LINK_PATHS) + string(REGEX REPLACE "(^| )${CMAKE_LIBRARY_PATH_FLAG} *" "" _MPI_LPATH "${_MPI_LPATH}") + list(APPEND MPI_ALL_LINK_PATHS "${_MPI_LPATH}") + endforeach() + + # If the link commandline hasn't been filtered (e.g. when using MSVC and /link), we need to extract the relevant parts first. + if(NOT _MPI_FILTERED_LINK_INFORMATION) + string(REGEX MATCHALL "(^| )(-Wl,|-Xlinker +)([^\" ]+|\"[^\"]+\")" MPI_LINK_FLAGS "${MPI_LINK_CMDLINE}") + + # In this case, we could also find some indirectly given linker paths, e.g. prefixed by -Xlinker or -Wl, + # Since syntaxes like -Wl,-L -Wl,/my/path/to/lib are also valid, we parse these paths by first removing -Wl, and -Xlinker + # from the list of filtered flags and then parse the remainder of the output. + string(REGEX REPLACE "(-Wl,|-Xlinker +)" "" MPI_LINK_FLAGS_RAW "${MPI_LINK_FLAGS}") + + # Now we can parse the leftover output. Note that spaces can now be handled since the above example would reduce to + # -L /my/path/to/lib and can be extracted correctly. + string(REGEX MATCHALL "^(${CMAKE_LIBRARY_PATH_FLAG},? *|--library-path=)([^\" ]+|\"[^\"]+\")" + MPI_INDIRECT_LINK_PATHS "${MPI_LINK_FLAGS_RAW}") + + foreach(_MPI_LPATH IN LISTS MPI_INDIRECT_LINK_PATHS) + string(REGEX REPLACE "^(${CMAKE_LIBRARY_PATH_FLAG},? *|--library-path=)" "" _MPI_LPATH "${_MPI_LPATH}") + list(APPEND MPI_ALL_LINK_PATHS "${_MPI_LPATH}") + endforeach() + + # We need to remove the flags we extracted from the linker flag list now. + string(REGEX REPLACE "(^| )(-Wl,|-Xlinker +)(${CMAKE_LIBRARY_PATH_FLAG},? *(-Wl,|-Xlinker +)?|--library-path=)([^\" ]+|\"[^\"]+\")" "" + MPI_LINK_CMDLINE_FILTERED "${MPI_LINK_CMDLINE}") + + # Some MPI implementations pass on options they themselves were built with. Since -z,noexecstack is a common + # hardening, we should strip it. In general, the -z options should be undesirable. + string(REGEX REPLACE "(^| )-Wl,-z(,[^ ]+| +-Wl,[^ ]+)" "" MPI_LINK_CMDLINE_FILTERED "${MPI_LINK_CMDLINE_FILTERED}") + string(REGEX REPLACE "(^| )-Xlinker +-z +-Xlinker +[^ ]+" "" MPI_LINK_CMDLINE_FILTERED "${MPI_LINK_CMDLINE_FILTERED}") + + # We only consider options of the form -Wl or -Xlinker: + string(REGEX MATCHALL "(^| )(-Wl,|-Xlinker +)([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE_FILTERED}") + + # As a next step, we assemble the linker flags extracted in a preliminary flags string + foreach(_MPI_LINK_FLAG IN LISTS MPI_ALL_LINK_FLAGS) + string(STRIP "${_MPI_LINK_FLAG}" _MPI_LINK_FLAG) + if (MPI_LINK_FLAGS_WORK) + string(APPEND MPI_LINK_FLAGS_WORK " ${_MPI_LINK_FLAG}") + else() + set(MPI_LINK_FLAGS_WORK "${_MPI_LINK_FLAG}") + endif() + endforeach() + else() + # In the filtered case, we obtain the link time flags by just stripping the library paths. + string(REGEX REPLACE "(^| )${CMAKE_LIBRARY_PATH_FLAG} *([^\" ]+|\"[^\"]+\")" "" MPI_LINK_CMDLINE_FILTERED "${MPI_LINK_CMDLINE}") + endif() + + # If we failed to extract any linker paths, we'll try using the -showme:libdirs option with the MPI compiler. + # This will return a list of folders, not a set of flags! + if (NOT MPI_ALL_LINK_PATHS) + _MPI_check_compiler(${LANG} "-showme:libdirs" MPI_LIBDIRS_CMDLINE MPI_LIBDIRS_COMPILER_RETURN) + if(MPI_LIBDIRS_COMPILER_RETURN) + separate_arguments(MPI_ALL_LINK_PATHS NATIVE_COMMAND "${MPI_LIBDIRS_CMDLINE}") + endif() + endif() + + # We need to remove potential quotes and convert the paths to CMake syntax while resolving them, too. + foreach(_MPI_LPATH IN LISTS MPI_ALL_LINK_PATHS) + string(REPLACE "\"" "" _MPI_LPATH "${_MPI_LPATH}") + get_filename_component(_MPI_LPATH "${_MPI_LPATH}" REALPATH) + list(APPEND MPI_LINK_DIRECTORIES_WORK "${_MPI_LPATH}") + endforeach() + + # Extract the set of libraries to link against from the link command line + # This only makes sense if CMAKE_LINK_LIBRARY_FLAG is defined, i.e. a -lxxxx syntax is supported by the compiler. + if(CMAKE_LINK_LIBRARY_FLAG) + string(REGEX MATCHALL "(^| )${CMAKE_LINK_LIBRARY_FLAG}([^\" ]+|\"[^\"]+\")" + MPI_LIBNAMES "${MPI_LINK_CMDLINE}") + + foreach(_MPI_LIB_NAME IN LISTS MPI_LIBNAMES) + # also match flags starting with "-l:" here + string(REGEX REPLACE "^ ?${CMAKE_LINK_LIBRARY_FLAG}(:lib|:)?" "" _MPI_LIB_NAME "${_MPI_LIB_NAME}") + string(REPLACE "\"" "" _MPI_LIB_NAME "${_MPI_LIB_NAME}") + list(APPEND MPI_LIB_NAMES_WORK "${_MPI_LIB_NAME}") + endforeach() + endif() + + # Treat linker objects given by full path, for example static libraries, import libraries + # or shared libraries if there aren't any import libraries in use on the system. + # Note that we do not consider CMAKE__LIBRARY_PREFIX intentionally here: The linker will for a given file + # decide how to link it based on file type, not based on a prefix like 'lib'. + set(_MPI_LIB_SUFFIX_REGEX "${CMAKE_STATIC_LIBRARY_SUFFIX}") + if(DEFINED CMAKE_IMPORT_LIBRARY_SUFFIX) + if(NOT (CMAKE_IMPORT_LIBRARY_SUFFIX STREQUAL CMAKE_STATIC_LIBRARY_SUFFIX)) + string(APPEND _MPI_LIB_SUFFIX_REGEX "|${CMAKE_IMPORT_LIBRARY_SUFFIX}") + endif() + else() + string(APPEND _MPI_LIB_SUFFIX_REGEX "|${CMAKE_SHARED_LIBRARY_SUFFIX}") + endif() + set(_MPI_LIB_NAME_REGEX "(([^\" ]+(${_MPI_LIB_SUFFIX_REGEX}))|(\"[^\"]+(${_MPI_LIB_SUFFIX_REGEX})\"))( +|$)") + string(REPLACE "." "\\." _MPI_LIB_NAME_REGEX "${_MPI_LIB_NAME_REGEX}") + + string(REGEX MATCHALL "${_MPI_LIB_NAME_REGEX}" MPI_LIBNAMES "${MPI_LINK_CMDLINE}") + foreach(_MPI_LIB_NAME IN LISTS MPI_LIBNAMES) + # Do not match "-l:" flags + string(REGEX MATCH "^ ?${CMAKE_LINK_LIBRARY_FLAG}:" _MPI_LIB_NAME_TEST "${_MPI_LIB_NAME}") + if(_MPI_LIB_NAME_TEST STREQUAL "") + string(REGEX REPLACE "^ +\"?|\"? +$" "" _MPI_LIB_NAME "${_MPI_LIB_NAME}") + get_filename_component(_MPI_LIB_PATH "${_MPI_LIB_NAME}" DIRECTORY) + if(NOT _MPI_LIB_PATH STREQUAL "") + list(APPEND MPI_LIB_FULLPATHS_WORK "${_MPI_LIB_NAME}") + else() + list(APPEND MPI_LIB_NAMES_WORK "${_MPI_LIB_NAME}") + endif() + endif() + endforeach() + + # Save the explicitly given link directories + set(MPI_LINK_DIRECTORIES_LEFTOVER "${MPI_LINK_DIRECTORIES_WORK}") + + # An MPI compiler wrapper could have its MPI libraries in the implicitly + # linked directories of the compiler itself. + if(DEFINED CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES) + list(APPEND MPI_LINK_DIRECTORIES_WORK "${CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES}") + endif() + + # Determine full path names for all of the libraries that one needs + # to link against in an MPI program + unset(MPI_PLAIN_LIB_NAMES_WORK) + foreach(_MPI_LIB_NAME IN LISTS MPI_LIB_NAMES_WORK) + get_filename_component(_MPI_PLAIN_LIB_NAME "${_MPI_LIB_NAME}" NAME_WE) + list(APPEND MPI_PLAIN_LIB_NAMES_WORK "${_MPI_PLAIN_LIB_NAME}") + find_library(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY + NAMES "${_MPI_LIB_NAME}" "lib${_MPI_LIB_NAME}" + HINTS ${MPI_LINK_DIRECTORIES_WORK} + DOC "Location of the ${_MPI_PLAIN_LIB_NAME} library for MPI" + ) + mark_as_advanced(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) + # Remove the directory from the remainder list. + if(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) + get_filename_component(_MPI_TAKEN_DIRECTORY "${MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY}" DIRECTORY) + list(REMOVE_ITEM MPI_LINK_DIRECTORIES_LEFTOVER "${_MPI_TAKEN_DIRECTORY}") + endif() + endforeach() + + # Add the link directories given explicitly that we haven't used back as linker directories. + if(NOT WIN32) + foreach(_MPI_LINK_DIRECTORY IN LISTS MPI_LINK_DIRECTORIES_LEFTOVER) + file(TO_NATIVE_PATH "${_MPI_LINK_DIRECTORY}" _MPI_LINK_DIRECTORY_ACTUAL) + string(FIND "${_MPI_LINK_DIRECTORY_ACTUAL}" " " _MPI_LINK_DIRECTORY_CONTAINS_SPACE) + if(NOT _MPI_LINK_DIRECTORY_CONTAINS_SPACE EQUAL "-1") + set(_MPI_LINK_DIRECTORY_ACTUAL "\"${_MPI_LINK_DIRECTORY_ACTUAL}\"") + endif() + if(MPI_LINK_FLAGS_WORK) + string(APPEND MPI_LINK_FLAGS_WORK " ${CMAKE_LIBRARY_PATH_FLAG}${_MPI_LINK_DIRECTORY_ACTUAL}") + else() + set(MPI_LINK_FLAGS_WORK "${CMAKE_LIBRARY_PATH_FLAG}${_MPI_LINK_DIRECTORY_ACTUAL}") + endif() + endforeach() + endif() + + # Deal with the libraries given with full path next + unset(MPI_DIRECT_LIB_NAMES_WORK) + foreach(_MPI_LIB_FULLPATH IN LISTS MPI_LIB_FULLPATHS_WORK) + get_filename_component(_MPI_PLAIN_LIB_NAME "${_MPI_LIB_FULLPATH}" NAME_WE) + list(APPEND MPI_DIRECT_LIB_NAMES_WORK "${_MPI_PLAIN_LIB_NAME}") + set(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY "${_MPI_LIB_FULLPATH}" CACHE FILEPATH "Location of the ${_MPI_PLAIN_LIB_NAME} library for MPI") + mark_as_advanced(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) + endforeach() + # Directly linked objects should be linked first in case some generic linker flags are needed for them. + if(MPI_DIRECT_LIB_NAMES_WORK) + set(MPI_PLAIN_LIB_NAMES_WORK "${MPI_DIRECT_LIB_NAMES_WORK};${MPI_PLAIN_LIB_NAMES_WORK}") + endif() + + # MPI might require pthread to work. The above mechanism wouldn't detect it, but we need to + # link it in that case. -lpthread is covered by the normal library treatment on the other hand. + if(MPI_COMPILE_CMDLINE MATCHES "-pthread") + list(APPEND MPI_COMPILE_OPTIONS_WORK "-pthread") + if(MPI_LINK_FLAGS_WORK) + string(APPEND MPI_LINK_FLAGS_WORK " -pthread") + else() + set(MPI_LINK_FLAGS_WORK "-pthread") + endif() + endif() + + if(MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS) + list(APPEND MPI_COMPILE_DEFINITIONS_WORK "${MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS}") + endif() + if(MPI_${LANG}_EXTRA_COMPILE_OPTIONS) + list(APPEND MPI_COMPILE_OPTIONS_WORK "${MPI_${LANG}_EXTRA_COMPILE_OPTIONS}") + endif() + if(MPI_${LANG}_EXTRA_LIB_NAMES) + list(APPEND MPI_PLAIN_LIB_NAMES_WORK "${MPI_${LANG}_EXTRA_LIB_NAMES}") + endif() + + # If we found MPI, set up all of the appropriate cache entries + if(NOT MPI_${LANG}_COMPILE_OPTIONS) + set(MPI_${LANG}_COMPILE_OPTIONS ${MPI_COMPILE_OPTIONS_WORK} CACHE STRING "MPI ${LANG} compilation options" FORCE) + endif() + if(NOT MPI_${LANG}_COMPILE_DEFINITIONS) + set(MPI_${LANG}_COMPILE_DEFINITIONS ${MPI_COMPILE_DEFINITIONS_WORK} CACHE STRING "MPI ${LANG} compilation definitions" FORCE) + endif() + if(NOT MPI_${LANG}_COMPILER_INCLUDE_DIRS) + set(MPI_${LANG}_COMPILER_INCLUDE_DIRS ${MPI_INCLUDE_DIRS_WORK} CACHE STRING "MPI ${LANG} compiler wrapper include directories" FORCE) + endif() + if(NOT MPI_${LANG}_LINK_FLAGS) + set(MPI_${LANG}_LINK_FLAGS ${MPI_LINK_FLAGS_WORK} CACHE STRING "MPI ${LANG} linker flags" FORCE) + endif() + if(NOT MPI_${LANG}_LIB_NAMES) + set(MPI_${LANG}_LIB_NAMES ${MPI_PLAIN_LIB_NAMES_WORK} CACHE STRING "MPI ${LANG} libraries to link against" FORCE) + endif() + set(MPI_${LANG}_WRAPPER_FOUND TRUE PARENT_SCOPE) +endfunction() + +function(_MPI_guess_settings LANG) + set(MPI_GUESS_FOUND FALSE) + # Currently only MSMPI and MPICH2 on Windows are supported, so we can skip this search if we're not targeting that. + if(WIN32) + # MSMPI + + # The environment variables MSMPI_INC and MSMPILIB32/64 are the only ways of locating the MSMPI_SDK, + # which is installed separately from the runtime. Thus it's possible to have mpiexec but not MPI headers + # or import libraries and vice versa. + if(NOT MPI_GUESS_LIBRARY_NAME OR MPI_GUESS_LIBRARY_NAME STREQUAL "MSMPI") + # We first attempt to locate the msmpi.lib. Should be find it, we'll assume that the MPI present is indeed + # Microsoft MPI. + if(CMAKE_SIZEOF_VOID_P EQUAL "8") + file(TO_CMAKE_PATH "$ENV{MSMPI_LIB64}" MPI_MSMPI_LIB_PATH) + file(TO_CMAKE_PATH "$ENV{MSMPI_INC}/x64" MPI_MSMPI_INC_PATH_EXTRA) + else() + file(TO_CMAKE_PATH "$ENV{MSMPI_LIB32}" MPI_MSMPI_LIB_PATH) + file(TO_CMAKE_PATH "$ENV{MSMPI_INC}/x86" MPI_MSMPI_INC_PATH_EXTRA) + endif() + + find_library(MPI_msmpi_LIBRARY + NAMES msmpi + HINTS ${MPI_MSMPI_LIB_PATH} + DOC "Location of the msmpi library for Microsoft MPI") + mark_as_advanced(MPI_msmpi_LIBRARY) + + if(MPI_msmpi_LIBRARY) + # Next, we attempt to locate the MPI header. Note that for Fortran we know that mpif.h is a way + # MSMPI can be used and therefore that header has to be present. + if(NOT MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + get_filename_component(MPI_MSMPI_INC_DIR "$ENV{MSMPI_INC}" REALPATH) + set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "${MPI_MSMPI_INC_DIR}" CACHE STRING "MPI ${LANG} additional include directories" FORCE) + unset(MPI_MSMPI_INC_DIR) + endif() + + # For MSMPI, one can compile the MPI module by building the mpi.f90 shipped with the MSMPI SDK, + # thus it might be present or provided by the user. Figuring out which is supported is done later on. + # The PGI Fortran compiler for instance ships a prebuilt set of modules in its own include folder. + # Should a user be employing PGI or have built its own set and provided it via cache variables, the + # splitting routine would have located the module files. + + # For C and C++, we're done here (MSMPI does not ship the MPI-2 C++ bindings) - however, for Fortran + # we need some extra library to glue Fortran support together: + # MSMPI ships 2-4 Fortran libraries, each for different Fortran compiler behaviors. The library names + # ending with a c are using the cdecl calling convention, whereas those ending with an s are for Fortran + # implementations using stdcall. Therefore, the 64-bit MSMPI only ships those ending in 'c', whereas the 32-bit + # has both variants available. + # The second difference is the last but one letter, if it's an e(nd), the length of a string argument is + # passed by the Fortran compiler after all other arguments on the parameter list, if it's an m(ixed), + # it's passed immediately after the string address. + + # To summarize: + # - msmpifec: CHARACTER length passed after the parameter list and using cdecl calling convention + # - msmpifmc: CHARACTER length passed directly after string address and using cdecl calling convention + # - msmpifes: CHARACTER length passed after the parameter list and using stdcall calling convention + # - msmpifms: CHARACTER length passed directly after string address and using stdcall calling convention + # 32-bit MSMPI ships all four libraries, 64-bit MSMPI ships only the first two. + + # As is, Intel Fortran and PGI Fortran both use the 'ec' variant of the calling convention, whereas + # the old Compaq Visual Fortran compiler defaulted to the 'ms' version. It's possible to make Intel Fortran + # use the CVF calling convention using /iface:cvf, but we assume - and this is also assumed in FortranCInterface - + # this isn't the case. It's also possible to make CVF use the 'ec' variant, using /iface=(cref,nomixed_str_len_arg). + + # Our strategy is now to locate all libraries, but enter msmpifec into the LIB_NAMES array. + # Should this not be adequate it's a straightforward way for a user to change the LIB_NAMES array and + # have his library found. Still, this should not be necessary outside of exceptional cases, as reasoned. + if (LANG STREQUAL "Fortran") + set(MPI_MSMPI_CALLINGCONVS c) + if(CMAKE_SIZEOF_VOID_P EQUAL "4") + list(APPEND MPI_MSMPI_CALLINGCONVS s) + endif() + foreach(mpistrlenpos IN ITEMS e m) + foreach(mpicallingconv IN LISTS MPI_MSMPI_CALLINGCONVS) + find_library(MPI_msmpif${mpistrlenpos}${mpicallingconv}_LIBRARY + NAMES msmpif${mpistrlenpos}${mpicallingconv} + HINTS "${MPI_MSMPI_LIB_PATH}" + DOC "Location of the msmpi${mpistrlenpos}${mpicallingconv} library for Microsoft MPI") + mark_as_advanced(MPI_msmpif${mpistrlenpos}${mpicallingconv}_LIBRARY) + endforeach() + endforeach() + if(NOT MPI_${LANG}_LIB_NAMES) + set(MPI_${LANG}_LIB_NAMES "msmpi;msmpifec" CACHE STRING "MPI ${LANG} libraries to link against" FORCE) + endif() + + # At this point we're *not* done. MSMPI requires an additional include file for Fortran giving the value + # of MPI_AINT. This file is called mpifptr.h located in the x64 and x86 subfolders, respectively. + find_path(MPI_mpifptr_INCLUDE_DIR + NAMES "mpifptr.h" + HINTS "${MPI_MSMPI_INC_PATH_EXTRA}" + DOC "Location of the mpifptr.h extra header for Microsoft MPI") + if(NOT MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) + set(MPI_${LANG}_ADDITIONAL_INCLUDE_VARS "mpifptr" CACHE STRING "MPI ${LANG} additional include directory variables, given in the form MPI__INCLUDE_DIR." FORCE) + endif() + mark_as_advanced(MPI_${LANG}_ADDITIONAL_INCLUDE_VARS MPI_mpifptr_INCLUDE_DIR) + else() + if(NOT MPI_${LANG}_LIB_NAMES) + set(MPI_${LANG}_LIB_NAMES "msmpi" CACHE STRING "MPI ${LANG} libraries to link against" FORCE) + endif() + endif() + mark_as_advanced(MPI_${LANG}_LIB_NAMES) + set(MPI_GUESS_FOUND TRUE) + + if(_MPIEXEC_NOT_GIVEN) + unset(MPIEXEC_EXECUTABLE CACHE) + endif() + + find_program(MPIEXEC_EXECUTABLE + NAMES mpiexec + HINTS $ENV{MSMPI_BIN} "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MPI;InstallRoot]/Bin" + DOC "Executable for running MPI programs.") + endif() + endif() + + # At this point there's not many MPIs that we could still consider. + # OpenMPI 1.6.x and below supported Windows, but these ship compiler wrappers that still work. + # The only other relevant MPI implementation without a wrapper is MPICH2, which had Windows support in 1.4.1p1 and older. + if(NOT MPI_GUESS_FOUND AND (NOT MPI_GUESS_LIBRARY_NAME OR MPI_GUESS_LIBRARY_NAME STREQUAL "MPICH2")) + set(MPI_MPICH_PREFIX_PATHS + "$ENV{ProgramW6432}/MPICH2/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH\\SMPD;binary]/../lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH2;Path]/lib" + ) + + # All of C, C++ and Fortran will need mpi.lib, so we'll look for this first + find_library(MPI_mpi_LIBRARY + NAMES mpi + HINTS ${MPI_MPICH_PREFIX_PATHS}) + mark_as_advanced(MPI_mpi_LIBRARY) + # If we found mpi.lib, we detect the rest of MPICH2 + if(MPI_mpi_LIBRARY) + set(MPI_MPICH_LIB_NAMES "mpi") + # If MPI-2 C++ bindings are requested, we need to locate cxx.lib as well. + # Otherwise, MPICH_SKIP_MPICXX will be defined and these bindings aren't needed. + if(LANG STREQUAL "CXX" AND NOT MPI_CXX_SKIP_MPICXX) + find_library(MPI_cxx_LIBRARY + NAMES cxx + HINTS ${MPI_MPICH_PREFIX_PATHS}) + mark_as_advanced(MPI_cxx_LIBRARY) + list(APPEND MPI_MPICH_LIB_NAMES "cxx") + # For Fortran, MPICH2 provides three different libraries: + # fmpich2.lib which uses uppercase symbols and cdecl, + # fmpich2s.lib which uses uppercase symbols and stdcall (32-bit only), + # fmpich2g.lib which uses lowercase symbols with double underscores and cdecl. + # fmpich2s.lib would be useful for Compaq Visual Fortran, fmpich2g.lib has to be used with GNU g77 and is also + # provided in the form of an .a archive for MinGW and Cygwin. From our perspective, fmpich2.lib is the only one + # we need to try, and if it doesn't work with the given Fortran compiler we'd find out later on during validation + elseif(LANG STREQUAL "Fortran") + find_library(MPI_fmpich2_LIBRARY + NAMES fmpich2 + HINTS ${MPI_MPICH_PREFIX_PATHS}) + find_library(MPI_fmpich2s_LIBRARY + NAMES fmpich2s + HINTS ${MPI_MPICH_PREFIX_PATHS}) + find_library(MPI_fmpich2g_LIBRARY + NAMES fmpich2g + HINTS ${MPI_MPICH_PREFIX_PATHS}) + mark_as_advanced(MPI_fmpich2_LIBRARY MPI_fmpich2s_LIBRARY MPI_fmpich2g_LIBRARY) + list(APPEND MPI_MPICH_LIB_NAMES "fmpich2") + endif() + + if(NOT MPI_${LANG}_LIB_NAMES) + set(MPI_${LANG}_LIB_NAMES "${MPI_MPICH_LIB_NAMES}" CACHE STRING "MPI ${LANG} libraries to link against" FORCE) + endif() + unset(MPI_MPICH_LIB_NAMES) + + if(NOT MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + # For MPICH2, the include folder would be in ../include relative to the library folder. + get_filename_component(MPI_MPICH_ROOT_DIR "${MPI_mpi_LIBRARY}" DIRECTORY) + get_filename_component(MPI_MPICH_ROOT_DIR "${MPI_MPICH_ROOT_DIR}" DIRECTORY) + if(IS_DIRECTORY "${MPI_MPICH_ROOT_DIR}/include") + set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "${MPI_MPICH_ROOT_DIR}/include" CACHE STRING "MPI ${LANG} additional include directory variables, given in the form MPI__INCLUDE_DIR." FORCE) + endif() + unset(MPI_MPICH_ROOT_DIR) + endif() + set(MPI_GUESS_FOUND TRUE) + + if(_MPIEXEC_NOT_GIVEN) + unset(MPIEXEC_EXECUTABLE CACHE) + endif() + + find_program(MPIEXEC_EXECUTABLE + NAMES ${_MPIEXEC_NAMES} + HINTS "$ENV{ProgramW6432}/MPICH2/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH\\SMPD;binary]" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH2;Path]/bin" + DOC "Executable for running MPI programs.") + endif() + unset(MPI_MPICH_PREFIX_PATHS) + endif() + endif() + set(MPI_${LANG}_GUESS_FOUND "${MPI_GUESS_FOUND}" PARENT_SCOPE) +endfunction() + +function(_MPI_adjust_compile_definitions LANG) + if(LANG STREQUAL "CXX") + # To disable the C++ bindings, we need to pass some definitions since the mpi.h header has to deal with both C and C++ + # bindings in MPI-2. + if(MPI_CXX_SKIP_MPICXX AND NOT MPI_${LANG}_COMPILE_DEFINITIONS MATCHES "SKIP_MPICXX") + # MPICH_SKIP_MPICXX is being used in MPICH and derivatives like MVAPICH or Intel MPI + # OMPI_SKIP_MPICXX is being used in Open MPI + # _MPICC_H is being used for IBM Platform MPI + list(APPEND MPI_${LANG}_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX" "OMPI_SKIP_MPICXX" "_MPICC_H") + set(MPI_${LANG}_COMPILE_DEFINITIONS "${MPI_${LANG}_COMPILE_DEFINITIONS}" CACHE STRING "MPI ${LANG} compilation definitions" FORCE) + endif() + endif() +endfunction() + +macro(_MPI_assemble_libraries LANG) + set(MPI_${LANG}_LIBRARIES "") + # Only for libraries do we need to check whether the compiler's linking stage is separate. + if(NOT MPI_${LANG}_COMPILER STREQUAL CMAKE_${LANG}_COMPILER OR NOT MPI_${LANG}_WORKS_IMPLICIT) + foreach(mpilib IN LISTS MPI_${LANG}_LIB_NAMES) + list(APPEND MPI_${LANG}_LIBRARIES ${MPI_${mpilib}_LIBRARY}) + endforeach() + endif() +endmacro() + +macro(_MPI_assemble_include_dirs LANG) + set(MPI_${LANG}_INCLUDE_DIRS + ${MPI_${LANG}_COMPILER_INCLUDE_DIRS} + ${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS} + ) + if(LANG MATCHES "^(C|CXX)$") + if(MPI_${LANG}_HEADER_DIR) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_HEADER_DIR}") + endif() + else() # Fortran + if(MPI_${LANG}_F77_HEADER_DIR) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_F77_HEADER_DIR}") + endif() + if(MPI_${LANG}_MODULE_DIR) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_MODULE_DIR}") + endif() + endif() + if(MPI_${LANG}_INCLUDE_DIRS) + list(REMOVE_DUPLICATES MPI_${LANG}_INCLUDE_DIRS) + endif() +endmacro() + +macro(_MPI_split_include_dirs LANG) + # Backwards compatibility: Search INCLUDE_PATH if given. + if(MPI_${LANG}_INCLUDE_PATH) + list(APPEND MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "${MPI_${LANG}_INCLUDE_PATH}") + endif() + + # We try to find the headers/modules among those paths (and system paths) + # For C/C++, we just need to have a look for mpi.h. + if(LANG MATCHES "^(C|CXX)$") + find_path(MPI_${LANG}_HEADER_DIR "mpi.h" + HINTS + ${MPI_${LANG}_COMPILER_INCLUDE_DIRS} + ${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS} + ) + mark_as_advanced(MPI_${LANG}_HEADER_DIR) + if(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + list(REMOVE_ITEM MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "${MPI_${LANG}_HEADER_DIR}") + endif() + + # Fortran is more complicated here: An implementation could provide + # any of the Fortran 77/90/2008 APIs for MPI. For example, MSMPI + # only provides Fortran 77 and - if mpi.f90 is built - potentially + # a Fortran 90 module. + elseif(LANG STREQUAL "Fortran") + find_path(MPI_${LANG}_F77_HEADER_DIR "mpif.h" + HINTS + ${MPI_${LANG}_COMPILER_INCLUDE_DIRS} + ${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS} + ) + find_path(MPI_${LANG}_MODULE_DIR + NAMES "mpi.mod" "mpi_f08.mod" + HINTS + ${MPI_${LANG}_COMPILER_INCLUDE_DIRS} + ${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS} + ) + if(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + list(REMOVE_ITEM MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS + "${MPI_${LANG}_F77_HEADER_DIR}" + "${MPI_${LANG}_MODULE_DIR}" + ) + endif() + mark_as_advanced(MPI_${LANG}_F77_HEADER_DIR MPI_${LANG}_MODULE_DIR) + endif() + + # Remove duplicates and default system directories from the list. + if(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + list(REMOVE_DUPLICATES MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + foreach(MPI_IMPLICIT_INC_DIR IN LISTS CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES) + list(REMOVE_ITEM MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_IMPLICIT_INC_DIR}) + endforeach() + endif() + + set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS} CACHE STRING "MPI ${LANG} additional include directories" FORCE) +endmacro() + +macro(_MPI_create_imported_target LANG) + if(NOT TARGET MPI::MPI_${LANG}) + add_library(MPI::MPI_${LANG} INTERFACE IMPORTED) + endif() + + # When this is consumed for compiling CUDA, use '-Xcompiler' to wrap '-pthread' and '-fexceptions'. + string(REPLACE "-pthread" "$<$:SHELL:-Xcompiler >-pthread" + _MPI_${LANG}_COMPILE_OPTIONS "${MPI_${LANG}_COMPILE_OPTIONS}") + string(REPLACE "-fexceptions" "$<$:SHELL:-Xcompiler >-fexceptions" + _MPI_${LANG}_COMPILE_OPTIONS "${_MPI_${LANG}_COMPILE_OPTIONS}") + set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_COMPILE_OPTIONS "${_MPI_${LANG}_COMPILE_OPTIONS}") + unset(_MPI_${LANG}_COMPILE_OPTIONS) + + set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_COMPILE_DEFINITIONS "${MPI_${LANG}_COMPILE_DEFINITIONS}") + + if(MPI_${LANG}_LINK_FLAGS) + string(REPLACE "," "$" _MPI_${LANG}_LINK_FLAGS "${MPI_${LANG}_LINK_FLAGS}") + string(PREPEND _MPI_${LANG}_LINK_FLAGS "$") + set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_LINK_OPTIONS "${_MPI_${LANG}_LINK_FLAGS}") + endif() + # If the compiler links MPI implicitly, no libraries will be found as they're contained within + # CMAKE__IMPLICIT_LINK_LIBRARIES already. + if(MPI_${LANG}_LIBRARIES) + set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_LINK_LIBRARIES "${MPI_${LANG}_LIBRARIES}") + endif() + # Given the new design of FindMPI, INCLUDE_DIRS will always be located, even under implicit linking. + set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${MPI_${LANG}_INCLUDE_DIRS}") +endmacro() + +function(_MPI_try_staged_settings LANG MPI_TEST_FILE_NAME MODE RUN_BINARY SUPPRESS_ERRORS) + set(WORK_DIR "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindMPI") + set(SRC_DIR "${CMAKE_ROOT}/Modules/FindMPI") + set(BIN_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindMPI/${MPI_TEST_FILE_NAME}_${LANG}.bin") + unset(MPI_TEST_COMPILE_DEFINITIONS) + if(LANG STREQUAL "Fortran") + if(MODE STREQUAL "F90_MODULE") + set(MPI_Fortran_INCLUDE_LINE "use mpi\n implicit none") + elseif(MODE STREQUAL "F08_MODULE") + set(MPI_Fortran_INCLUDE_LINE "use mpi_f08\n implicit none") + else() # F77 header + set(MPI_Fortran_INCLUDE_LINE "implicit none\n include 'mpif.h'") + endif() + file(READ "${SRC_DIR}/${MPI_TEST_FILE_NAME}.f90.in" MPI_TEST_SOURCE_CONTENT) + string(CONFIGURE "${MPI_TEST_SOURCE_CONTENT}" MPI_TEST_SOURCE_CONTENT) + set(MPI_TEST_SOURCE_FILE "${MPI_TEST_FILE_NAME}.f90") + elseif(LANG STREQUAL "CXX") + file(READ "${SRC_DIR}/${MPI_TEST_FILE_NAME}.c" MPI_TEST_SOURCE_CONTENT) + set(MPI_TEST_SOURCE_FILE "${MPI_TEST_FILE_NAME}.cpp") + if(MODE STREQUAL "TEST_MPICXX") + set(MPI_TEST_COMPILE_DEFINITIONS TEST_MPI_MPICXX) + endif() + else() # C + file(READ "${SRC_DIR}/${MPI_TEST_FILE_NAME}.c" MPI_TEST_SOURCE_CONTENT) + set(MPI_TEST_SOURCE_FILE "${MPI_TEST_FILE_NAME}.c") + endif() + if(SUPPRESS_ERRORS) + set(maybe_no_log NO_LOG) + else() + set(maybe_no_log "") + endif() + if(RUN_BINARY) + try_run(MPI_RUN_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} MPI_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} + SOURCE_FROM_VAR "${MPI_TEST_SOURCE_FILE}" MPI_TEST_SOURCE_CONTENT + ${maybe_no_log} + LOG_DESCRIPTION "The MPI test ${MPI_TEST_FILE_NAME} for ${LANG} in mode ${MODE}" + COMPILE_DEFINITIONS ${MPI_TEST_COMPILE_DEFINITIONS} + LINK_LIBRARIES MPI::MPI_${LANG} + RUN_OUTPUT_VARIABLE MPI_RUN_OUTPUT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} + COMPILE_OUTPUT_VARIABLE _MPI_TRY_${MPI_TEST_FILE_NAME}_${MODE}_OUTPUT) + set(MPI_RUN_OUTPUT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} "${MPI_RUN_OUTPUT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE}}" PARENT_SCOPE) + else() + try_compile(MPI_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} + SOURCE_FROM_VAR "${MPI_TEST_SOURCE_FILE}" MPI_TEST_SOURCE_CONTENT + ${maybe_no_log} + LOG_DESCRIPTION "The MPI test ${MPI_TEST_FILE_NAME} for ${LANG} in mode ${MODE}" + COMPILE_DEFINITIONS ${MPI_TEST_COMPILE_DEFINITIONS} + LINK_LIBRARIES MPI::MPI_${LANG} + COPY_FILE "${BIN_FILE}" + OUTPUT_VARIABLE _MPI_TRY_${MPI_TEST_FILE_NAME}_${MODE}_OUTPUT) + endif() +endfunction() + +macro(_MPI_check_lang_works LANG SUPPRESS_ERRORS) + # For Fortran we may have by the MPI-3 standard an implementation that provides: + # - the mpi_f08 module + # - *both*, the mpi module and 'mpif.h' + # Since older MPI standards (MPI-1) did not define anything but 'mpif.h', we need to check all three individually. + if( NOT MPI_${LANG}_WORKS ) + if(LANG STREQUAL "Fortran") + set(MPI_Fortran_INTEGER_LINE "(kind=MPI_INTEGER_KIND)") + _MPI_try_staged_settings(${LANG} test_mpi F77_HEADER FALSE ${SUPPRESS_ERRORS}) + _MPI_try_staged_settings(${LANG} test_mpi F90_MODULE FALSE ${SUPPRESS_ERRORS}) + _MPI_try_staged_settings(${LANG} test_mpi F08_MODULE FALSE ${SUPPRESS_ERRORS}) + + set(MPI_${LANG}_WORKS FALSE) + + foreach(mpimethod IN ITEMS F77_HEADER F08_MODULE F90_MODULE) + if(MPI_RESULT_${LANG}_test_mpi_${mpimethod}) + set(MPI_${LANG}_WORKS TRUE) + set(MPI_${LANG}_HAVE_${mpimethod} TRUE) + else() + set(MPI_${LANG}_HAVE_${mpimethod} FALSE) + endif() + endforeach() + # MPI-1 versions had no MPI_INTGER_KIND defined, so we need to try without it. + # However, MPI-1 also did not define the Fortran 90 and 08 modules, so we only try the F77 header. + unset(MPI_Fortran_INTEGER_LINE) + if(NOT MPI_${LANG}_WORKS) + _MPI_try_staged_settings(${LANG} test_mpi F77_HEADER_NOKIND FALSE ${SUPPRESS_ERRORS}) + if(MPI_RESULT_${LANG}_test_mpi_F77_HEADER_NOKIND) + set(MPI_${LANG}_WORKS TRUE) + set(MPI_${LANG}_HAVE_F77_HEADER TRUE) + endif() + endif() + else() + _MPI_try_staged_settings(${LANG} test_mpi normal FALSE ${SUPPRESS_ERRORS}) + # If 'test_mpi' built correctly, we've found valid MPI settings. There might not be MPI-2 C++ support, but there can't + # be MPI-2 C++ support without the C bindings being present, so checking for them is sufficient. + set(MPI_${LANG}_WORKS "${MPI_RESULT_${LANG}_test_mpi_normal}") + endif() + endif() +endmacro() + +# Some systems install various MPI implementations in separate folders in some MPI prefix +# This macro enumerates all such subfolders and adds them to the list of hints that will be searched. +macro(MPI_search_mpi_prefix_folder PREFIX_FOLDER) + if(EXISTS "${PREFIX_FOLDER}") + file(GLOB _MPI_folder_children RELATIVE "${PREFIX_FOLDER}" "${PREFIX_FOLDER}/*") + foreach(_MPI_folder_child IN LISTS _MPI_folder_children) + if(IS_DIRECTORY "${PREFIX_FOLDER}/${_MPI_folder_child}") + list(APPEND MPI_HINT_DIRS "${PREFIX_FOLDER}/${_MPI_folder_child}") + endif() + endforeach() + endif() +endmacro() + +set(MPI_HINT_DIRS ${MPI_HOME} $ENV{MPI_HOME} $ENV{I_MPI_ROOT}) +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + # SUSE Linux Enterprise Server stores its MPI implementations under /usr/lib64/mpi/gcc/ + # We enumerate the subfolders and append each as a prefix + MPI_search_mpi_prefix_folder("/usr/lib64/mpi/gcc") +elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD") + # FreeBSD ships mpich under the normal system paths - but available openmpi implementations + # will be found in /usr/local/mpi/ + MPI_search_mpi_prefix_folder("/usr/local/mpi") +endif() + +# Most MPI distributions have some form of mpiexec or mpirun which gives us something we can look for. +# The MPI standard does not mandate the existence of either, but instead only makes requirements if a distribution +# ships an mpiexec program (mpirun executables are not regulated by the standard). + +# We defer searching for mpiexec binaries belonging to guesses until later. By doing so, mismatches between mpiexec +# and the MPI we found should be reduced. +if(NOT MPIEXEC_EXECUTABLE) + set(_MPIEXEC_NOT_GIVEN TRUE) +else() + set(_MPIEXEC_NOT_GIVEN FALSE) +endif() + +find_program(MPIEXEC_EXECUTABLE + NAMES ${_MPIEXEC_NAMES} + PATH_SUFFIXES bin sbin + HINTS ${MPI_HINT_DIRS} + DOC "Executable for running MPI programs.") + +# call get_filename_component twice to remove mpiexec and the directory it exists in (typically bin). +# This gives us a fairly reliable base directory to search for /bin /lib and /include from. +get_filename_component(_MPI_BASE_DIR "${MPIEXEC_EXECUTABLE}" PATH) +get_filename_component(_MPI_BASE_DIR "${_MPI_BASE_DIR}" PATH) + +# According to the MPI standard, section 8.8 -n is a guaranteed, and the only guaranteed way to +# launch an MPI process using mpiexec if such a program exists. +set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "Flag used by MPI to specify the number of processes for mpiexec; the next option will be the number of processes.") +set(MPIEXEC_PREFLAGS "" CACHE STRING "These flags will be directly before the executable that is being run by mpiexec.") +set(MPIEXEC_POSTFLAGS "" CACHE STRING "These flags will be placed after all flags passed to mpiexec.") + +# Set the number of processes to the physical processor count +cmake_host_system_information(RESULT _MPIEXEC_NUMPROCS QUERY NUMBER_OF_PHYSICAL_CORES) +set(MPIEXEC_MAX_NUMPROCS "${_MPIEXEC_NUMPROCS}" CACHE STRING "Maximum number of processors available to run MPI applications.") +unset(_MPIEXEC_NUMPROCS) +mark_as_advanced(MPIEXEC_EXECUTABLE MPIEXEC_NUMPROC_FLAG MPIEXEC_PREFLAGS MPIEXEC_POSTFLAGS MPIEXEC_MAX_NUMPROCS) + +#============================================================================= +# Backward compatibility input hacks. Propagate the FindMPI hints to C and +# CXX if the respective new versions are not defined. Translate the old +# MPI_LIBRARY and MPI_EXTRA_LIBRARY to respective MPI_${LANG}_LIBRARIES. +# +# Once we find the new variables, we translate them back into their old +# equivalents below. +if(NOT MPI_IGNORE_LEGACY_VARIABLES) + foreach (LANG IN ITEMS C CXX) + # Old input variables. + set(_MPI_OLD_INPUT_VARS COMPILER COMPILE_FLAGS INCLUDE_PATH LINK_FLAGS) + + # Set new vars based on their old equivalents, if the new versions are not already set. + foreach (var ${_MPI_OLD_INPUT_VARS}) + if (NOT MPI_${LANG}_${var} AND MPI_${var}) + set(MPI_${LANG}_${var} "${MPI_${var}}") + endif() + endforeach() + + # Chop the old compile flags into options and definitions + + unset(MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS) + unset(MPI_${LANG}_EXTRA_COMPILE_OPTIONS) + if(MPI_${LANG}_COMPILE_FLAGS) + separate_arguments(MPI_SEPARATE_FLAGS NATIVE_COMMAND "${MPI_${LANG}_COMPILE_FLAGS}") + foreach(_MPI_FLAG IN LISTS MPI_SEPARATE_FLAGS) + if(_MPI_FLAG MATCHES "^ *-D([^ ]+)") + list(APPEND MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS "${CMAKE_MATCH_1}") + else() + list(APPEND MPI_${LANG}_EXTRA_COMPILE_OPTIONS "${_MPI_FLAG}") + endif() + endforeach() + unset(MPI_SEPARATE_FLAGS) + endif() + + # If a list of libraries was given, we'll split it into new-style cache variables + unset(MPI_${LANG}_EXTRA_LIB_NAMES) + if(NOT MPI_${LANG}_LIB_NAMES) + foreach(_MPI_LIB IN LISTS MPI_${LANG}_LIBRARIES MPI_LIBRARY MPI_EXTRA_LIBRARY) + if(_MPI_LIB) + get_filename_component(_MPI_PLAIN_LIB_NAME "${_MPI_LIB}" NAME_WE) + get_filename_component(_MPI_LIB_NAME "${_MPI_LIB}" NAME) + get_filename_component(_MPI_LIB_DIR "${_MPI_LIB}" DIRECTORY) + list(APPEND MPI_${LANG}_EXTRA_LIB_NAMES "${_MPI_PLAIN_LIB_NAME}") + find_library(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY + NAMES "${_MPI_LIB_NAME}" "lib${_MPI_LIB_NAME}" + HINTS ${_MPI_LIB_DIR} $ENV{MPI_LIB} + DOC "Location of the ${_MPI_PLAIN_LIB_NAME} library for MPI" + ) + mark_as_advanced(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) + endif() + endforeach() + endif() + endforeach() +endif() +#============================================================================= + +unset(MPI_VERSION) +unset(MPI_VERSION_MAJOR) +unset(MPI_VERSION_MINOR) + +unset(_MPI_MIN_VERSION) + +# If the user specified a library name we assume they prefer that library over a wrapper. If not, they can disable skipping manually. +if(NOT DEFINED MPI_SKIP_COMPILER_WRAPPER AND MPI_GUESS_LIBRARY_NAME) + set(MPI_SKIP_COMPILER_WRAPPER TRUE) +endif() + +# This loop finds the compilers and sends them off for interrogation. +foreach(LANG IN ITEMS C CXX Fortran) + if(CMAKE_${LANG}_COMPILER_LOADED) + if(NOT MPI_FIND_COMPONENTS) + set(_MPI_FIND_${LANG} TRUE) + elseif( LANG IN_LIST MPI_FIND_COMPONENTS) + set(_MPI_FIND_${LANG} TRUE) + elseif( LANG STREQUAL "CXX" AND NOT MPI_CXX_SKIP_MPICXX AND MPICXX IN_LIST MPI_FIND_COMPONENTS ) + set(_MPI_FIND_${LANG} TRUE) + else() + set(_MPI_FIND_${LANG} FALSE) + endif() + else() + set(_MPI_FIND_${LANG} FALSE) + if(LANG IN_LIST MPI_FIND_COMPONENTS) + string(APPEND _MPI_FAIL_REASON "MPI component '${LANG}' was requested, but language ${LANG} is not enabled. ") + endif() + endif() + if(_MPI_FIND_${LANG}) + if( LANG STREQUAL "CXX" AND NOT MPICXX IN_LIST MPI_FIND_COMPONENTS ) + option(MPI_CXX_SKIP_MPICXX "If true, the MPI-2 C++ bindings are disabled using definitions." FALSE) + mark_as_advanced(MPI_CXX_SKIP_MPICXX) + endif() + _MPI_adjust_compile_definitions(${LANG}) + if(NOT (MPI_${LANG}_LIB_NAMES AND (MPI_${LANG}_INCLUDE_PATH OR MPI_${LANG}_INCLUDE_DIRS OR MPI_${LANG}_COMPILER_INCLUDE_DIRS))) + set(MPI_${LANG}_TRIED_IMPLICIT FALSE) + set(MPI_${LANG}_WORKS_IMPLICIT FALSE) + if(NOT MPI_${LANG}_COMPILER AND NOT MPI_ASSUME_NO_BUILTIN_MPI) + # Should the imported targets be empty, we effectively try whether the compiler supports MPI on its own, which is the case on e.g. + # Cray PrgEnv. + _MPI_create_imported_target(${LANG}) + _MPI_check_lang_works(${LANG} TRUE) + + # If the compiler can build MPI code on its own, it functions as an MPI compiler and we'll set the variable to point to it. + if(MPI_${LANG}_WORKS) + set(MPI_${LANG}_COMPILER "${CMAKE_${LANG}_COMPILER}" CACHE FILEPATH "MPI compiler for ${LANG}" FORCE) + set(MPI_${LANG}_WORKS_IMPLICIT TRUE) + endif() + set(MPI_${LANG}_TRIED_IMPLICIT TRUE) + endif() + + if(NOT MPI_${LANG}_COMPILER STREQUAL CMAKE_${LANG}_COMPILER OR NOT MPI_${LANG}_WORKS) + set(MPI_${LANG}_WRAPPER_FOUND FALSE) + set(MPI_PINNED_COMPILER FALSE) + + if(NOT MPI_SKIP_COMPILER_WRAPPER) + if(MPI_${LANG}_COMPILER) + # If the user supplies a compiler *name* instead of an absolute path, assume that we need to find THAT compiler. + if (NOT IS_ABSOLUTE "${MPI_${LANG}_COMPILER}") + # Get rid of our default list of names and just search for the name the user wants. + set(_MPI_${LANG}_COMPILER_NAMES "${MPI_${LANG}_COMPILER}") + unset(MPI_${LANG}_COMPILER CACHE) + endif() + # If the user specifies a compiler, we don't want to try to search libraries either. + set(MPI_PINNED_COMPILER TRUE) + endif() + + # If we have an MPI base directory, we'll try all compiler names in that one first. + # This should prevent mixing different MPI environments + if(_MPI_BASE_DIR) + find_program(MPI_${LANG}_COMPILER + NAMES ${_MPI_${LANG}_COMPILER_NAMES} + PATH_SUFFIXES bin sbin + HINTS ${_MPI_BASE_DIR} + NO_DEFAULT_PATH + DOC "MPI compiler for ${LANG}" + ) + endif() + + # If the base directory did not help (for example because the mpiexec isn't in the same directory as the compilers), + # we shall try searching in the default paths. + find_program(MPI_${LANG}_COMPILER + NAMES ${_MPI_${LANG}_COMPILER_NAMES} + PATH_SUFFIXES bin sbin + DOC "MPI compiler for ${LANG}" + ) + + if(MPI_${LANG}_COMPILER STREQUAL CMAKE_${LANG}_COMPILER) + set(MPI_PINNED_COMPILER TRUE) + + # If we haven't made the implicit compiler test yet, perform it now. + if(NOT MPI_${LANG}_TRIED_IMPLICIT) + _MPI_create_imported_target(${LANG}) + _MPI_check_lang_works(${LANG} TRUE) + endif() + + # Should the MPI compiler not work implicitly for MPI, still interrogate it. + # Otherwise, MPI compilers for which CMake has separate linking stages, e.g. Intel MPI on Windows where link.exe is being used + # directly during linkage instead of CMAKE__COMPILER will not work. + if(NOT MPI_${LANG}_WORKS) + set(MPI_${LANG}_WORKS_IMPLICIT FALSE) + _MPI_interrogate_compiler(${LANG}) + else() + set(MPI_${LANG}_WORKS_IMPLICIT TRUE) + endif() + elseif(MPI_${LANG}_COMPILER) + _MPI_interrogate_compiler(${LANG}) + endif() + endif() + + # We are on a Cray, environment identifier: PE_ENV is set (CRAY), and + # have NOT found an mpic++-like compiler wrapper (previous block), + # and we do NOT use the Cray cc/CC compiler wrappers as CC/CXX CMake + # compiler. + # So as a last resort, we now interrogate cc/CC/ftn for MPI flags. + if(DEFINED ENV{PE_ENV} AND NOT "${MPI_${LANG}_COMPILER}") + set(MPI_PINNED_COMPILER TRUE) + find_program(MPI_${LANG}_COMPILER + NAMES ${_MPI_Cray_${LANG}_COMPILER_NAMES} + PATH_SUFFIXES bin sbin + DOC "MPI compiler for ${LANG}" + ) + + # If we haven't made the implicit compiler test yet, perform it now. + if(NOT MPI_${LANG}_TRIED_IMPLICIT) + _MPI_create_imported_target(${LANG}) + _MPI_check_lang_works(${LANG} TRUE) + endif() + + set(MPI_${LANG}_WORKS_IMPLICIT TRUE) + _MPI_interrogate_compiler(${LANG}) + endif() + + if(NOT MPI_PINNED_COMPILER AND NOT MPI_${LANG}_WRAPPER_FOUND) + # If MPI_PINNED_COMPILER wasn't given, and the MPI compiler we potentially found didn't work, we withdraw it. + set(MPI_${LANG}_COMPILER "MPI_${LANG}_COMPILER-NOTFOUND" CACHE FILEPATH "MPI compiler for ${LANG}" FORCE) + + if(LANG STREQUAL "C") + set(_MPI_PKG "mpi-c") + elseif(LANG STREQUAL "CXX") + set(_MPI_PKG "mpi-cxx") + elseif(LANG STREQUAL "Fortran") + set(_MPI_PKG "mpi-fort") + else() + set(_MPI_PKG "") + endif() + if(_MPI_PKG AND PKG_CONFIG_FOUND) + pkg_check_modules("MPI_${LANG}_PKG" "${_MPI_PKG}") + if(MPI_${LANG}_PKG_FOUND) + set(MPI_${LANG}_COMPILE_OPTIONS ${MPI_${LANG}_PKG_CFLAGS} CACHE STRING "MPI ${LANG} compilation options" FORCE) + set(MPI_${LANG}_INCLUDE_PATH ${MPI_${LANG}_PKG_INCLUDE_DIRS} CACHE STRING "MPI ${LANG} include directories" FORCE) + set(MPI_${LANG}_LINK_FLAGS ${MPI_${LANG}_PKG_LDFLAGS} CACHE STRING "MPI ${LANG} linker flags" FORCE) + set(MPI_${LANG}_LIB_NAMES ${MPI_${LANG}_PKG_LIBRARIES} CACHE STRING "MPI ${LANG} libraries to link against" FORCE) + foreach(_MPI_LIB IN LISTS MPI_${LANG}_LIB_NAMES) + if(_MPI_LIB) + get_filename_component(_MPI_PLAIN_LIB_NAME "${_MPI_LIB}" NAME_WE) + get_filename_component(_MPI_LIB_NAME "${_MPI_LIB}" NAME) + get_filename_component(_MPI_LIB_DIR "${_MPI_LIB}" DIRECTORY) + find_library(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY + NAMES "${_MPI_LIB_NAME}" "lib${_MPI_LIB_NAME}" + HINTS ${_MPI_LIB_DIR} + DOC "Location of the ${_MPI_PLAIN_LIB_NAME} library for MPI" + ) + mark_as_advanced(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) + endif() + endforeach() + endif() + endif() + + if(NOT MPI_SKIP_GUESSING AND NOT MPI_${LANG}_PKG_FOUND) + # For C++, we may use the settings for C. Should a given compiler wrapper for C++ not exist, but one for C does, we copy over the + # settings for C. An MPI distribution that is in this situation would be IBM Platform MPI. + if(LANG STREQUAL "CXX" AND MPI_C_WRAPPER_FOUND) + set(MPI_${LANG}_COMPILE_OPTIONS ${MPI_C_COMPILE_OPTIONS} CACHE STRING "MPI ${LANG} compilation options" ) + set(MPI_${LANG}_COMPILE_DEFINITIONS ${MPI_C_COMPILE_DEFINITIONS} CACHE STRING "MPI ${LANG} compilation definitions" ) + set(MPI_${LANG}_COMPILER_INCLUDE_DIRS ${MPI_C_INCLUDE_DIRS} CACHE STRING "MPI ${LANG} compiler wrapper include directories") + set(MPI_${LANG}_LINK_FLAGS ${MPI_C_LINK_FLAGS} CACHE STRING "MPI ${LANG} linker flags" ) + set(MPI_${LANG}_LIB_NAMES ${MPI_C_LIB_NAMES} CACHE STRING "MPI ${LANG} libraries to link against" ) + else() + _MPI_guess_settings(${LANG}) + endif() + endif() + endif() + endif() + endif() + + if(NOT MPI_${LANG}_COMPILER STREQUAL CMAKE_${LANG}_COMPILER) + _MPI_split_include_dirs(${LANG}) + _MPI_assemble_include_dirs(${LANG}) + else() + set(MPI_${LANG}_INCLUDE_DIRS "") + endif() + _MPI_assemble_libraries(${LANG}) + + # We always create imported targets even if they're empty + _MPI_create_imported_target(${LANG}) + + if(NOT MPI_${LANG}_WORKS) + _MPI_check_lang_works(${LANG} FALSE) + endif() + + # Next, we'll initialize the MPI variables that have not been previously set. + set(MPI_${LANG}_COMPILE_OPTIONS "" CACHE STRING "MPI ${LANG} compilation flags" ) + set(MPI_${LANG}_COMPILE_DEFINITIONS "" CACHE STRING "MPI ${LANG} compilation definitions" ) + set(MPI_${LANG}_COMPILER_INCLUDE_DIRS "" CACHE STRING "MPI ${LANG} compiler wrapper include directories") + set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "" CACHE STRING "MPI ${LANG} additional include directories") + set(MPI_${LANG}_LINK_FLAGS "" CACHE STRING "MPI ${LANG} linker flags" ) + if(NOT MPI_${LANG}_COMPILER STREQUAL CMAKE_${LANG}_COMPILER) + set(MPI_${LANG}_LIB_NAMES "" CACHE STRING "MPI ${LANG} libraries to link against" ) + endif() + mark_as_advanced( + MPI_${LANG}_COMPILE_OPTIONS + MPI_${LANG}_COMPILE_DEFINITIONS + MPI_${LANG}_LINK_FLAGS + MPI_${LANG}_LIB_NAMES + MPI_${LANG}_COMPILER_INCLUDE_DIRS + MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS + MPI_${LANG}_COMPILER + ) + + # If we've found MPI, then we'll perform additional analysis: Determine the MPI version, MPI library version, supported + # MPI APIs (i.e. MPI-2 C++ bindings). For Fortran we also need to find specific parameters if we're under MPI-3. + if(MPI_${LANG}_WORKS) + if(LANG STREQUAL "CXX" AND NOT DEFINED MPI_MPICXX_FOUND) + if(NOT MPI_CXX_SKIP_MPICXX AND NOT MPI_CXX_VALIDATE_SKIP_MPICXX) + _MPI_try_staged_settings(${LANG} test_mpi MPICXX FALSE FALSE) + if(MPI_RESULT_${LANG}_test_mpi_MPICXX) + set(MPI_MPICXX_FOUND TRUE) + else() + set(MPI_MPICXX_FOUND FALSE) + endif() + else() + set(MPI_MPICXX_FOUND FALSE) + endif() + endif() + + # At this point, we know the bindings present but not the MPI version or anything else. + if(NOT DEFINED MPI_${LANG}_VERSION) + unset(MPI_${LANG}_VERSION_MAJOR) + unset(MPI_${LANG}_VERSION_MINOR) + endif() + set(MPI_BIN_FOLDER ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindMPI) + + # For Fortran, we'll want to use the most modern MPI binding to test capabilities other than the + # Fortran parameters, since those depend on the method of consumption. + # For C++, we can always use the C bindings, and should do so, since the C++ bindings do not exist in MPI-3 + # whereas the C bindings do, and the C++ bindings never offered any feature advantage over their C counterparts. + if(LANG STREQUAL "Fortran") + if(MPI_${LANG}_HAVE_F08_MODULE) + set(MPI_${LANG}_HIGHEST_METHOD F08_MODULE) + elseif(MPI_${LANG}_HAVE_F90_MODULE) + set(MPI_${LANG}_HIGHEST_METHOD F90_MODULE) + else() + set(MPI_${LANG}_HIGHEST_METHOD F77_HEADER) + endif() + + # Another difference between C and Fortran is that we can't use the preprocessor to determine whether MPI_VERSION + # and MPI_SUBVERSION are provided. These defines did not exist in MPI 1.0 and 1.1 and therefore might not + # exist. For C/C++, test_mpi.c will handle the MPI_VERSION extraction, but for Fortran, we need mpiver.f90. + if(NOT DEFINED MPI_${LANG}_VERSION) + _MPI_try_staged_settings(${LANG} mpiver ${MPI_${LANG}_HIGHEST_METHOD} FALSE FALSE) + if(MPI_RESULT_${LANG}_mpiver_${MPI_${LANG}_HIGHEST_METHOD}) + file(STRINGS ${MPI_BIN_FOLDER}/mpiver_${LANG}.bin _MPI_VERSION_STRING LIMIT_COUNT 1 REGEX "INFO:MPI-VER") + if(_MPI_VERSION_STRING MATCHES ".*INFO:MPI-VER\\[([0-9]+)\\.([0-9]+)\\].*") + set(MPI_${LANG}_VERSION_MAJOR "${CMAKE_MATCH_1}") + set(MPI_${LANG}_VERSION_MINOR "${CMAKE_MATCH_2}") + set(MPI_${LANG}_VERSION "${MPI_${LANG}_VERSION_MAJOR}.${MPI_${LANG}_VERSION_MINOR}") + endif() + endif() + endif() + + # Finally, we want to find out which capabilities a given interface supports, compare the MPI-3 standard. + # This is determined by interface specific parameters MPI_SUBARRAYS_SUPPORTED and MPI_ASYNC_PROTECTS_NONBLOCKING + # and might vary between the different methods of consumption. + if(MPI_DETERMINE_Fortran_CAPABILITIES AND NOT MPI_Fortran_CAPABILITIES_DETERMINED) + foreach(mpimethod IN ITEMS F08_MODULE F90_MODULE F77_HEADER) + if(MPI_${LANG}_HAVE_${mpimethod}) + set(MPI_${LANG}_${mpimethod}_SUBARRAYS FALSE) + set(MPI_${LANG}_${mpimethod}_ASYNCPROT FALSE) + _MPI_try_staged_settings(${LANG} fortranparam_mpi ${mpimethod} TRUE FALSE) + if(MPI_RESULT_${LANG}_fortranparam_mpi_${mpimethod} AND + NOT "${MPI_RUN_RESULT_${LANG}_fortranparam_mpi_${mpimethod}}" STREQUAL "FAILED_TO_RUN") + if(MPI_RUN_OUTPUT_${LANG}_fortranparam_mpi_${mpimethod} MATCHES + ".*INFO:SUBARRAYS\\[ *([TF]) *\\]-ASYNCPROT\\[ *([TF]) *\\].*") + if(CMAKE_MATCH_1 STREQUAL "T") + set(MPI_${LANG}_${mpimethod}_SUBARRAYS TRUE) + endif() + if(CMAKE_MATCH_2 STREQUAL "T") + set(MPI_${LANG}_${mpimethod}_ASYNCPROT TRUE) + endif() + endif() + endif() + endif() + endforeach() + set(MPI_Fortran_CAPABILITIES_DETERMINED TRUE) + endif() + else() + set(MPI_${LANG}_HIGHEST_METHOD normal) + + # By the MPI-2 standard, MPI_VERSION and MPI_SUBVERSION are valid for both C and C++ bindings. + if(NOT DEFINED MPI_${LANG}_VERSION) + file(STRINGS ${MPI_BIN_FOLDER}/test_mpi_${LANG}.bin _MPI_VERSION_STRING LIMIT_COUNT 1 REGEX "INFO:MPI-VER") + if(_MPI_VERSION_STRING MATCHES ".*INFO:MPI-VER\\[([0-9]+)\\.([0-9]+)\\].*") + set(MPI_${LANG}_VERSION_MAJOR "${CMAKE_MATCH_1}") + set(MPI_${LANG}_VERSION_MINOR "${CMAKE_MATCH_2}") + set(MPI_${LANG}_VERSION "${MPI_${LANG}_VERSION_MAJOR}.${MPI_${LANG}_VERSION_MINOR}") + endif() + endif() + endif() + + unset(MPI_BIN_FOLDER) + + # At this point, we have dealt with determining the MPI version and parameters for each Fortran method available. + # The one remaining issue is to determine which MPI library is installed. + # Determining the version and vendor of the MPI library is only possible via MPI_Get_library_version() at runtime, + # and therefore we cannot do this while cross-compiling (a user may still define MPI__LIBRARY_VERSION_STRING + # themselves and we'll attempt splitting it, which is equivalent to provide the try_run output). + # It's also worth noting that the installed version string can depend on the language, or on the system the binary + # runs on if MPI is not statically linked. + if(MPI_DETERMINE_LIBRARY_VERSION AND NOT MPI_${LANG}_LIBRARY_VERSION_STRING) + _MPI_try_staged_settings(${LANG} libver_mpi ${MPI_${LANG}_HIGHEST_METHOD} TRUE FALSE) + if(MPI_RESULT_${LANG}_libver_mpi_${MPI_${LANG}_HIGHEST_METHOD} AND + MPI_RUN_RESULT_${LANG}_libver_mpi_${MPI_${LANG}_HIGHEST_METHOD} EQUAL "0") + string(STRIP "${MPI_RUN_OUTPUT_${LANG}_libver_mpi_${MPI_${LANG}_HIGHEST_METHOD}}" + MPI_${LANG}_LIBRARY_VERSION_STRING) + else() + set(MPI_${LANG}_LIBRARY_VERSION_STRING "NOTFOUND") + endif() + endif() + endif() + + set(MPI_${LANG}_FIND_QUIETLY ${MPI_FIND_QUIETLY}) + set(MPI_${LANG}_FIND_VERSION ${MPI_FIND_VERSION}) + set(MPI_${LANG}_FIND_VERSION_EXACT ${MPI_FIND_VERSION_EXACT}) + + unset(MPI_${LANG}_REQUIRED_VARS) + if (NOT MPI_${LANG}_COMPILER STREQUAL CMAKE_${LANG}_COMPILER) + foreach(mpilibname IN LISTS MPI_${LANG}_LIB_NAMES) + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${mpilibname}_LIBRARY") + endforeach() + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_LIB_NAMES") + if(LANG STREQUAL "Fortran") + # For Fortran we only need one of the module or header directories to have *some* support for MPI. + if(NOT MPI_${LANG}_MODULE_DIR) + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_F77_HEADER_DIR") + endif() + if(NOT MPI_${LANG}_F77_HEADER_DIR) + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_MODULE_DIR") + endif() + else() + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_HEADER_DIR") + endif() + if(MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) + foreach(mpiincvar IN LISTS MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${mpiincvar}_INCLUDE_DIR") + endforeach() + endif() + # Append the works variable now. If the settings did not work, this will show up properly. + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_WORKS") + else() + # If the compiler worked implicitly, use its path as output. + # Should the compiler variable be set, we also require it to work. + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_COMPILER") + if(MPI_${LANG}_COMPILER) + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_WORKS") + endif() + endif() + find_package_handle_standard_args(MPI_${LANG} NAME_MISMATCHED + REQUIRED_VARS ${MPI_${LANG}_REQUIRED_VARS} + VERSION_VAR MPI_${LANG}_VERSION) + + if(DEFINED MPI_${LANG}_VERSION) + if(NOT _MPI_MIN_VERSION OR _MPI_MIN_VERSION VERSION_GREATER MPI_${LANG}_VERSION) + set(_MPI_MIN_VERSION MPI_${LANG}_VERSION) + endif() + endif() + endif() +endforeach() + +unset(_MPI_REQ_VARS) +foreach(LANG IN ITEMS C CXX Fortran) + if((NOT MPI_FIND_COMPONENTS AND CMAKE_${LANG}_COMPILER_LOADED) OR LANG IN_LIST MPI_FIND_COMPONENTS) + list(APPEND _MPI_REQ_VARS "MPI_${LANG}_FOUND") + endif() +endforeach() + +if(MPICXX IN_LIST MPI_FIND_COMPONENTS) + list(APPEND _MPI_REQ_VARS "MPI_MPICXX_FOUND") +endif() + +find_package_handle_standard_args(MPI + REQUIRED_VARS ${_MPI_REQ_VARS} + VERSION_VAR ${_MPI_MIN_VERSION} + REASON_FAILURE_MESSAGE "${_MPI_FAIL_REASON}" + HANDLE_COMPONENTS) + +#============================================================================= +# More backward compatibility stuff + +# For compatibility reasons, we also define MPIEXEC +set(MPIEXEC "${MPIEXEC_EXECUTABLE}") + +# Copy over MPI__INCLUDE_PATH from the assembled INCLUDE_DIRS. +foreach(LANG IN ITEMS C CXX Fortran) + if(MPI_${LANG}_FOUND) + set(MPI_${LANG}_INCLUDE_PATH "${MPI_${LANG}_INCLUDE_DIRS}") + unset(MPI_${LANG}_COMPILE_FLAGS) + if(MPI_${LANG}_COMPILE_OPTIONS) + list(JOIN MPI_${LANG}_COMPILE_OPTIONS " " MPI_${LANG}_COMPILE_FLAGS) + endif() + if(MPI_${LANG}_COMPILE_DEFINITIONS) + foreach(_MPI_DEF IN LISTS MPI_${LANG}_COMPILE_DEFINITIONS) + string(APPEND MPI_${LANG}_COMPILE_FLAGS " -D${_MPI_DEF}") + endforeach() + endif() + endif() +endforeach() + +# Bare MPI sans ${LANG} vars are set to CXX then C, depending on what was found. +# This mimics the behavior of the old language-oblivious FindMPI. +set(_MPI_OLD_VARS COMPILER INCLUDE_PATH COMPILE_FLAGS LINK_FLAGS LIBRARIES) +if (MPI_CXX_FOUND) + foreach (var ${_MPI_OLD_VARS}) + set(MPI_${var} ${MPI_CXX_${var}}) + endforeach() +elseif (MPI_C_FOUND) + foreach (var ${_MPI_OLD_VARS}) + set(MPI_${var} ${MPI_C_${var}}) + endforeach() +endif() + +# Chop MPI_LIBRARIES into the old-style MPI_LIBRARY and MPI_EXTRA_LIBRARY, and set them in cache. +if (MPI_LIBRARIES) + list(GET MPI_LIBRARIES 0 MPI_LIBRARY_WORK) + set(MPI_LIBRARY "${MPI_LIBRARY_WORK}") + unset(MPI_LIBRARY_WORK) +else() + set(MPI_LIBRARY "MPI_LIBRARY-NOTFOUND") +endif() + +list(LENGTH MPI_LIBRARIES MPI_NUMLIBS) +if (MPI_NUMLIBS GREATER "1") + set(MPI_EXTRA_LIBRARY_WORK "${MPI_LIBRARIES}") + list(REMOVE_AT MPI_EXTRA_LIBRARY_WORK 0) + set(MPI_EXTRA_LIBRARY "${MPI_EXTRA_LIBRARY_WORK}") + unset(MPI_EXTRA_LIBRARY_WORK) +else() + set(MPI_EXTRA_LIBRARY "MPI_EXTRA_LIBRARY-NOTFOUND") +endif() +set(MPI_IGNORE_LEGACY_VARIABLES TRUE) +#============================================================================= + +# unset these vars to cleanup namespace +unset(_MPI_OLD_VARS) +unset(_MPI_PREFIX_PATH) +unset(_MPI_BASE_DIR) +foreach (lang C CXX Fortran) + unset(_MPI_${LANG}_COMPILER_NAMES) +endforeach() + +cmake_policy(POP) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindOpenSP.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindOpenSP.cmake new file mode 100644 index 0000000000000000000000000000000000000000..4255aefbd45ff3a962fd80c06d70388aef13bd16 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindOpenSP.cmake @@ -0,0 +1,165 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindOpenSP +---------- + +.. versionadded:: 3.25 + +Try to find the OpenSP library. + +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables: + +``OpenSP_FOUND`` + True if (the requested version of) ``OpenSP`` is available + +``OpenSP_VERSION`` + The version of ``OpenSP`` + +``OpenSP_VERSION_MAJOR`` + The major version of ``OpenSP`` + +``OpenSP_VERSION_MINOR`` + The minor version of ``OpenSP`` + +``OpenSP_VERSION_PATCH`` + The patch version of ``OpenSP`` + +``OpenSP_INCLUDE_DIRS`` + The include dirs of ``OpenSP`` with its headers + +``OpenSP_LIBRARIES`` + The OpenSP library for use with target_link_libraries(). + This can be passed to target_link_libraries() instead of + the :prop_tgt:`IMPORTED` ``OpenSP::OpenSP`` target + +``OpenSP_MULTI_BYTE`` + True if ``SP_MULTI_BYTE`` was found to be defined in OpenSP's ``config.h`` + header file, which indicates that the ``OpenSP`` library was compiled with + support for multi-byte characters. The consuming target needs to define the + ``SP_MULTI_BYTE`` to match this value in order to avoid issues with character + decoding. + +IMPORTED Targets +^^^^^^^^^^^^^^^^ + +This module defines the :prop_tgt:`IMPORTED` target ``OpenSP::OpenSP``, if +OpenSP has been found. + +Cache variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``OpenSP_INCLUDE_DIR`` + the OpenSP include directory + +``OpenSP_LIBRARY`` + the absolute path of the osp library + +#]=======================================================================] + +cmake_policy(PUSH) +cmake_policy(SET CMP0159 NEW) # file(STRINGS) with REGEX updates CMAKE_MATCH_ + +find_package(PkgConfig QUIET) +if (PkgConfig_FOUND) + pkg_check_modules(PC_OpenSP QUIET opensp) +endif () + +if (NOT OpenSP_INCLUDE_DIR) + find_path(OpenSP_INCLUDE_DIR + NAMES ParserEventGeneratorKit.h + HINTS + ${PC_OpenSP_INCLUDEDIRS} + ${PC_OpenSP_INCLUDE_DIRS} + PATH_SUFFIXES OpenSP opensp + DOC "The OpenSP include directory" + ) +endif () + +if (NOT OpenSP_LIBRARY) + find_library(OpenSP_LIBRARY_RELEASE + NAMES osp libosp opensp libopensp sp133 libsp + HINTS + ${PC_OpenSP_LIBDIR} + ${PC_OpenSP_LIBRARY_DIRS} + ) + + find_library(OpenSP_LIBRARY_DEBUG + NAMES ospd libospd openspd libopenspd sp133d libspd + HINTS + ${PC_OpenSP_LIBDIR} + ${PC_OpenSP_LIBRARY_DIRS} + ) + + include(SelectLibraryConfigurations) + select_library_configurations(OpenSP) +endif () + +if (OpenSP_INCLUDE_DIR) + if (EXISTS "${OpenSP_INCLUDE_DIR}/config.h") + if (NOT OpenSP_VERSION) + file(STRINGS "${OpenSP_INCLUDE_DIR}/config.h" opensp_version_str REGEX "^#define[\t ]+SP_VERSION[\t ]+\".*\"") + string(REGEX REPLACE "^.*SP_VERSION[\t ]+\"([^\"]*)\".*$" "\\1" OpenSP_VERSION "${opensp_version_str}") + unset(opensp_version_str) + endif () + + if (OpenSP_VERSION MATCHES [=[([0-9]+)\.([0-9]+)\.([0-9]+)]=]) + set(OpenSP_VERSION_MAJOR "${CMAKE_MATCH_1}") + set(OpenSP_VERSION_MINOR "${CMAKE_MATCH_2}") + set(OpenSP_VERSION_PATCH "${CMAKE_MATCH_3}") + endif () + + include(CheckCXXSymbolExists) + check_cxx_symbol_exists(SP_MULTI_BYTE "${OpenSP_INCLUDE_DIR}/config.h" OpenSP_MULTI_BYTE) + endif () +endif () + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(OpenSP + FOUND_VAR OpenSP_FOUND + REQUIRED_VARS OpenSP_LIBRARY OpenSP_INCLUDE_DIR + VERSION_VAR OpenSP_VERSION + ) + +mark_as_advanced(OpenSP_INCLUDE_DIR OpenSP_LIBRARY OpenSP_MULTI_BYTE) + +if (OpenSP_FOUND) + set(OpenSP_INCLUDE_DIRS ${OpenSP_INCLUDE_DIR}) + if (NOT TARGET OpenSP::OpenSP) + add_library(OpenSP::OpenSP UNKNOWN IMPORTED) + if (EXISTS "${OpenSP_LIBRARY}") + set_target_properties(OpenSP::OpenSP PROPERTIES + IMPORTED_LOCATION "${OpenSP_LIBRARY}") + endif () + set_target_properties(OpenSP::OpenSP PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${OpenSP_INCLUDE_DIRS}") + + if (OpenSP_LIBRARY_RELEASE) + set_target_properties(OpenSP::OpenSP PROPERTIES + IMPORTED_LOCATION_RELEASE "${OpenSP_LIBRARY_RELEASE}") + set_property(TARGET OpenSP::OpenSP APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + endif () + + if (OpenSP_LIBRARY_DEBUG) + set_target_properties(OpenSP::OpenSP PROPERTIES + IMPORTED_LOCATION_DEBUG "${OpenSP_LIBRARY_DEBUG}") + set_property(TARGET OpenSP::OpenSP APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + endif () + endif () +endif () + +include(FeatureSummary) +set_package_properties(OpenSP PROPERTIES + URL "http://openjade.sourceforge.net/doc/index.htm" + DESCRIPTION "An SGML System Conforming to International Standard ISO 8879" + ) + +cmake_policy(POP) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake new file mode 100644 index 0000000000000000000000000000000000000000..c6db4330a058f99be01dc6bb778fec9085c49901 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake @@ -0,0 +1,614 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindPackageHandleStandardArgs +----------------------------- + +This module provides functions intended to be used in :ref:`Find Modules` +implementing :command:`find_package()` calls. + +.. command:: find_package_handle_standard_args + + This command handles the ``REQUIRED``, ``QUIET`` and version-related + arguments of :command:`find_package`. It also sets the + ``_FOUND`` variable. The package is considered found if all + variables listed contain valid results, e.g. valid filepaths. + + There are two signatures: + + .. code-block:: cmake + + find_package_handle_standard_args( + (DEFAULT_MSG|) + ... + ) + + find_package_handle_standard_args( + [FOUND_VAR ] + [REQUIRED_VARS ...] + [VERSION_VAR ] + [HANDLE_VERSION_RANGE] + [HANDLE_COMPONENTS] + [CONFIG_MODE] + [NAME_MISMATCHED] + [REASON_FAILURE_MESSAGE ] + [FAIL_MESSAGE ] + ) + + The ``_FOUND`` variable will be set to ``TRUE`` if all + the variables ``...`` are valid and any optional + constraints are satisfied, and ``FALSE`` otherwise. A success or + failure message may be displayed based on the results and on + whether the ``REQUIRED`` and/or ``QUIET`` option was given to + the :command:`find_package` call. + + The options are: + + ``(DEFAULT_MSG|)`` + In the simple signature this specifies the failure message. + Use ``DEFAULT_MSG`` to ask for a default message to be computed + (recommended). Not valid in the full signature. + + ``FOUND_VAR `` + .. deprecated:: 3.3 + + Specifies either ``_FOUND`` or + ``_FOUND`` as the result variable. This exists only + for compatibility with older versions of CMake and is now ignored. + Result variables of both names are always set for compatibility. + + ``REQUIRED_VARS ...`` + Specify the variables which are required for this package. + These may be named in the generated failure message asking the + user to set the missing variable values. Therefore these should + typically be cache entries such as ``FOO_LIBRARY`` and not output + variables like ``FOO_LIBRARIES``. + + .. versionchanged:: 3.18 + If ``HANDLE_COMPONENTS`` is specified, this option can be omitted. + + ``VERSION_VAR `` + Specify the name of a variable that holds the version of the package + that has been found. This version will be checked against the + (potentially) specified required version given to the + :command:`find_package` call, including its ``EXACT`` option. + The default messages include information about the required + version and the version which has been actually found, both + if the version is ok or not. + + ``HANDLE_VERSION_RANGE`` + .. versionadded:: 3.19 + + Enable handling of a version range, if one is specified. Without this + option, a developer warning will be displayed if a version range is + specified. + + ``HANDLE_COMPONENTS`` + Enable handling of package components. In this case, the command + will report which components have been found and which are missing, + and the ``_FOUND`` variable will be set to ``FALSE`` + if any of the required components (i.e. not the ones listed after + the ``OPTIONAL_COMPONENTS`` option of :command:`find_package`) are + missing. + + ``CONFIG_MODE`` + Specify that the calling find module is a wrapper around a + call to ``find_package( NO_MODULE)``. This implies + a ``VERSION_VAR`` value of ``_VERSION``. The command + will automatically check whether the package configuration file + was found. + + ``REASON_FAILURE_MESSAGE `` + .. versionadded:: 3.16 + + Specify a custom message of the reason for the failure which will be + appended to the default generated message. + + ``FAIL_MESSAGE `` + Specify a custom failure message instead of using the default + generated message. Not recommended. + + ``NAME_MISMATCHED`` + .. versionadded:: 3.17 + + Indicate that the ```` does not match + ``${CMAKE_FIND_PACKAGE_NAME}``. This is usually a mistake and raises a + warning, but it may be intentional for usage of the command for components + of a larger package. + +Example for the simple signature: + +.. code-block:: cmake + + find_package_handle_standard_args(LibXml2 DEFAULT_MSG + LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR) + +The ``LibXml2`` package is considered to be found if both +``LIBXML2_LIBRARY`` and ``LIBXML2_INCLUDE_DIR`` are valid. +Then also ``LibXml2_FOUND`` is set to ``TRUE``. If it is not found +and ``REQUIRED`` was used, it fails with a +:command:`message(FATAL_ERROR)`, independent whether ``QUIET`` was +used or not. If it is found, success will be reported, including +the content of the first ````. On repeated CMake runs, +the same message will not be printed again. + +.. note:: + + If ```` does not match ``CMAKE_FIND_PACKAGE_NAME`` for the + calling module, a warning that there is a mismatch is given. The + ``FPHSA_NAME_MISMATCHED`` variable may be set to bypass the warning if using + the old signature and the ``NAME_MISMATCHED`` argument using the new + signature. To avoid forcing the caller to require newer versions of CMake for + usage, the variable's value will be used if defined when the + ``NAME_MISMATCHED`` argument is not passed for the new signature (but using + both is an error).. + +Example for the full signature: + +.. code-block:: cmake + + find_package_handle_standard_args(LibArchive + REQUIRED_VARS LibArchive_LIBRARY LibArchive_INCLUDE_DIR + VERSION_VAR LibArchive_VERSION) + +In this case, the ``LibArchive`` package is considered to be found if +both ``LibArchive_LIBRARY`` and ``LibArchive_INCLUDE_DIR`` are valid. +Also the version of ``LibArchive`` will be checked by using the version +contained in ``LibArchive_VERSION``. Since no ``FAIL_MESSAGE`` is given, +the default messages will be printed. + +Another example for the full signature: + +.. code-block:: cmake + + find_package(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4) + find_package_handle_standard_args(Automoc4 CONFIG_MODE) + +In this case, a ``FindAutmoc4.cmake`` module wraps a call to +``find_package(Automoc4 NO_MODULE)`` and adds an additional search +directory for ``automoc4``. Then the call to +``find_package_handle_standard_args`` produces a proper success/failure +message. + +.. command:: find_package_check_version + + .. versionadded:: 3.19 + + Helper function which can be used to check if a ```` is valid + against version-related arguments of :command:`find_package`. + + .. code-block:: cmake + + find_package_check_version( + [HANDLE_VERSION_RANGE] + [RESULT_MESSAGE_VARIABLE ] + ) + + The ```` will hold a boolean value giving the result of the check. + + The options are: + + ``HANDLE_VERSION_RANGE`` + Enable handling of a version range, if one is specified. Without this + option, a developer warning will be displayed if a version range is + specified. + + ``RESULT_MESSAGE_VARIABLE `` + Specify a variable to get back a message describing the result of the check. + +Example for the usage: + +.. code-block:: cmake + + find_package_check_version(1.2.3 result HANDLE_VERSION_RANGE + RESULT_MESSAGE_VARIABLE reason) + if (result) + message (STATUS "${reason}") + else() + message (FATAL_ERROR "${reason}") + endif() +#]=======================================================================] + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageMessage.cmake) + + +cmake_policy(PUSH) +# numbers and boolean constants +cmake_policy (SET CMP0012 NEW) +# IN_LIST operator +cmake_policy (SET CMP0057 NEW) + + +# internal helper macro +macro(_FPHSA_FAILURE_MESSAGE _msg) + set (__msg "${_msg}") + if (FPHSA_REASON_FAILURE_MESSAGE) + string(APPEND __msg "\n Reason given by package: ${FPHSA_REASON_FAILURE_MESSAGE}\n") + elseif(NOT DEFINED PROJECT_NAME) + string(APPEND __msg "\n" + "Hint: The project() command has not yet been called. It sets up system-specific search paths.") + endif() + if (${_NAME}_FIND_REQUIRED) + message(FATAL_ERROR "${__msg}") + else () + if (NOT ${_NAME}_FIND_QUIETLY) + message(STATUS "${__msg}") + endif () + endif () +endmacro() + + +# internal helper macro to generate the failure message when used in CONFIG_MODE: +macro(_FPHSA_HANDLE_FAILURE_CONFIG_MODE) + # _CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found: + if(${_NAME}_CONFIG) + _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing:${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})") + else() + # If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version. + # List them all in the error message: + if(${_NAME}_CONSIDERED_CONFIGS) + set(configsText "") + list(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount) + math(EXPR configsCount "${configsCount} - 1") + foreach(currentConfigIndex RANGE ${configsCount}) + list(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename) + list(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version) + string(APPEND configsText "\n ${filename} (version ${version})") + endforeach() + if (${_NAME}_NOT_FOUND_MESSAGE) + if (FPHSA_REASON_FAILURE_MESSAGE) + string(PREPEND FPHSA_REASON_FAILURE_MESSAGE "${${_NAME}_NOT_FOUND_MESSAGE}\n ") + else() + set(FPHSA_REASON_FAILURE_MESSAGE "${${_NAME}_NOT_FOUND_MESSAGE}") + endif() + else() + string(APPEND configsText "\n") + endif() + _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:${configsText}") + + else() + # Simple case: No Config-file was found at all: + _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}") + endif() + endif() +endmacro() + + +function(FIND_PACKAGE_CHECK_VERSION version result) + cmake_parse_arguments (PARSE_ARGV 2 FPCV "HANDLE_VERSION_RANGE;NO_AUTHOR_WARNING_VERSION_RANGE" "RESULT_MESSAGE_VARIABLE" "") + + if (FPCV_UNPARSED_ARGUMENTS) + message (FATAL_ERROR "find_package_check_version(): ${FPCV_UNPARSED_ARGUMENTS}: unexpected arguments") + endif() + if ("RESULT_MESSAGE_VARIABLE" IN_LIST FPCV_KEYWORDS_MISSING_VALUES) + message (FATAL_ERROR "find_package_check_version(): RESULT_MESSAGE_VARIABLE expects an argument") + endif() + + set (${result} FALSE PARENT_SCOPE) + if (FPCV_RESULT_MESSAGE_VARIABLE) + unset (${FPCV_RESULT_MESSAGE_VARIABLE} PARENT_SCOPE) + endif() + + if (_CMAKE_FPHSA_PACKAGE_NAME) + set (package "${_CMAKE_FPHSA_PACKAGE_NAME}") + elseif (CMAKE_FIND_PACKAGE_NAME) + set (package "${CMAKE_FIND_PACKAGE_NAME}") + else() + message (FATAL_ERROR "find_package_check_version(): Cannot be used outside a 'Find Module'") + endif() + + if (NOT FPCV_NO_AUTHOR_WARNING_VERSION_RANGE + AND ${package}_FIND_VERSION_RANGE AND NOT FPCV_HANDLE_VERSION_RANGE) + message(AUTHOR_WARNING + "`find_package()` specify a version range but the option " + "HANDLE_VERSION_RANGE` is not passed to `find_package_check_version()`. " + "Only the lower endpoint of the range will be used.") + endif() + + + set (version_ok FALSE) + unset (version_msg) + + if (FPCV_HANDLE_VERSION_RANGE AND ${package}_FIND_VERSION_RANGE) + if ((${package}_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" + AND version VERSION_GREATER_EQUAL ${package}_FIND_VERSION_MIN) + AND ((${package}_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" + AND version VERSION_LESS_EQUAL ${package}_FIND_VERSION_MAX) + OR (${package}_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" + AND version VERSION_LESS ${package}_FIND_VERSION_MAX))) + set (version_ok TRUE) + set(version_msg "(found suitable version \"${version}\", required range is \"${${package}_FIND_VERSION_RANGE}\")") + else() + set(version_msg "Found unsuitable version \"${version}\", required range is \"${${package}_FIND_VERSION_RANGE}\"") + endif() + elseif (DEFINED ${package}_FIND_VERSION) + if(${package}_FIND_VERSION_EXACT) # exact version required + # count the dots in the version string + string(REGEX REPLACE "[^.]" "" version_dots "${version}") + # add one dot because there is one dot more than there are components + string(LENGTH "${version_dots}." version_dots) + if (version_dots GREATER ${package}_FIND_VERSION_COUNT) + # Because of the C++ implementation of find_package() ${package}_FIND_VERSION_COUNT + # is at most 4 here. Therefore a simple lookup table is used. + if (${package}_FIND_VERSION_COUNT EQUAL 1) + set(version_regex "[^.]*") + elseif (${package}_FIND_VERSION_COUNT EQUAL 2) + set(version_regex "[^.]*\\.[^.]*") + elseif (${package}_FIND_VERSION_COUNT EQUAL 3) + set(version_regex "[^.]*\\.[^.]*\\.[^.]*") + else() + set(version_regex "[^.]*\\.[^.]*\\.[^.]*\\.[^.]*") + endif() + string(REGEX REPLACE "^(${version_regex})\\..*" "\\1" version_head "${version}") + if (NOT ${package}_FIND_VERSION VERSION_EQUAL version_head) + set(version_msg "Found unsuitable version \"${version}\", but required is exact version \"${${package}_FIND_VERSION}\"") + else () + set(version_ok TRUE) + set(version_msg "(found suitable exact version \"${version}\")") + endif () + else () + if (NOT ${package}_FIND_VERSION VERSION_EQUAL version) + set(version_msg "Found unsuitable version \"${version}\", but required is exact version \"${${package}_FIND_VERSION}\"") + else () + set(version_ok TRUE) + set(version_msg "(found suitable exact version \"${version}\")") + endif () + endif () + else() # minimum version + if (${package}_FIND_VERSION VERSION_GREATER version) + set(version_msg "Found unsuitable version \"${version}\", but required is at least \"${${package}_FIND_VERSION}\"") + else() + set(version_ok TRUE) + set(version_msg "(found suitable version \"${version}\", minimum required is \"${${package}_FIND_VERSION}\")") + endif() + endif() + else () + set(version_ok TRUE) + set(version_msg "(found version \"${version}\")") + endif() + + set (${result} ${version_ok} PARENT_SCOPE) + if (FPCV_RESULT_MESSAGE_VARIABLE) + set (${FPCV_RESULT_MESSAGE_VARIABLE} "${version_msg}" PARENT_SCOPE) + endif() +endfunction() + + +function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG) + + # Set up the arguments for `cmake_parse_arguments`. + set(options CONFIG_MODE HANDLE_COMPONENTS NAME_MISMATCHED HANDLE_VERSION_RANGE) + set(oneValueArgs FAIL_MESSAGE REASON_FAILURE_MESSAGE VERSION_VAR FOUND_VAR) + set(multiValueArgs REQUIRED_VARS) + + # Check whether we are in 'simple' or 'extended' mode: + set(_KEYWORDS_FOR_EXTENDED_MODE ${options} ${oneValueArgs} ${multiValueArgs} ) + list(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX) + + unset(FPHSA_NAME_MISMATCHED_override) + if (DEFINED FPHSA_NAME_MISMATCHED) + # If the variable NAME_MISMATCHED variable is set, error if it is passed as + # an argument. The former is for old signatures, the latter is for new + # signatures. + list(FIND ARGN "NAME_MISMATCHED" name_mismatched_idx) + if (NOT name_mismatched_idx EQUAL "-1") + message(FATAL_ERROR + "The `NAME_MISMATCHED` argument may only be specified by the argument or " + "the variable, not both.") + endif () + + # But use the variable if it is not an argument to avoid forcing minimum + # CMake version bumps for calling modules. + set(FPHSA_NAME_MISMATCHED_override "${FPHSA_NAME_MISMATCHED}") + endif () + + if(${INDEX} EQUAL -1) + set(FPHSA_FAIL_MESSAGE ${_FIRST_ARG}) + set(FPHSA_REQUIRED_VARS ${ARGN}) + set(FPHSA_VERSION_VAR) + else() + cmake_parse_arguments(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}" ${_FIRST_ARG} ${ARGN}) + + if(FPHSA_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"") + endif() + + if(NOT FPHSA_FAIL_MESSAGE) + set(FPHSA_FAIL_MESSAGE "DEFAULT_MSG") + endif() + + # In config-mode, we rely on the variable _CONFIG, which is set by find_package() + # when it successfully found the config-file, including version checking: + if(FPHSA_CONFIG_MODE) + list(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG) + list(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS) + set(FPHSA_VERSION_VAR ${_NAME}_VERSION) + endif() + + if(NOT FPHSA_REQUIRED_VARS AND NOT FPHSA_HANDLE_COMPONENTS) + message(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()") + endif() + endif() + + if (DEFINED FPHSA_NAME_MISMATCHED_override) + set(FPHSA_NAME_MISMATCHED "${FPHSA_NAME_MISMATCHED_override}") + endif () + + if (DEFINED CMAKE_FIND_PACKAGE_NAME + AND NOT FPHSA_NAME_MISMATCHED + AND NOT _NAME STREQUAL CMAKE_FIND_PACKAGE_NAME) + message(AUTHOR_WARNING + "The package name passed to `find_package_handle_standard_args` " + "(${_NAME}) does not match the name of the calling package " + "(${CMAKE_FIND_PACKAGE_NAME}). This can lead to problems in calling " + "code that expects `find_package` result variables (e.g., `_FOUND`) " + "to follow a certain pattern.") + endif () + + if (${_NAME}_FIND_VERSION_RANGE AND NOT FPHSA_HANDLE_VERSION_RANGE) + message(AUTHOR_WARNING + "`find_package()` specify a version range but the module ${_NAME} does " + "not support this capability. Only the lower endpoint of the range " + "will be used.") + endif() + + # to propagate package name to FIND_PACKAGE_CHECK_VERSION + set(_CMAKE_FPHSA_PACKAGE_NAME "${_NAME}") + + # now that we collected all arguments, process them + + if("x${FPHSA_FAIL_MESSAGE}" STREQUAL "xDEFAULT_MSG") + set(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}") + endif() + + if (FPHSA_REQUIRED_VARS) + list(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR) + endif() + + string(TOUPPER ${_NAME} _NAME_UPPER) + string(TOLOWER ${_NAME} _NAME_LOWER) + + if(FPHSA_FOUND_VAR) + set(_FOUND_VAR_UPPER ${_NAME_UPPER}_FOUND) + set(_FOUND_VAR_MIXED ${_NAME}_FOUND) + if(FPHSA_FOUND_VAR STREQUAL _FOUND_VAR_MIXED OR FPHSA_FOUND_VAR STREQUAL _FOUND_VAR_UPPER) + set(_FOUND_VAR ${FPHSA_FOUND_VAR}) + else() + message(FATAL_ERROR "The argument for FOUND_VAR is \"${FPHSA_FOUND_VAR}\", but only \"${_FOUND_VAR_MIXED}\" and \"${_FOUND_VAR_UPPER}\" are valid names.") + endif() + else() + set(_FOUND_VAR ${_NAME_UPPER}_FOUND) + endif() + + # collect all variables which were not found, so they can be printed, so the + # user knows better what went wrong (#6375) + set(MISSING_VARS "") + set(DETAILS "") + # check if all passed variables are valid + set(FPHSA_FOUND_${_NAME} TRUE) + foreach(_CURRENT_VAR ${FPHSA_REQUIRED_VARS}) + if(NOT ${_CURRENT_VAR}) + set(FPHSA_FOUND_${_NAME} FALSE) + string(APPEND MISSING_VARS " ${_CURRENT_VAR}") + else() + string(APPEND DETAILS "[${${_CURRENT_VAR}}]") + endif() + endforeach() + if(FPHSA_FOUND_${_NAME}) + set(${_NAME}_FOUND TRUE) + set(${_NAME_UPPER}_FOUND TRUE) + else() + set(${_NAME}_FOUND FALSE) + set(${_NAME_UPPER}_FOUND FALSE) + endif() + + # component handling + unset(FOUND_COMPONENTS_MSG) + unset(MISSING_COMPONENTS_MSG) + + if(FPHSA_HANDLE_COMPONENTS) + foreach(comp ${${_NAME}_FIND_COMPONENTS}) + if(${_NAME}_${comp}_FOUND) + + if(NOT DEFINED FOUND_COMPONENTS_MSG) + set(FOUND_COMPONENTS_MSG "found components:") + endif() + string(APPEND FOUND_COMPONENTS_MSG " ${comp}") + + else() + + if(NOT DEFINED MISSING_COMPONENTS_MSG) + set(MISSING_COMPONENTS_MSG "missing components:") + endif() + string(APPEND MISSING_COMPONENTS_MSG " ${comp}") + + if(${_NAME}_FIND_REQUIRED_${comp}) + set(${_NAME}_FOUND FALSE) + string(APPEND MISSING_VARS " ${comp}") + endif() + + endif() + endforeach() + set(COMPONENT_MSG "${FOUND_COMPONENTS_MSG} ${MISSING_COMPONENTS_MSG}") + string(APPEND DETAILS "[c${COMPONENT_MSG}]") + endif() + + # version handling: + set(VERSION_MSG "") + set(VERSION_OK TRUE) + + # check that the version variable is not empty to avoid emitting a misleading + # message (i.e. `Found unsuitable version ""`) + if (DEFINED ${_NAME}_FIND_VERSION) + if(DEFINED ${FPHSA_VERSION_VAR}) + if(NOT "${${FPHSA_VERSION_VAR}}" STREQUAL "") + set(_FOUND_VERSION ${${FPHSA_VERSION_VAR}}) + if (FPHSA_HANDLE_VERSION_RANGE) + set (FPCV_HANDLE_VERSION_RANGE HANDLE_VERSION_RANGE) + else() + set(FPCV_HANDLE_VERSION_RANGE NO_AUTHOR_WARNING_VERSION_RANGE) + endif() + find_package_check_version ("${_FOUND_VERSION}" VERSION_OK RESULT_MESSAGE_VARIABLE VERSION_MSG + ${FPCV_HANDLE_VERSION_RANGE}) + else() + set(VERSION_OK FALSE) + endif() + endif() + if("${${FPHSA_VERSION_VAR}}" STREQUAL "") + # if the package was not found, but a version was given, add that to the output: + if(${_NAME}_FIND_VERSION_EXACT) + set(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")") + elseif (FPHSA_HANDLE_VERSION_RANGE AND ${_NAME}_FIND_VERSION_RANGE) + set(VERSION_MSG "(Required is version range \"${${_NAME}_FIND_VERSION_RANGE}\")") + else() + set(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")") + endif() + endif() + else () + # Check with DEFINED as the found version may be 0. + if(DEFINED ${FPHSA_VERSION_VAR}) + set(VERSION_MSG "(found version \"${${FPHSA_VERSION_VAR}}\")") + endif() + endif () + + if(VERSION_OK) + string(APPEND DETAILS "[v${${FPHSA_VERSION_VAR}}(${${_NAME}_FIND_VERSION})]") + else() + set(${_NAME}_FOUND FALSE) + endif() + + + # print the result: + if (${_NAME}_FOUND) + FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG} ${COMPONENT_MSG}" "${DETAILS}") + else () + + if(FPHSA_CONFIG_MODE) + _FPHSA_HANDLE_FAILURE_CONFIG_MODE() + else() + if(NOT VERSION_OK) + set(RESULT_MSG) + if (_FIRST_REQUIRED_VAR) + string (APPEND RESULT_MSG "found ${${_FIRST_REQUIRED_VAR}}") + endif() + if (COMPONENT_MSG) + if (RESULT_MSG) + string (APPEND RESULT_MSG ", ") + endif() + string (APPEND RESULT_MSG "${FOUND_COMPONENTS_MSG}") + endif() + _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (${RESULT_MSG})") + else() + _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing:${MISSING_VARS}) ${VERSION_MSG}") + endif() + endif() + + endif () + + set(${_NAME}_FOUND ${${_NAME}_FOUND} PARENT_SCOPE) + set(${_NAME_UPPER}_FOUND ${${_NAME}_FOUND} PARENT_SCOPE) +endfunction() + + +cmake_policy(POP) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindPhysFS.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindPhysFS.cmake new file mode 100644 index 0000000000000000000000000000000000000000..19e5ba919524912d246436f80e727d074c6a085f --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindPhysFS.cmake @@ -0,0 +1,46 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindPhysFS +---------- + +Locate PhysFS library This module defines: + +``PHYSFS_LIBRARY`` + the name of the library to link against +``PHYSFS_FOUND`` + if false, do not try to link to PHYSFS +``PHYSFS_INCLUDE_DIR`` + where to find physfs.h + +``$PHYSFSDIR`` is an environment variable that would correspond to:: + + ./configure --prefix=$PHYSFSDIR + +used in building PHYSFS. +#]=======================================================================] + +find_path(PHYSFS_INCLUDE_DIR physfs.h + HINTS + ENV PHYSFSDIR + PATH_SUFFIXES include/physfs include + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt +) + +find_library(PHYSFS_LIBRARY + NAMES physfs + HINTS + ENV PHYSFSDIR + PATH_SUFFIXES lib + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt +) + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PhysFS DEFAULT_MSG PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindProducer.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindProducer.cmake new file mode 100644 index 0000000000000000000000000000000000000000..8a16e8af2b4c67f29cba6264085cce1a7097e1d6 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindProducer.cmake @@ -0,0 +1,70 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindProducer +------------ + +Though Producer isn't directly part of OpenSceneGraph, its primary +user is OSG so I consider this part of the Findosg* suite used to find +OpenSceneGraph components. You'll notice that I accept OSGDIR as an +environment path. + +Each component is separate and you must opt in to each module. You +must also opt into OpenGL (and OpenThreads?) as these modules won't do +it for you. This is to allow you control over your own system piece +by piece in case you need to opt out of certain components or change +the Find behavior for a particular module (perhaps because the default +:module:`FindOpenGL` module doesn't work with your system as an example). +If you want to use a more convenient module that includes everything, +use the :module:`FindOpenSceneGraph` instead of the Findosg*.cmake +modules. + +Locate Producer This module defines: + +``PRODUCER_LIBRARY`` + +``PRODUCER_FOUND`` + if false, do not try to link to Producer +``PRODUCER_INCLUDE_DIR`` + where to find the headers + +``$PRODUCER_DIR`` is an environment variable that would correspond to:: + + ./configure --prefix=$PRODUCER_DIR + +used in building osg. +#]=======================================================================] + +# Header files are presumed to be included like +# #include + +# Try the user's environment request before anything else. +find_path(PRODUCER_INCLUDE_DIR Producer/CameraGroup + HINTS + ENV PRODUCER_DIR + ENV OSG_DIR + ENV OSGDIR + PATH_SUFFIXES include + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT] + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT] +) + +find_library(PRODUCER_LIBRARY + NAMES Producer + HINTS + ENV PRODUCER_DIR + ENV OSG_DIR + ENV OSGDIR + PATH_SUFFIXES lib + PATHS + /opt +) + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Producer DEFAULT_MSG + PRODUCER_LIBRARY PRODUCER_INCLUDE_DIR) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindQt4.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindQt4.cmake new file mode 100644 index 0000000000000000000000000000000000000000..9174bee1f26d6639dfc4962ec8ace1c32f08aafb --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindQt4.cmake @@ -0,0 +1,1346 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindQt4 +------- + +Finding and Using Qt4 +^^^^^^^^^^^^^^^^^^^^^ + +This module can be used to find Qt4. The most important issue is that +the Qt4 qmake is available via the system path. This qmake is then +used to detect basically everything else. This module defines a +number of :prop_tgt:`IMPORTED` targets, macros and variables. + +Typical usage could be something like: + +.. code-block:: cmake + + set(CMAKE_AUTOMOC ON) + set(CMAKE_INCLUDE_CURRENT_DIR ON) + find_package(Qt4 4.4.3 REQUIRED QtGui QtXml) + add_executable(myexe main.cpp) + target_link_libraries(myexe Qt4::QtGui Qt4::QtXml) + +.. note:: + + When using :prop_tgt:`IMPORTED` targets, the qtmain.lib static library is + automatically linked on Windows for :prop_tgt:`WIN32 ` + executables. To disable that globally, set the + ``QT4_NO_LINK_QTMAIN`` variable before finding Qt4. To disable that + for a particular executable, set the ``QT4_NO_LINK_QTMAIN`` target + property to ``TRUE`` on the executable. + +Qt Build Tools +^^^^^^^^^^^^^^ + +Qt relies on some bundled tools for code generation, such as ``moc`` for +meta-object code generation, ``uic`` for widget layout and population, +and ``rcc`` for virtual filesystem content generation. These tools may be +automatically invoked by :manual:`cmake(1)` if the appropriate conditions +are met. See :manual:`cmake-qt(7)` for more. + +Qt Macros +^^^^^^^^^ + +In some cases it can be necessary or useful to invoke the Qt build tools in a +more-manual way. Several macros are available to add targets for such uses. + +:: + + macro QT4_WRAP_CPP(outfiles inputfile ... [TARGET tgt] OPTIONS ...) + create moc code from a list of files containing Qt class with + the Q_OBJECT declaration. Per-directory preprocessor definitions + are also added. If the is specified, the + INTERFACE_INCLUDE_DIRECTORIES and INTERFACE_COMPILE_DEFINITIONS from + the are passed to moc. Options may be given to moc, such as + those found when executing "moc -help". + + +:: + + macro QT4_WRAP_UI(outfiles inputfile ... OPTIONS ...) + create code from a list of Qt designer ui files. + Options may be given to uic, such as those found + when executing "uic -help" + + +:: + + macro QT4_ADD_RESOURCES(outfiles inputfile ... OPTIONS ...) + create code from a list of Qt resource files. + Options may be given to rcc, such as those found + when executing "rcc -help" + + +:: + + macro QT4_GENERATE_MOC(inputfile outputfile [TARGET tgt]) + creates a rule to run moc on infile and create outfile. + Use this if for some reason QT4_WRAP_CPP() isn't appropriate, e.g. + because you need a custom filename for the moc file or something + similar. If the is specified, the + INTERFACE_INCLUDE_DIRECTORIES and INTERFACE_COMPILE_DEFINITIONS from + the are passed to moc. + + +:: + + macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename) + Create the interface header and implementation files with the + given basename from the given interface xml file and add it to + the list of sources. + + You can pass additional parameters to the qdbusxml2cpp call by setting + properties on the input file: + + INCLUDE the given file will be included in the generate interface header + + CLASSNAME the generated class is named accordingly + + NO_NAMESPACE the generated class is not wrapped in a namespace + + +:: + + macro QT4_ADD_DBUS_INTERFACES(outfiles inputfile ... ) + Create the interface header and implementation files + for all listed interface xml files. + The basename will be automatically determined from the name + of the xml file. + + The source file properties described for + QT4_ADD_DBUS_INTERFACE also apply here. + + +:: + + macro QT4_ADD_DBUS_ADAPTOR(outfiles xmlfile parentheader parentclassname + [basename] [classname]) + create a dbus adaptor (header and implementation file) from the xml file + describing the interface, and add it to the list of sources. The adaptor + forwards the calls to a parent class, defined in parentheader and named + parentclassname. The name of the generated files will be + adaptor.{cpp,h} where basename defaults to the basename of the + xml file. + If is provided, then it will be used as the classname of the + adaptor itself. + + +:: + + macro QT4_GENERATE_DBUS_INTERFACE( header [interfacename] OPTIONS ...) + generate the xml interface file from the given header. + If the optional argument interfacename is omitted, the name of the + interface file is constructed from the basename of the header with + the suffix .xml appended. + Options may be given to qdbuscpp2xml, such as those found when + executing "qdbuscpp2xml --help" + + +:: + + macro QT4_CREATE_TRANSLATION( qm_files directories ... sources ... + ts_files ... OPTIONS ...) + out: qm_files + in: directories sources ts_files + options: flags to pass to lupdate, such as -extensions to specify + extensions for a directory scan. + generates commands to create .ts (via lupdate) and .qm + (via lrelease) - files from directories and/or sources. The ts files are + created and/or updated in the source tree (unless given with full paths). + The qm files are generated in the build tree. + Updating the translations can be done by adding the qm_files + to the source list of your library/executable, so they are + always updated, or by adding a custom target to control when + they get updated/generated. + + +:: + + macro QT4_ADD_TRANSLATION( qm_files ts_files ... ) + out: qm_files + in: ts_files + generates commands to create .qm from .ts - files. The generated + filenames can be found in qm_files. The ts_files + must exist and are not updated in any way. + + +:: + + macro QT4_AUTOMOC(sourcefile1 sourcefile2 ... [TARGET tgt]) + The qt4_automoc macro is obsolete. Use the CMAKE_AUTOMOC feature instead. + This macro is still experimental. + It can be used to have moc automatically handled. + So if you have the files foo.h and foo.cpp, and in foo.h a + a class uses the Q_OBJECT macro, moc has to run on it. If you don't + want to use QT4_WRAP_CPP() (which is reliable and mature), you can insert + #include "foo.moc" + in foo.cpp and then give foo.cpp as argument to QT4_AUTOMOC(). This will + scan all listed files at cmake-time for such included moc files and if it + finds them cause a rule to be generated to run moc at build time on the + accompanying header file foo.h. + If a source file has the SKIP_AUTOMOC property set it will be ignored by + this macro. + If the is specified, the INTERFACE_INCLUDE_DIRECTORIES and + INTERFACE_COMPILE_DEFINITIONS from the are passed to moc. + + +:: + + function QT4_USE_MODULES( target [link_type] modules...) + This function is obsolete. Use target_link_libraries with IMPORTED targets + instead. + Make use the from Qt. Using a Qt module means + to link to the library, add the relevant include directories for the + module, and add the relevant compiler defines for using the module. + Modules are roughly equivalent to components of Qt4, so usage would be + something like: + qt4_use_modules(myexe Core Gui Declarative) + to use QtCore, QtGui and QtDeclarative. The optional argument + can be specified as either LINK_PUBLIC or LINK_PRIVATE to specify the + same argument to the target_link_libraries call. + + +IMPORTED Targets +^^^^^^^^^^^^^^^^ + +A particular Qt library may be used by using the corresponding +:prop_tgt:`IMPORTED` target with the :command:`target_link_libraries` +command: + +.. code-block:: cmake + + target_link_libraries(myexe Qt4::QtGui Qt4::QtXml) + +Using a target in this way causes :cmake(1)` to use the appropriate include +directories and compile definitions for the target when compiling ``myexe``. + +Targets are aware of their dependencies, so for example it is not necessary +to list ``Qt4::QtCore`` if another Qt library is listed, and it is not +necessary to list ``Qt4::QtGui`` if ``Qt4::QtDeclarative`` is listed. +Targets may be tested for existence in the usual way with the +:command:`if(TARGET)` command. + +The Qt toolkit may contain both debug and release libraries. +:manual:`cmake(1)` will choose the appropriate version based on the build +configuration. + +``Qt4::QtCore`` + The QtCore target +``Qt4::QtGui`` + The QtGui target +``Qt4::Qt3Support`` + The Qt3Support target +``Qt4::QtAssistant`` + The QtAssistant target +``Qt4::QtAssistantClient`` + The QtAssistantClient target +``Qt4::QAxContainer`` + The QAxContainer target (Windows only) +``Qt4::QAxServer`` + The QAxServer target (Windows only) +``Qt4::QtDBus`` + The QtDBus target +``Qt4::QtDeclarative`` + The QtDeclarative target +``Qt4::QtDesigner`` + The QtDesigner target +``Qt4::QtDesignerComponents`` + The QtDesignerComponents target +``Qt4::QtHelp`` + The QtHelp target +``Qt4::QtMotif`` + The QtMotif target +``Qt4::QtMultimedia`` + The QtMultimedia target +``Qt4::QtNetwork`` + The QtNetwork target +``Qt4::QtNsPLugin`` + The QtNsPLugin target +``Qt4::QtOpenGL`` + The QtOpenGL target +``Qt4::QtScript`` + The QtScript target +``Qt4::QtScriptTools`` + The QtScriptTools target +``Qt4::QtSql`` + The QtSql target +``Qt4::QtSvg`` + The QtSvg target +``Qt4::QtTest`` + The QtTest target +``Qt4::QtUiTools`` + The QtUiTools target +``Qt4::QtWebKit`` + The QtWebKit target +``Qt4::QtXml`` + The QtXml target +``Qt4::QtXmlPatterns`` + The QtXmlPatterns target +``Qt4::phonon`` + The phonon target + +Result Variables +^^^^^^^^^^^^^^^^ + + Below is a detailed list of variables that FindQt4.cmake sets. + +``Qt4_FOUND`` + If false, don't try to use Qt 4. +``QT_FOUND`` + If false, don't try to use Qt. This variable is for compatibility only. +``QT4_FOUND`` + If false, don't try to use Qt 4. This variable is for compatibility only. +``QT_VERSION_MAJOR`` + The major version of Qt found. +``QT_VERSION_MINOR`` + The minor version of Qt found. +``QT_VERSION_PATCH`` + The patch version of Qt found. +#]=======================================================================] + +# Use find_package( Qt4 COMPONENTS ... ) to enable modules +if( Qt4_FIND_COMPONENTS ) + foreach( component ${Qt4_FIND_COMPONENTS} ) + string( TOUPPER ${component} _COMPONENT ) + set( QT_USE_${_COMPONENT} 1 ) + endforeach() + + # To make sure we don't use QtCore or QtGui when not in COMPONENTS + if(NOT QT_USE_QTCORE) + set( QT_DONT_USE_QTCORE 1 ) + endif() + + if(NOT QT_USE_QTGUI) + set( QT_DONT_USE_QTGUI 1 ) + endif() + +endif() + +# If Qt3 has already been found, fail. +if(QT_QT_LIBRARY) + if(Qt4_FIND_REQUIRED) + message( FATAL_ERROR "Qt3 and Qt4 cannot be used together in one project. If switching to Qt4, the CMakeCache.txt needs to be cleaned.") + else() + if(NOT Qt4_FIND_QUIETLY) + message( STATUS "Qt3 and Qt4 cannot be used together in one project. If switching to Qt4, the CMakeCache.txt needs to be cleaned.") + endif() + return() + endif() +endif() + + +include(${CMAKE_CURRENT_LIST_DIR}/CheckCXXSymbolExists.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/MacroAddFileDependencies.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/CMakePushCheckState.cmake) + +set(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake) + +set( QT_DEFINITIONS "") + +# convenience macro for dealing with debug/release library names +macro (_QT4_ADJUST_LIB_VARS _camelCaseBasename) + + string(TOUPPER "${_camelCaseBasename}" basename) + + # The name of the imported targets, i.e. the prefix "Qt4::" must not change, + # since it is stored in EXPORT-files as name of a required library. If the name would change + # here, this would lead to the imported Qt4-library targets not being resolved by cmake anymore. + if (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG) + + if(NOT TARGET Qt4::${_camelCaseBasename}) + add_library(Qt4::${_camelCaseBasename} UNKNOWN IMPORTED ) + + if (QT_${basename}_LIBRARY_RELEASE) + set_property(TARGET Qt4::${_camelCaseBasename} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + set(_location "${QT_${basename}_LIBRARY_RELEASE}") + if(QT_USE_FRAMEWORKS AND EXISTS ${_location}/${_camelCaseBasename}) + set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_RELEASE "${_location}/${_camelCaseBasename}" ) + else() + set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_RELEASE "${_location}" ) + endif() + endif () + + if (QT_${basename}_LIBRARY_DEBUG) + set_property(TARGET Qt4::${_camelCaseBasename} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) + set(_location "${QT_${basename}_LIBRARY_DEBUG}") + if(QT_USE_FRAMEWORKS AND EXISTS ${_location}/${_camelCaseBasename}) + set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_DEBUG "${_location}/${_camelCaseBasename}" ) + else() + set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_DEBUG "${_location}" ) + endif() + endif () + set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY + INTERFACE_INCLUDE_DIRECTORIES + "${QT_${basename}_INCLUDE_DIR}" + ) + string(REGEX REPLACE "^QT" "" _stemname ${basename}) + set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY + INTERFACE_COMPILE_DEFINITIONS + "QT_${_stemname}_LIB" + ) + endif() + + # If QT_USE_IMPORTED_TARGETS is enabled, the QT_QTFOO_LIBRARY variables are set to point at these + # imported targets. This works better in general, and is also in almost all cases fully + # backward compatible. The only issue is when a project A which had this enabled then exports its + # libraries via export or export_library_dependencies(). In this case the libraries from project + # A will depend on the imported Qt targets, and the names of these imported targets will be stored + # in the dependency files on disk. This means when a project B then uses project A, these imported + # targets must be created again, otherwise e.g. "Qt4__QtCore" will be interpreted as name of a + # library file on disk, and not as a target, and linking will fail: + if(QT_USE_IMPORTED_TARGETS) + set(QT_${basename}_LIBRARY Qt4::${_camelCaseBasename} ) + set(QT_${basename}_LIBRARIES Qt4::${_camelCaseBasename} ) + else() + + # if the release- as well as the debug-version of the library have been found: + if (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE) + # if the generator is multi-config or if CMAKE_BUILD_TYPE is set for + # single-config generators, set optimized and debug libraries + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig OR CMAKE_BUILD_TYPE) + set(QT_${basename}_LIBRARY optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG}) + else() + # For single-config generators where CMAKE_BUILD_TYPE has no value, + # just use the release libraries + set(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_RELEASE} ) + endif() + set(QT_${basename}_LIBRARIES optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG}) + endif () + + # if only the release version was found, set the debug variable also to the release version + if (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG) + set(QT_${basename}_LIBRARY_DEBUG ${QT_${basename}_LIBRARY_RELEASE}) + set(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_RELEASE}) + set(QT_${basename}_LIBRARIES ${QT_${basename}_LIBRARY_RELEASE}) + endif () + + # if only the debug version was found, set the release variable also to the debug version + if (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE) + set(QT_${basename}_LIBRARY_RELEASE ${QT_${basename}_LIBRARY_DEBUG}) + set(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_DEBUG}) + set(QT_${basename}_LIBRARIES ${QT_${basename}_LIBRARY_DEBUG}) + endif () + + # put the value in the cache: + set(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY} CACHE STRING "The Qt ${basename} library" FORCE) + + endif() + + set(QT_${basename}_FOUND 1) + + else () + + set(QT_${basename}_LIBRARY "" CACHE STRING "The Qt ${basename} library" FORCE) + + endif () + + if (QT_${basename}_INCLUDE_DIR) + #add the include directory to QT_INCLUDES + set(QT_INCLUDES "${QT_${basename}_INCLUDE_DIR}" ${QT_INCLUDES}) + endif () + + # Make variables changeable to the advanced user + mark_as_advanced(QT_${basename}_LIBRARY QT_${basename}_LIBRARY_RELEASE QT_${basename}_LIBRARY_DEBUG QT_${basename}_INCLUDE_DIR) +endmacro () + +function(_QT4_QUERY_QMAKE VAR RESULT) + execute_process(COMMAND "${QT_QMAKE_EXECUTABLE}" -query ${VAR} + RESULT_VARIABLE return_code + OUTPUT_VARIABLE output + OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE) + if(NOT return_code) + file(TO_CMAKE_PATH "${output}" output) + set(${RESULT} ${output} PARENT_SCOPE) + endif() +endfunction() + +function(_QT4_GET_VERSION_COMPONENTS VERSION RESULT_MAJOR RESULT_MINOR RESULT_PATCH) + string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}") + string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}") + string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}") + + set(${RESULT_MAJOR} ${QT_VERSION_MAJOR} PARENT_SCOPE) + set(${RESULT_MINOR} ${QT_VERSION_MINOR} PARENT_SCOPE) + set(${RESULT_PATCH} ${QT_VERSION_PATCH} PARENT_SCOPE) +endfunction() + +function(_QT4_FIND_QMAKE QMAKE_NAMES QMAKE_RESULT VERSION_RESULT) + list(LENGTH QMAKE_NAMES QMAKE_NAMES_LEN) + if(${QMAKE_NAMES_LEN} EQUAL 0) + return() + endif() + list(GET QMAKE_NAMES 0 QMAKE_NAME) + + get_filename_component(qt_install_version "[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME) + + find_program(QT_QMAKE_EXECUTABLE NAMES ${QMAKE_NAME} + PATHS + ENV QTDIR + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]" + PATH_SUFFIXES bin + DOC "The qmake executable for the Qt installation to use" + ) + + set(major 0) + if (QT_QMAKE_EXECUTABLE) + _qt4_query_qmake(QT_VERSION QTVERSION) + _qt4_get_version_components("${QTVERSION}" major minor patch) + endif() + + if (NOT QT_QMAKE_EXECUTABLE OR NOT "${major}" EQUAL 4) + set(curr_qmake "${QT_QMAKE_EXECUTABLE}") + set(curr_qt_version "${QTVERSION}") + + set(QT_QMAKE_EXECUTABLE NOTFOUND CACHE FILEPATH "" FORCE) + list(REMOVE_AT QMAKE_NAMES 0) + _qt4_find_qmake("${QMAKE_NAMES}" QMAKE QTVERSION) + + _qt4_get_version_components("${QTVERSION}" major minor patch) + if (NOT ${major} EQUAL 4) + # Restore possibly found qmake and it's version; these are used later + # in error message if incorrect version is found + set(QT_QMAKE_EXECUTABLE "${curr_qmake}" CACHE FILEPATH "" FORCE) + set(QTVERSION "${curr_qt_version}") + endif() + + endif() + + + set(${QMAKE_RESULT} "${QT_QMAKE_EXECUTABLE}" PARENT_SCOPE) + set(${VERSION_RESULT} "${QTVERSION}" PARENT_SCOPE) +endfunction() + + +set(QT4_INSTALLED_VERSION_TOO_OLD FALSE) + +set(_QT4_QMAKE_NAMES qmake qmake4 qmake-qt4 qmake-mac) +_qt4_find_qmake("${_QT4_QMAKE_NAMES}" QT_QMAKE_EXECUTABLE QTVERSION) + +if (QT_QMAKE_EXECUTABLE AND + QTVERSION VERSION_GREATER 3 AND QTVERSION VERSION_LESS 5) + + if (Qt5Core_FOUND) + # Qt5CoreConfig sets QT_MOC_EXECUTABLE as a non-cache variable to the Qt 5 + # path to moc. Unset that variable when Qt 4 and 5 are used together, so + # that when find_program looks for moc, it is not set to the Qt 5 version. + # If FindQt4 has already put the Qt 4 path in the cache, the unset() + # command 'unhides' the (correct) cache variable. + unset(QT_MOC_EXECUTABLE) + endif() + if (QT_QMAKE_EXECUTABLE_LAST) + string(COMPARE NOTEQUAL "${QT_QMAKE_EXECUTABLE_LAST}" "${QT_QMAKE_EXECUTABLE}" QT_QMAKE_CHANGED) + endif() + set(QT_QMAKE_EXECUTABLE_LAST "${QT_QMAKE_EXECUTABLE}" CACHE INTERNAL "" FORCE) + + _qt4_get_version_components("${QTVERSION}" QT_VERSION_MAJOR QT_VERSION_MINOR QT_VERSION_PATCH) + + # ask qmake for the mkspecs directory + # we do this first because QT_LIBINFIX might be set + if (NOT QT_MKSPECS_DIR OR QT_QMAKE_CHANGED) + _qt4_query_qmake(QMAKE_MKSPECS qt_mkspecs_dirs) + # do not replace : on windows as it might be a drive letter + # and windows should already use ; as a separator + if(NOT WIN32) + string(REPLACE ":" ";" qt_mkspecs_dirs "${qt_mkspecs_dirs}") + endif() + + find_path(QT_MKSPECS_DIR NAMES qconfig.pri + HINTS ${qt_mkspecs_dirs} + PATH_SUFFIXES mkspecs share/qt4/mkspecs + DOC "The location of the Qt mkspecs containing qconfig.pri") + endif() + + if(EXISTS "${QT_MKSPECS_DIR}/qconfig.pri") + file(READ ${QT_MKSPECS_DIR}/qconfig.pri _qconfig_FILE_contents) + string(REGEX MATCH "QT_CONFIG[^\n]+" QT_QCONFIG "${_qconfig_FILE_contents}") + string(REGEX MATCH "CONFIG[^\n]+" QT_CONFIG "${_qconfig_FILE_contents}") + string(REGEX MATCH "EDITION[^\n]+" QT_EDITION "${_qconfig_FILE_contents}") + string(REGEX MATCH "QT_LIBINFIX[^\n]+" _qconfig_qt_libinfix "${_qconfig_FILE_contents}") + string(REGEX REPLACE "QT_LIBINFIX *= *([^\n]*)" "\\1" QT_LIBINFIX "${_qconfig_qt_libinfix}") + endif() + if("${QT_EDITION}" MATCHES "DesktopLight") + set(QT_EDITION_DESKTOPLIGHT 1) + endif() + + # ask qmake for the library dir as a hint, then search for QtCore library and use that as a reference for finding the + # others and for setting QT_LIBRARY_DIR + if (NOT (QT_QTCORE_LIBRARY_RELEASE OR QT_QTCORE_LIBRARY_DEBUG) OR QT_QMAKE_CHANGED) + _qt4_query_qmake(QT_INSTALL_LIBS QT_LIBRARY_DIR_TMP) + set(QT_QTCORE_LIBRARY_RELEASE NOTFOUND) + set(QT_QTCORE_LIBRARY_DEBUG NOTFOUND) + find_library(QT_QTCORE_LIBRARY_RELEASE + NAMES QtCore${QT_LIBINFIX} QtCore${QT_LIBINFIX}4 + HINTS ${QT_LIBRARY_DIR_TMP} + NO_DEFAULT_PATH + ) + find_library(QT_QTCORE_LIBRARY_DEBUG + NAMES QtCore${QT_LIBINFIX}_debug QtCore${QT_LIBINFIX}d QtCore${QT_LIBINFIX}d4 + HINTS ${QT_LIBRARY_DIR_TMP} + NO_DEFAULT_PATH + ) + + if(NOT QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCORE_LIBRARY_DEBUG) + find_library(QT_QTCORE_LIBRARY_RELEASE + NAMES QtCore${QT_LIBINFIX} QtCore${QT_LIBINFIX}4 + HINTS ${QT_LIBRARY_DIR_TMP} + ) + find_library(QT_QTCORE_LIBRARY_DEBUG + NAMES QtCore${QT_LIBINFIX}_debug QtCore${QT_LIBINFIX}d QtCore${QT_LIBINFIX}d4 + HINTS ${QT_LIBRARY_DIR_TMP} + ) + endif() + + # try dropping a hint if trying to use Visual Studio with Qt built by MinGW + if(NOT QT_QTCORE_LIBRARY_RELEASE AND MSVC) + if(EXISTS ${QT_LIBRARY_DIR_TMP}/libqtmain.a) + message( FATAL_ERROR "It appears you're trying to use Visual Studio with Qt built by MinGW. Those compilers do not produce code compatible with each other.") + endif() + endif() + + endif () + + # set QT_LIBRARY_DIR based on location of QtCore found. + if(QT_QTCORE_LIBRARY_RELEASE) + get_filename_component(QT_LIBRARY_DIR_TMP "${QT_QTCORE_LIBRARY_RELEASE}" PATH) + set(QT_LIBRARY_DIR ${QT_LIBRARY_DIR_TMP} CACHE INTERNAL "Qt library dir" FORCE) + set(QT_QTCORE_FOUND 1) + elseif(QT_QTCORE_LIBRARY_DEBUG) + get_filename_component(QT_LIBRARY_DIR_TMP "${QT_QTCORE_LIBRARY_DEBUG}" PATH) + set(QT_LIBRARY_DIR ${QT_LIBRARY_DIR_TMP} CACHE INTERNAL "Qt library dir" FORCE) + set(QT_QTCORE_FOUND 1) + else() + if(NOT Qt4_FIND_QUIETLY) + message(WARNING + "${QT_QMAKE_EXECUTABLE} reported QT_INSTALL_LIBS as " + "\"${QT_LIBRARY_DIR_TMP}\" " + "but QtCore could not be found there. " + "Qt is NOT installed correctly for the target build environment.") + endif() + set(Qt4_FOUND FALSE) + if(Qt4_FIND_REQUIRED) + message( FATAL_ERROR "Could NOT find QtCore.") + else() + return() + endif() + endif() + + # ask qmake for the binary dir + if (NOT QT_BINARY_DIR OR QT_QMAKE_CHANGED) + _qt4_query_qmake(QT_INSTALL_BINS qt_bins) + set(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "" FORCE) + endif () + + if (APPLE) + set(CMAKE_FIND_FRAMEWORK_OLD ${CMAKE_FIND_FRAMEWORK}) + if (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework) + set(QT_USE_FRAMEWORKS ON CACHE INTERNAL "" FORCE) + set(CMAKE_FIND_FRAMEWORK FIRST) + else () + set(QT_USE_FRAMEWORKS OFF CACHE INTERNAL "" FORCE) + set(CMAKE_FIND_FRAMEWORK LAST) + endif () + endif () + + # ask qmake for the include dir + if (QT_LIBRARY_DIR AND (NOT QT_QTCORE_INCLUDE_DIR OR NOT QT_HEADERS_DIR OR QT_QMAKE_CHANGED)) + _qt4_query_qmake(QT_INSTALL_HEADERS qt_headers) + set(QT_QTCORE_INCLUDE_DIR NOTFOUND) + find_path(QT_QTCORE_INCLUDE_DIR QtCore + HINTS ${qt_headers} ${QT_LIBRARY_DIR} + PATH_SUFFIXES QtCore qt4/QtCore + NO_DEFAULT_PATH + ) + if(NOT QT_QTCORE_INCLUDE_DIR) + find_path(QT_QTCORE_INCLUDE_DIR QtCore + HINTS ${qt_headers} ${QT_LIBRARY_DIR} + PATH_SUFFIXES QtCore qt4/QtCore + ) + endif() + + # Set QT_HEADERS_DIR based on finding QtCore header + if(QT_QTCORE_INCLUDE_DIR) + if(QT_USE_FRAMEWORKS) + set(QT_HEADERS_DIR "${qt_headers}" CACHE INTERNAL "" FORCE) + else() + get_filename_component(qt_headers "${QT_QTCORE_INCLUDE_DIR}/../" ABSOLUTE) + set(QT_HEADERS_DIR "${qt_headers}" CACHE INTERNAL "" FORCE) + endif() + else() + message("Warning: QT_QMAKE_EXECUTABLE reported QT_INSTALL_HEADERS as ${qt_headers}") + message("Warning: But QtCore couldn't be found. Qt must NOT be installed correctly.") + endif() + endif() + + if(APPLE) + set(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_OLD}) + endif() + + # Set QT_INCLUDE_DIR based on QT_HEADERS_DIR + if(QT_HEADERS_DIR) + if(QT_USE_FRAMEWORKS) + # Qt/Mac frameworks has two include dirs. + # One is the framework include for which CMake will add a -F flag + # and the other is an include dir for non-framework Qt modules + set(QT_INCLUDE_DIR ${QT_HEADERS_DIR} ${QT_QTCORE_LIBRARY_RELEASE} ) + else() + set(QT_INCLUDE_DIR ${QT_HEADERS_DIR}) + endif() + endif() + + # Set QT_INCLUDES + set( QT_INCLUDES ${QT_MKSPECS_DIR}/default ${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR}) + + + # ask qmake for the documentation directory + if (QT_LIBRARY_DIR AND NOT QT_DOC_DIR OR QT_QMAKE_CHANGED) + _qt4_query_qmake(QT_INSTALL_DOCS qt_doc_dir) + set(QT_DOC_DIR ${qt_doc_dir} CACHE PATH "The location of the Qt docs" FORCE) + endif () + + + # ask qmake for the plugins directory + if (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR OR QT_QMAKE_CHANGED) + _qt4_query_qmake(QT_INSTALL_PLUGINS qt_plugins_dir) + if(CMAKE_CROSSCOMPILING OR NOT qt_plugins_dir) + find_path(QT_PLUGINS_DIR + NAMES accessible bearer codecs designer graphicssystems iconengines imageformats inputmethods qmltooling script sqldrivers + HINTS ${qt_plugins_dir} + PATH_SUFFIXES plugins lib/qt4/plugins + DOC "The location of the Qt plugins") + else() + set(QT_PLUGINS_DIR ${qt_plugins_dir} CACHE PATH "The location of the Qt plugins") + endif() + endif () + + # ask qmake for the translations directory + if (QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR OR QT_QMAKE_CHANGED) + _qt4_query_qmake(QT_INSTALL_TRANSLATIONS qt_translations_dir) + set(QT_TRANSLATIONS_DIR ${qt_translations_dir} CACHE PATH "The location of the Qt translations" FORCE) + endif () + + # ask qmake for the imports directory + if (QT_LIBRARY_DIR AND NOT QT_IMPORTS_DIR OR QT_QMAKE_CHANGED) + _qt4_query_qmake(QT_INSTALL_IMPORTS qt_imports_dir) + if(CMAKE_CROSSCOMPILING OR NOT qt_imports_dir) + find_path(QT_IMPORTS_DIR NAMES Qt + HINTS ${qt_imports_dir} + PATH_SUFFIXES imports lib/qt4/imports + DOC "The location of the Qt imports") + else() + set(QT_IMPORTS_DIR ${qt_imports_dir} CACHE PATH "The location of the Qt imports") + endif() + endif () + + # Make variables changeable to the advanced user + mark_as_advanced( QT_LIBRARY_DIR QT_DOC_DIR QT_MKSPECS_DIR + QT_PLUGINS_DIR QT_TRANSLATIONS_DIR) + + + + + ############################################# + # + # Find out what window system we're using + # + ############################################# + cmake_push_check_state() + # Add QT_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES + list(APPEND CMAKE_REQUIRED_INCLUDES "${QT_INCLUDE_DIR}") + set(CMAKE_REQUIRED_QUIET ${Qt4_FIND_QUIETLY}) + # Check for Window system symbols (note: only one should end up being set) + CHECK_CXX_SYMBOL_EXISTS(Q_WS_X11 "QtCore/qglobal.h" Q_WS_X11) + CHECK_CXX_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN) + CHECK_CXX_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS) + CHECK_CXX_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC) + if(Q_WS_MAC) + if(QT_QMAKE_CHANGED) + unset(QT_MAC_USE_COCOA CACHE) + endif() + CHECK_CXX_SYMBOL_EXISTS(QT_MAC_USE_COCOA "QtCore/qconfig.h" QT_MAC_USE_COCOA) + endif() + + if (QT_QTCOPY_REQUIRED) + CHECK_CXX_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY) + if (NOT QT_IS_QTCOPY) + message(FATAL_ERROR "qt-copy is required, but hasn't been found") + endif () + endif () + + cmake_pop_check_state() + # + ############################################# + + + + ######################################## + # + # Setting the INCLUDE-Variables + # + ######################################## + + set(QT_MODULES QtGui Qt3Support QtSvg QtScript QtTest QtUiTools + QtHelp QtWebKit QtXmlPatterns phonon QtNetwork QtMultimedia + QtNsPlugin QtOpenGL QtSql QtXml QtDesigner QtDBus QtScriptTools + QtDeclarative) + + if(Q_WS_X11) + set(QT_MODULES ${QT_MODULES} QtMotif) + endif() + + if(QT_QMAKE_CHANGED) + foreach(QT_MODULE ${QT_MODULES}) + string(TOUPPER ${QT_MODULE} _upper_qt_module) + set(QT_${_upper_qt_module}_INCLUDE_DIR NOTFOUND) + set(QT_${_upper_qt_module}_LIBRARY_RELEASE NOTFOUND) + set(QT_${_upper_qt_module}_LIBRARY_DEBUG NOTFOUND) + endforeach() + set(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR NOTFOUND) + set(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NOTFOUND) + set(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NOTFOUND) + set(QT_QTASSISTANTCLIENT_INCLUDE_DIR NOTFOUND) + set(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NOTFOUND) + set(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NOTFOUND) + set(QT_QTASSISTANT_INCLUDE_DIR NOTFOUND) + set(QT_QTASSISTANT_LIBRARY_RELEASE NOTFOUND) + set(QT_QTASSISTANT_LIBRARY_DEBUG NOTFOUND) + set(QT_QTCLUCENE_LIBRARY_RELEASE NOTFOUND) + set(QT_QTCLUCENE_LIBRARY_DEBUG NOTFOUND) + set(QT_QAXCONTAINER_INCLUDE_DIR NOTFOUND) + set(QT_QAXCONTAINER_LIBRARY_RELEASE NOTFOUND) + set(QT_QAXCONTAINER_LIBRARY_DEBUG NOTFOUND) + set(QT_QAXSERVER_INCLUDE_DIR NOTFOUND) + set(QT_QAXSERVER_LIBRARY_RELEASE NOTFOUND) + set(QT_QAXSERVER_LIBRARY_DEBUG NOTFOUND) + if(Q_WS_WIN) + set(QT_QTMAIN_LIBRARY_DEBUG NOTFOUND) + set(QT_QTMAIN_LIBRARY_RELEASE NOTFOUND) + endif() + endif() + + foreach(QT_MODULE ${QT_MODULES}) + string(TOUPPER ${QT_MODULE} _upper_qt_module) + find_path(QT_${_upper_qt_module}_INCLUDE_DIR ${QT_MODULE} + PATHS + ${QT_HEADERS_DIR}/${QT_MODULE} + ${QT_LIBRARY_DIR}/${QT_MODULE}.framework/Headers + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + # phonon doesn't seem consistent, let's try phonondefs.h for some + # installations + if(${QT_MODULE} STREQUAL "phonon") + find_path(QT_${_upper_qt_module}_INCLUDE_DIR phonondefs.h + PATHS + ${QT_HEADERS_DIR}/${QT_MODULE} + ${QT_LIBRARY_DIR}/${QT_MODULE}.framework/Headers + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + endif() + endforeach() + + if(Q_WS_WIN) + set(QT_MODULES ${QT_MODULES} QAxContainer QAxServer) + # Set QT_AXCONTAINER_INCLUDE_DIR and QT_AXSERVER_INCLUDE_DIR + find_path(QT_QAXCONTAINER_INCLUDE_DIR ActiveQt + PATHS ${QT_HEADERS_DIR}/ActiveQt + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + find_path(QT_QAXSERVER_INCLUDE_DIR ActiveQt + PATHS ${QT_HEADERS_DIR}/ActiveQt + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + endif() + + # Set QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR + find_path(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR QDesignerComponents + PATHS + ${QT_HEADERS_DIR}/QtDesigner + ${QT_LIBRARY_DIR}/QtDesigner.framework/Headers + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + + # Set QT_QTASSISTANT_INCLUDE_DIR + find_path(QT_QTASSISTANT_INCLUDE_DIR QtAssistant + PATHS + ${QT_HEADERS_DIR}/QtAssistant + ${QT_LIBRARY_DIR}/QtAssistant.framework/Headers + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + + # Set QT_QTASSISTANTCLIENT_INCLUDE_DIR + find_path(QT_QTASSISTANTCLIENT_INCLUDE_DIR QAssistantClient + PATHS + ${QT_HEADERS_DIR}/QtAssistant + ${QT_LIBRARY_DIR}/QtAssistant.framework/Headers + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + + ######################################## + # + # Setting the LIBRARY-Variables + # + ######################################## + + # find the libraries + foreach(QT_MODULE ${QT_MODULES}) + string(TOUPPER ${QT_MODULE} _upper_qt_module) + find_library(QT_${_upper_qt_module}_LIBRARY_RELEASE + NAMES ${QT_MODULE}${QT_LIBINFIX} ${QT_MODULE}${QT_LIBINFIX}4 + PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + find_library(QT_${_upper_qt_module}_LIBRARY_DEBUG + NAMES ${QT_MODULE}${QT_LIBINFIX}_debug ${QT_MODULE}${QT_LIBINFIX}d ${QT_MODULE}${QT_LIBINFIX}d4 + PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + if(QT_${_upper_qt_module}_LIBRARY_RELEASE MATCHES "/${QT_MODULE}\\.framework$") + if(NOT EXISTS "${QT_${_upper_qt_module}_LIBRARY_RELEASE}/${QT_MODULE}") + # Release framework library file does not exist... Force to NOTFOUND: + set(QT_${_upper_qt_module}_LIBRARY_RELEASE "QT_${_upper_qt_module}_LIBRARY_RELEASE-NOTFOUND" CACHE FILEPATH "Path to a library." FORCE) + endif() + endif() + if(QT_${_upper_qt_module}_LIBRARY_DEBUG MATCHES "/${QT_MODULE}\\.framework$") + if(NOT EXISTS "${QT_${_upper_qt_module}_LIBRARY_DEBUG}/${QT_MODULE}") + # Debug framework library file does not exist... Force to NOTFOUND: + set(QT_${_upper_qt_module}_LIBRARY_DEBUG "QT_${_upper_qt_module}_LIBRARY_DEBUG-NOTFOUND" CACHE FILEPATH "Path to a library." FORCE) + endif() + endif() + endforeach() + + # QtUiTools is sometimes not in the same directory as the other found libraries + # e.g. on Mac, its never a framework like the others are + if(QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE) + find_library(QT_QTUITOOLS_LIBRARY_RELEASE NAMES QtUiTools${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR}) + endif() + + # Set QT_QTDESIGNERCOMPONENTS_LIBRARY + find_library(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents${QT_LIBINFIX} QtDesignerComponents${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + find_library(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NAMES QtDesignerComponents${QT_LIBINFIX}_debug QtDesignerComponents${QT_LIBINFIX}d QtDesignerComponents${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + + # Set QT_QTMAIN_LIBRARY + if(Q_WS_WIN) + find_library(QT_QTMAIN_LIBRARY_RELEASE NAMES qtmain${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + find_library(QT_QTMAIN_LIBRARY_DEBUG NAMES qtmain${QT_LIBINFIX}d PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + endif() + + # Set QT_QTASSISTANTCLIENT_LIBRARY + find_library(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + find_library(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + + # Set QT_QTASSISTANT_LIBRARY + find_library(QT_QTASSISTANT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 QtAssistant${QT_LIBINFIX} QtAssistant${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + find_library(QT_QTASSISTANT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 QtAssistant${QT_LIBINFIX}_debug QtAssistant${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + + # Set QT_QTHELP_LIBRARY + find_library(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} QtCLucene${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + find_library(QT_QTCLUCENE_LIBRARY_DEBUG NAMES QtCLucene${QT_LIBINFIX}_debug QtCLucene${QT_LIBINFIX}d QtCLucene${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + if(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE) + find_library(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR}) + endif() + + + ############################################ + # + # Check the existence of the libraries. + # + ############################################ + + + macro(_qt4_add_target_depends_internal _QT_MODULE _PROPERTY) + if (TARGET Qt4::${_QT_MODULE}) + foreach(_DEPEND ${ARGN}) + set(_VALID_DEPENDS) + if (TARGET Qt4::Qt${_DEPEND}) + list(APPEND _VALID_DEPENDS Qt4::Qt${_DEPEND}) + endif() + if (_VALID_DEPENDS) + set_property(TARGET Qt4::${_QT_MODULE} APPEND PROPERTY + ${_PROPERTY} + "${_VALID_DEPENDS}" + ) + endif() + set(_VALID_DEPENDS) + endforeach() + endif() + endmacro() + + macro(_qt4_add_target_depends _QT_MODULE) + if (TARGET Qt4::${_QT_MODULE}) + get_target_property(_configs Qt4::${_QT_MODULE} IMPORTED_CONFIGURATIONS) + _qt4_add_target_depends_internal(${_QT_MODULE} INTERFACE_LINK_LIBRARIES ${ARGN}) + foreach(_config ${_configs}) + _qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} ${ARGN}) + endforeach() + set(_configs) + endif() + endmacro() + + macro(_qt4_add_target_private_depends _QT_MODULE) + if (TARGET Qt4::${_QT_MODULE}) + get_target_property(_configs Qt4::${_QT_MODULE} IMPORTED_CONFIGURATIONS) + foreach(_config ${_configs}) + _qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_DEPENDENT_LIBRARIES_${_config} ${ARGN}) + endforeach() + set(_configs) + endif() + endmacro() + + + # Set QT_xyz_LIBRARY variable and add + # library include path to QT_INCLUDES + _QT4_ADJUST_LIB_VARS(QtCore) + set_property(TARGET Qt4::QtCore APPEND PROPERTY + INTERFACE_INCLUDE_DIRECTORIES + "${QT_MKSPECS_DIR}/default" + ${QT_INCLUDE_DIR} + ) + set_property(TARGET Qt4::QtCore APPEND PROPERTY + INTERFACE_COMPILE_DEFINITIONS + $<$>:QT_NO_DEBUG> + ) + set_property(TARGET Qt4::QtCore PROPERTY + INTERFACE_QT_MAJOR_VERSION 4 + ) + set_property(TARGET Qt4::QtCore APPEND PROPERTY + COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION + ) + + foreach(QT_MODULE ${QT_MODULES}) + _QT4_ADJUST_LIB_VARS(${QT_MODULE}) + _qt4_add_target_depends(${QT_MODULE} Core) + endforeach() + + _QT4_ADJUST_LIB_VARS(QtAssistant) + _QT4_ADJUST_LIB_VARS(QtAssistantClient) + _QT4_ADJUST_LIB_VARS(QtCLucene) + _QT4_ADJUST_LIB_VARS(QtDesignerComponents) + + # platform dependent libraries + if(Q_WS_WIN) + _QT4_ADJUST_LIB_VARS(qtmain) + + _QT4_ADJUST_LIB_VARS(QAxServer) + if(QT_QAXSERVER_FOUND) + set_property(TARGET Qt4::QAxServer PROPERTY + INTERFACE_QT4_NO_LINK_QTMAIN ON + ) + set_property(TARGET Qt4::QAxServer APPEND PROPERTY + COMPATIBLE_INTERFACE_BOOL QT4_NO_LINK_QTMAIN) + endif() + + _QT4_ADJUST_LIB_VARS(QAxContainer) + endif() + + # Only public dependencies are listed here. + # Eg, QtDBus links to QtXml, but users of QtDBus do not need to + # link to QtXml because QtDBus only uses it internally, not in public + # headers. + # Everything depends on QtCore, but that is covered above already + _qt4_add_target_depends(Qt3Support Sql Gui Network) + if (TARGET Qt4::Qt3Support) + # An additional define is required for QT3_SUPPORT + set_property(TARGET Qt4::Qt3Support APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS QT3_SUPPORT) + endif() + _qt4_add_target_depends(QtDeclarative Script Gui) + _qt4_add_target_depends(QtDesigner Gui) + _qt4_add_target_depends(QtHelp Gui) + _qt4_add_target_depends(QtMultimedia Gui) + _qt4_add_target_depends(QtOpenGL Gui) + _qt4_add_target_depends(QtSvg Gui) + _qt4_add_target_depends(QtWebKit Gui Network) + + _qt4_add_target_private_depends(Qt3Support Xml) + if(QT_VERSION VERSION_GREATER 4.6) + _qt4_add_target_private_depends(QtSvg Xml) + endif() + _qt4_add_target_private_depends(QtDBus Xml) + _qt4_add_target_private_depends(QtUiTools Xml Gui) + _qt4_add_target_private_depends(QtHelp Sql Xml Network) + _qt4_add_target_private_depends(QtXmlPatterns Network) + _qt4_add_target_private_depends(QtScriptTools Gui) + _qt4_add_target_private_depends(QtWebKit XmlPatterns) + _qt4_add_target_private_depends(QtDeclarative XmlPatterns Svg Sql Gui) + _qt4_add_target_private_depends(QtMultimedia Gui) + _qt4_add_target_private_depends(QtOpenGL Gui) + if(QT_QAXSERVER_FOUND) + _qt4_add_target_private_depends(QAxServer Gui) + endif() + if(QT_QAXCONTAINER_FOUND) + _qt4_add_target_private_depends(QAxContainer Gui) + endif() + _qt4_add_target_private_depends(phonon Gui) + if(QT_QTDBUS_FOUND) + _qt4_add_target_private_depends(phonon DBus) + endif() + + if (WIN32 AND NOT QT4_NO_LINK_QTMAIN) + set(_isExe $,EXECUTABLE>) + set(_isWin32 $>) + set(_isNotExcluded $>>) + set(_isPolicyNEW $) + get_target_property(_configs Qt4::QtCore IMPORTED_CONFIGURATIONS) + set_property(TARGET Qt4::QtCore APPEND PROPERTY + INTERFACE_LINK_LIBRARIES + $<$:Qt4::qtmain> + ) + foreach(_config ${_configs}) + set_property(TARGET Qt4::QtCore APPEND PROPERTY + IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} + $<$:Qt4::qtmain> + ) + endforeach() + unset(_configs) + unset(_isExe) + unset(_isWin32) + unset(_isNotExcluded) + unset(_isPolicyNEW) + endif() + + ####################################### + # + # Check the executables of Qt + # ( moc, uic, rcc ) + # + ####################################### + + + if(QT_QMAKE_CHANGED) + set(QT_UIC_EXECUTABLE NOTFOUND) + set(QT_MOC_EXECUTABLE NOTFOUND) + set(QT_UIC3_EXECUTABLE NOTFOUND) + set(QT_RCC_EXECUTABLE NOTFOUND) + set(QT_DBUSCPP2XML_EXECUTABLE NOTFOUND) + set(QT_DBUSXML2CPP_EXECUTABLE NOTFOUND) + set(QT_LUPDATE_EXECUTABLE NOTFOUND) + set(QT_LRELEASE_EXECUTABLE NOTFOUND) + set(QT_QCOLLECTIONGENERATOR_EXECUTABLE NOTFOUND) + set(QT_DESIGNER_EXECUTABLE NOTFOUND) + set(QT_LINGUIST_EXECUTABLE NOTFOUND) + endif() + + macro(_find_qt4_program VAR NAME) + find_program(${VAR} + NAMES ${ARGN} + PATHS ${QT_BINARY_DIR} + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + if (${VAR} AND NOT TARGET ${NAME}) + add_executable(${NAME} IMPORTED) + set_property(TARGET ${NAME} PROPERTY IMPORTED_LOCATION ${${VAR}}) + endif() + endmacro() + + _find_qt4_program(QT_MOC_EXECUTABLE Qt4::moc moc-qt4 moc4 moc) + _find_qt4_program(QT_UIC_EXECUTABLE Qt4::uic uic-qt4 uic4 uic) + _find_qt4_program(QT_UIC3_EXECUTABLE Qt4::uic3 uic3) + _find_qt4_program(QT_RCC_EXECUTABLE Qt4::rcc rcc) + _find_qt4_program(QT_DBUSCPP2XML_EXECUTABLE Qt4::qdbuscpp2xml qdbuscpp2xml) + _find_qt4_program(QT_DBUSXML2CPP_EXECUTABLE Qt4::qdbusxml2cpp qdbusxml2cpp) + _find_qt4_program(QT_LUPDATE_EXECUTABLE Qt4::lupdate lupdate-qt4 lupdate4 lupdate) + _find_qt4_program(QT_LRELEASE_EXECUTABLE Qt4::lrelease lrelease-qt4 lrelease4 lrelease) + _find_qt4_program(QT_QCOLLECTIONGENERATOR_EXECUTABLE Qt4::qcollectiongenerator qcollectiongenerator-qt4 qcollectiongenerator) + _find_qt4_program(QT_DESIGNER_EXECUTABLE Qt4::designer designer-qt4 designer4 designer) + _find_qt4_program(QT_LINGUIST_EXECUTABLE Qt4::linguist linguist-qt4 linguist4 linguist) + + if (NOT TARGET Qt4::qmake) + add_executable(Qt4::qmake IMPORTED) + set_property(TARGET Qt4::qmake PROPERTY IMPORTED_LOCATION ${QT_QMAKE_EXECUTABLE}) + endif() + + if (QT_MOC_EXECUTABLE) + set(QT_WRAP_CPP "YES") + endif () + + if (QT_UIC_EXECUTABLE) + set(QT_WRAP_UI "YES") + endif () + + + + mark_as_advanced( QT_UIC_EXECUTABLE QT_UIC3_EXECUTABLE QT_MOC_EXECUTABLE + QT_RCC_EXECUTABLE QT_DBUSXML2CPP_EXECUTABLE QT_DBUSCPP2XML_EXECUTABLE + QT_LUPDATE_EXECUTABLE QT_LRELEASE_EXECUTABLE QT_QCOLLECTIONGENERATOR_EXECUTABLE + QT_DESIGNER_EXECUTABLE QT_LINGUIST_EXECUTABLE) + + + # get the directory of the current file, used later on in the file + get_filename_component( _qt4_current_dir "${CMAKE_CURRENT_LIST_FILE}" PATH) + + + ############################################### + # + # configuration/system dependent settings + # + ############################################### + + include("${_qt4_current_dir}/Qt4ConfigDependentSettings.cmake") + + + ####################################### + # + # Check the plugins of Qt + # + ####################################### + + set( QT_PLUGIN_TYPES accessible bearer codecs decorations designer gfxdrivers graphicssystems iconengines imageformats inputmethods mousedrivers phonon_backend script sqldrivers ) + + set( QT_ACCESSIBLE_PLUGINS qtaccessiblecompatwidgets qtaccessiblewidgets ) + set( QT_BEARER_PLUGINS qcorewlanbearer qgenericbearer qnativewifibearer ) + set( QT_CODECS_PLUGINS qcncodecs qjpcodecs qkrcodecs qtwcodecs ) + set( QT_DECORATIONS_PLUGINS qdecorationdefault qdecorationwindows ) + set( QT_DESIGNER_PLUGINS arthurplugin containerextension customwidgetplugin phononwidgets qdeclarativeview qt3supportwidgets qwebview taskmenuextension worldtimeclockplugin ) + set( QT_GRAPHICSDRIVERS_PLUGINS qgfxtransformed qgfxvnc qscreenvfb ) + set( QT_GRAPHICSSYSTEMS_PLUGINS qglgraphicssystem qtracegraphicssystem ) + set( QT_ICONENGINES_PLUGINS qsvgicon ) + set( QT_IMAGEFORMATS_PLUGINS qgif qjpeg qmng qico qsvg qtiff qtga ) + set( QT_INPUTMETHODS_PLUGINS qimsw_multi ) + set( QT_MOUSEDRIVERS_PLUGINS qwstslibmousehandler ) + if(APPLE) + set( QT_PHONON_BACKEND_PLUGINS phonon_qt7 ) + elseif(WIN32) + set( QT_PHONON_BACKEND_PLUGINS phonon_ds9 ) + endif() + set( QT_SCRIPT_PLUGINS qtscriptdbus ) + set( QT_SQLDRIVERS_PLUGINS qsqldb2 qsqlibase qsqlite qsqlite2 qsqlmysql qsqloci qsqlodbc qsqlpsql qsqltds ) + + set( QT_PHONON_PLUGINS ${QT_PHONON_BACKEND_PLUGINS} ) + set( QT_QT3SUPPORT_PLUGINS qtaccessiblecompatwidgets ) + set( QT_QTCORE_PLUGINS ${QT_BEARER_PLUGINS} ${QT_CODECS_PLUGINS} ) + set( QT_QTGUI_PLUGINS qtaccessiblewidgets ${QT_IMAGEFORMATS_PLUGINS} ${QT_DECORATIONS_PLUGINS} ${QT_GRAPHICSDRIVERS_PLUGINS} ${QT_GRAPHICSSYSTEMS_PLUGINS} ${QT_INPUTMETHODS_PLUGINS} ${QT_MOUSEDRIVERS_PLUGINS} ) + set( QT_QTSCRIPT_PLUGINS ${QT_SCRIPT_PLUGINS} ) + set( QT_QTSQL_PLUGINS ${QT_SQLDRIVERS_PLUGINS} ) + set( QT_QTSVG_PLUGINS qsvg qsvgicon ) + + if(QT_QMAKE_CHANGED) + foreach(QT_PLUGIN_TYPE ${QT_PLUGIN_TYPES}) + string(TOUPPER ${QT_PLUGIN_TYPE} _upper_qt_plugin_type) + set(QT_${_upper_qt_plugin_type}_PLUGINS_DIR ${QT_PLUGINS_DIR}/${QT_PLUGIN_TYPE}) + foreach(QT_PLUGIN ${QT_${_upper_qt_plugin_type}_PLUGINS}) + string(TOUPPER ${QT_PLUGIN} _upper_qt_plugin) + unset(QT_${_upper_qt_plugin}_LIBRARY_RELEASE CACHE) + unset(QT_${_upper_qt_plugin}_LIBRARY_DEBUG CACHE) + unset(QT_${_upper_qt_plugin}_LIBRARY CACHE) + unset(QT_${_upper_qt_plugin}_PLUGIN_RELEASE CACHE) + unset(QT_${_upper_qt_plugin}_PLUGIN_DEBUG CACHE) + unset(QT_${_upper_qt_plugin}_PLUGIN CACHE) + endforeach() + endforeach() + endif() + + # find_library works better than find_file but we need to set prefixes to only match plugins + foreach(QT_PLUGIN_TYPE ${QT_PLUGIN_TYPES}) + string(TOUPPER ${QT_PLUGIN_TYPE} _upper_qt_plugin_type) + set(QT_${_upper_qt_plugin_type}_PLUGINS_DIR ${QT_PLUGINS_DIR}/${QT_PLUGIN_TYPE}) + foreach(QT_PLUGIN ${QT_${_upper_qt_plugin_type}_PLUGINS}) + string(TOUPPER ${QT_PLUGIN} _upper_qt_plugin) + if(QT_IS_STATIC) + find_library(QT_${_upper_qt_plugin}_LIBRARY_RELEASE + NAMES ${QT_PLUGIN}${QT_LIBINFIX} ${QT_PLUGIN}${QT_LIBINFIX}4 + PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + find_library(QT_${_upper_qt_plugin}_LIBRARY_DEBUG + NAMES ${QT_PLUGIN}${QT_LIBINFIX}_debug ${QT_PLUGIN}${QT_LIBINFIX}d ${QT_PLUGIN}${QT_LIBINFIX}d4 + PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + _QT4_ADJUST_LIB_VARS(${QT_PLUGIN}) + else() + # find_library works easier/better than find_file but we need to set suffixes to only match plugins + set(CMAKE_FIND_LIBRARY_SUFFIXES_DEFAULT ${CMAKE_FIND_LIBRARY_SUFFIXES}) + set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_MODULE_SUFFIX} ${CMAKE_SHARED_LIBRARY_SUFFIX}) + find_library(QT_${_upper_qt_plugin}_PLUGIN_RELEASE + NAMES ${QT_PLUGIN}${QT_LIBINFIX} ${QT_PLUGIN}${QT_LIBINFIX}4 + PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + find_library(QT_${_upper_qt_plugin}_PLUGIN_DEBUG + NAMES ${QT_PLUGIN}${QT_LIBINFIX}_debug ${QT_PLUGIN}${QT_LIBINFIX}d ${QT_PLUGIN}${QT_LIBINFIX}d4 + PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + mark_as_advanced(QT_${_upper_qt_plugin}_PLUGIN_RELEASE QT_${_upper_qt_plugin}_PLUGIN_DEBUG) + set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_DEFAULT}) + endif() + endforeach() + endforeach() + + + ###################################### + # + # Macros for building Qt files + # + ###################################### + + include("${_qt4_current_dir}/Qt4Macros.cmake") + +endif() + +#support old QT_MIN_VERSION if set, but not if version is supplied by find_package() +if(NOT Qt4_FIND_VERSION AND QT_MIN_VERSION) + set(Qt4_FIND_VERSION ${QT_MIN_VERSION}) +endif() + +if( Qt4_FIND_COMPONENTS ) + + # if components specified in find_package(), make sure each of those pieces were found + set(_QT4_FOUND_REQUIRED_VARS QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR) + foreach( component ${Qt4_FIND_COMPONENTS} ) + string( TOUPPER ${component} _COMPONENT ) + if(${_COMPONENT} STREQUAL "QTMAIN") + if(Q_WS_WIN) + set(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_${_COMPONENT}_LIBRARY) + endif() + else() + set(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_${_COMPONENT}_INCLUDE_DIR QT_${_COMPONENT}_LIBRARY) + endif() + endforeach() + + if(Qt4_FIND_COMPONENTS MATCHES QtGui) + set(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_UIC_EXECUTABLE) + endif() + +else() + + # if no components specified, we'll make a default set of required variables to say Qt is found + set(_QT4_FOUND_REQUIRED_VARS QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE QT_INCLUDE_DIR + QT_LIBRARY_DIR QT_QTCORE_LIBRARY) + +endif() + +if (NOT QT_VERSION_MAJOR EQUAL 4) + set(VERSION_MSG "Found unsuitable Qt version \"${QTVERSION}\" from ${QT_QMAKE_EXECUTABLE}") + set(Qt4_FOUND FALSE) + if(Qt4_FIND_REQUIRED) + message( FATAL_ERROR "${VERSION_MSG}, this code requires Qt 4.x") + else() + if(NOT Qt4_FIND_QUIETLY) + message( STATUS "${VERSION_MSG}") + endif() + endif() +else() + if (CMAKE_FIND_PACKAGE_NAME STREQUAL "Qt") + # FindQt include()'s this module. It's an old pattern, but rather than + # trying to suppress this from outside the module (which is then sensitive + # to the contents, detect the case in this module and suppress it + # explicitly. + set(FPHSA_NAME_MISMATCHED 1) + endif () + FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt4 FOUND_VAR Qt4_FOUND + REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} + VERSION_VAR QTVERSION + ) + unset(FPHSA_NAME_MISMATCHED) +endif() + +####################################### +# +# compatibility settings +# +####################################### +# Backwards compatibility for CMake1.4 and 1.2 +set (QT_MOC_EXE ${QT_MOC_EXECUTABLE} ) +set (QT_UIC_EXE ${QT_UIC_EXECUTABLE} ) +set( QT_QT_LIBRARY "") +set(QT4_FOUND ${Qt4_FOUND}) +set(QT_FOUND ${Qt4_FOUND}) + diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindSDL.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindSDL.cmake new file mode 100644 index 0000000000000000000000000000000000000000..a4c86681803a41e39e99c703f19729da643fab9d --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindSDL.cmake @@ -0,0 +1,242 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindSDL +------- + +Locate the SDL library + + +Imported targets +^^^^^^^^^^^^^^^^ + +.. versionadded:: 3.19 + +This module defines the following :prop_tgt:`IMPORTED` target: + +``SDL::SDL`` + The SDL library, if found + +Result variables +^^^^^^^^^^^^^^^^ + +This module will set the following variables in your project: + +``SDL_INCLUDE_DIRS`` + where to find SDL.h +``SDL_LIBRARIES`` + the name of the library to link against +``SDL_FOUND`` + if false, do not try to link to SDL +``SDL_VERSION`` + the human-readable string containing the version of SDL if found +``SDL_VERSION_MAJOR`` + SDL major version +``SDL_VERSION_MINOR`` + SDL minor version +``SDL_VERSION_PATCH`` + SDL patch version + +.. versionadded:: 3.19 + Added the ``SDL_INCLUDE_DIRS``, ``SDL_LIBRARIES`` and ``SDL_VERSION[_]`` + variables. + +Cache variables +^^^^^^^^^^^^^^^ + +These variables may optionally be set to help this module find the correct files: + +``SDL_INCLUDE_DIR`` + where to find SDL.h +``SDL_LIBRARY`` + the name of the library to link against + + +Variables for locating SDL +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This module responds to the flag: + +``SDL_BUILDING_LIBRARY`` + If this is defined, then no SDL_main will be linked in because + only applications need main(). + Otherwise, it is assumed you are building an application and this + module will attempt to locate and set the proper link flags + as part of the returned SDL_LIBRARY variable. + + +Obsolete variables +^^^^^^^^^^^^^^^^^^ + +.. deprecated:: 3.19 + +These variables are obsolete and provided for backwards compatibility: + +``SDL_VERSION_STRING`` + the human-readable string containing the version of SDL if found. + Identical to SDL_VERSION + + +Don't forget to include SDLmain.h and SDLmain.m your project for the +OS X framework based version. (Other versions link to -lSDLmain which +this module will try to find on your behalf.) Also for OS X, this +module will automatically add the -framework Cocoa on your behalf. + + + +Additional Note: If you see an empty SDL_LIBRARY_TEMP in your +configuration and no SDL_LIBRARY, it means CMake did not find your SDL +library (SDL.dll, libsdl.so, SDL.framework, etc). Set +SDL_LIBRARY_TEMP to point to your SDL library, and configure again. +Similarly, if you see an empty SDLMAIN_LIBRARY, you should set this +value as appropriate. These values are used to generate the final +SDL_LIBRARY variable, but when these values are unset, SDL_LIBRARY +does not get created. + + + +$SDLDIR is an environment variable that would correspond to the +./configure --prefix=$SDLDIR used in building SDL. l.e.galup 9-20-02 + +On OSX, this will prefer the Framework version (if found) over others. +People will have to manually change the cache values of SDL_LIBRARY to +override this selection or set the CMake environment +CMAKE_INCLUDE_PATH to modify the search paths. + +Note that the header path has changed from SDL/SDL.h to just SDL.h +This needed to change because "proper" SDL convention is #include +"SDL.h", not . This is done for portability reasons +because not all systems place things in SDL/ (see FreeBSD). +#]=======================================================================] + +cmake_policy(PUSH) +cmake_policy(SET CMP0159 NEW) # file(STRINGS) with REGEX updates CMAKE_MATCH_ + +find_path(SDL_INCLUDE_DIR SDL.h + HINTS + ENV SDLDIR + PATH_SUFFIXES SDL SDL12 SDL11 + # path suffixes to search inside ENV{SDLDIR} + include/SDL include/SDL12 include/SDL11 include +) + +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(VC_LIB_PATH_SUFFIX lib/x64) +else() + set(VC_LIB_PATH_SUFFIX lib/x86) +endif() + +# SDL-1.1 is the name used by FreeBSD ports... +# don't confuse it for the version number. +find_library(SDL_LIBRARY_TEMP + NAMES SDL SDL-1.1 + HINTS + ENV SDLDIR + PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX} +) + +# Hide this cache variable from the user, it's an internal implementation +# detail. The documented library variable for the user is SDL_LIBRARY +# which is derived from SDL_LIBRARY_TEMP further below. +set_property(CACHE SDL_LIBRARY_TEMP PROPERTY TYPE INTERNAL) + +if(NOT SDL_BUILDING_LIBRARY) + if(NOT SDL_INCLUDE_DIR MATCHES ".framework") + # Non-OS X framework versions expect you to also dynamically link to + # SDLmain. This is mainly for Windows and OS X. Other (Unix) platforms + # seem to provide SDLmain for compatibility even though they don't + # necessarily need it. + find_library(SDLMAIN_LIBRARY + NAMES SDLmain SDLmain-1.1 + HINTS + ENV SDLDIR + PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX} + PATHS + /opt + ) + endif() +endif() + +# SDL may require threads on your system. +# The Apple build may not need an explicit flag because one of the +# frameworks may already provide it. +# But for non-OSX systems, I will use the CMake Threads package. +if(NOT APPLE) + find_package(Threads) +endif() + +# MinGW needs an additional link flag, -mwindows +# It's total link flags should look like -lmingw32 -lSDLmain -lSDL -mwindows +if(MINGW) + set(MINGW32_LIBRARY mingw32 "-mwindows" CACHE STRING "link flags for MinGW") +endif() + +if(SDL_LIBRARY_TEMP) + # For SDLmain + if(SDLMAIN_LIBRARY AND NOT SDL_BUILDING_LIBRARY) + list(FIND SDL_LIBRARY_TEMP "${SDLMAIN_LIBRARY}" _SDL_MAIN_INDEX) + if(_SDL_MAIN_INDEX EQUAL -1) + set(SDL_LIBRARY_TEMP "${SDLMAIN_LIBRARY}" ${SDL_LIBRARY_TEMP}) + endif() + unset(_SDL_MAIN_INDEX) + endif() + + # For OS X, SDL uses Cocoa as a backend so it must link to Cocoa. + # CMake doesn't display the -framework Cocoa string in the UI even + # though it actually is there if I modify a preused variable. + # I think it has something to do with the CACHE STRING. + # So I use a temporary variable until the end so I can set the + # "real" variable in one-shot. + if(APPLE) + set(SDL_LIBRARY_TEMP ${SDL_LIBRARY_TEMP} "-framework Cocoa") + endif() + + # For threads, as mentioned Apple doesn't need this. + # In fact, there seems to be a problem if I used the Threads package + # and try using this line, so I'm just skipping it entirely for OS X. + if(NOT APPLE) + set(SDL_LIBRARY_TEMP ${SDL_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT}) + endif() + + # For MinGW library + if(MINGW) + set(SDL_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL_LIBRARY_TEMP}) + endif() + + # Set the final string here so the GUI reflects the final state. + set(SDL_LIBRARY ${SDL_LIBRARY_TEMP} CACHE STRING "Where the SDL Library can be found") +endif() + +if(SDL_INCLUDE_DIR AND EXISTS "${SDL_INCLUDE_DIR}/SDL_version.h") + file(STRINGS "${SDL_INCLUDE_DIR}/SDL_version.h" SDL_VERSION_MAJOR_LINE REGEX "^#define[ \t]+SDL_MAJOR_VERSION[ \t]+[0-9]+$") + file(STRINGS "${SDL_INCLUDE_DIR}/SDL_version.h" SDL_VERSION_MINOR_LINE REGEX "^#define[ \t]+SDL_MINOR_VERSION[ \t]+[0-9]+$") + file(STRINGS "${SDL_INCLUDE_DIR}/SDL_version.h" SDL_VERSION_PATCH_LINE REGEX "^#define[ \t]+SDL_PATCHLEVEL[ \t]+[0-9]+$") + string(REGEX REPLACE "^#define[ \t]+SDL_MAJOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL_VERSION_MAJOR "${SDL_VERSION_MAJOR_LINE}") + string(REGEX REPLACE "^#define[ \t]+SDL_MINOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL_VERSION_MINOR "${SDL_VERSION_MINOR_LINE}") + string(REGEX REPLACE "^#define[ \t]+SDL_PATCHLEVEL[ \t]+([0-9]+)$" "\\1" SDL_VERSION_PATCH "${SDL_VERSION_PATCH_LINE}") + unset(SDL_VERSION_MAJOR_LINE) + unset(SDL_VERSION_MINOR_LINE) + unset(SDL_VERSION_PATCH_LINE) + set(SDL_VERSION ${SDL_VERSION_MAJOR}.${SDL_VERSION_MINOR}.${SDL_VERSION_PATCH}) + set(SDL_VERSION_STRING ${SDL_VERSION}) +endif() + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL + REQUIRED_VARS SDL_LIBRARY SDL_INCLUDE_DIR + VERSION_VAR SDL_VERSION_STRING) + +if(SDL_FOUND) + set(SDL_LIBRARIES ${SDL_LIBRARY}) + set(SDL_INCLUDE_DIRS ${SDL_INCLUDE_DIR}) + if(NOT TARGET SDL::SDL) + add_library(SDL::SDL INTERFACE IMPORTED) + set_target_properties(SDL::SDL PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${SDL_INCLUDE_DIR}" + INTERFACE_LINK_LIBRARIES "${SDL_LIBRARY}") + endif() +endif() + +cmake_policy(POP) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindSQLite3.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindSQLite3.cmake new file mode 100644 index 0000000000000000000000000000000000000000..e5fead71222d79bd00791e009cea4173cab9e3b0 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindSQLite3.cmake @@ -0,0 +1,84 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindSQLite3 +----------- + +.. versionadded:: 3.14 + +Find the SQLite libraries, v3 + +IMPORTED targets +^^^^^^^^^^^^^^^^ + +This module defines the following :prop_tgt:`IMPORTED` target: + +``SQLite::SQLite3`` + +Result variables +^^^^^^^^^^^^^^^^ + +This module will set the following variables if found: + +``SQLite3_INCLUDE_DIRS`` + where to find sqlite3.h, etc. +``SQLite3_LIBRARIES`` + the libraries to link against to use SQLite3. +``SQLite3_VERSION`` + version of the SQLite3 library found +``SQLite3_FOUND`` + TRUE if found + +#]=======================================================================] + +cmake_policy(PUSH) +cmake_policy(SET CMP0159 NEW) # file(STRINGS) with REGEX updates CMAKE_MATCH_ + +find_package(PkgConfig QUIET) +if(PKG_CONFIG_FOUND) + pkg_check_modules(PC_SQLite3 QUIET sqlite3) +endif() + +# Look for the necessary header +find_path(SQLite3_INCLUDE_DIR NAMES sqlite3.h + HINTS + ${PC_SQLite3_INCLUDE_DIRS} +) +mark_as_advanced(SQLite3_INCLUDE_DIR) + +# Look for the necessary library +find_library(SQLite3_LIBRARY NAMES sqlite3 sqlite + HINTS + ${PC_SQLite3_LIBRARY_DIRS} +) +mark_as_advanced(SQLite3_LIBRARY) + +# Extract version information from the header file +if(SQLite3_INCLUDE_DIR) + file(STRINGS ${SQLite3_INCLUDE_DIR}/sqlite3.h _ver_line + REGEX "^#define SQLITE_VERSION *\"[0-9]+\\.[0-9]+\\.[0-9]+\"" + LIMIT_COUNT 1) + string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" + SQLite3_VERSION "${_ver_line}") + unset(_ver_line) +endif() + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +find_package_handle_standard_args(SQLite3 + REQUIRED_VARS SQLite3_INCLUDE_DIR SQLite3_LIBRARY + VERSION_VAR SQLite3_VERSION) + +# Create the imported target +if(SQLite3_FOUND) + set(SQLite3_INCLUDE_DIRS ${SQLite3_INCLUDE_DIR}) + set(SQLite3_LIBRARIES ${SQLite3_LIBRARY}) + if(NOT TARGET SQLite::SQLite3) + add_library(SQLite::SQLite3 UNKNOWN IMPORTED) + set_target_properties(SQLite::SQLite3 PROPERTIES + IMPORTED_LOCATION "${SQLite3_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${SQLite3_INCLUDE_DIR}") + endif() +endif() + +cmake_policy(POP) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindTclsh.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindTclsh.cmake new file mode 100644 index 0000000000000000000000000000000000000000..594d0ec81fe0cb92287daef7ac9d7ed7403150a0 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindTclsh.cmake @@ -0,0 +1,101 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindTclsh +--------- + +Find tclsh + +This module finds if TCL is installed and determines where the include +files and libraries are. It also determines what the name of the +library is. This code sets the following variables: + +:: + + TCLSH_FOUND = TRUE if tclsh has been found + TCL_TCLSH = the path to the tclsh executable +#]=======================================================================] + +get_filename_component(TK_WISH_PATH "${TK_WISH}" PATH) +get_filename_component(TK_WISH_PATH_PARENT "${TK_WISH_PATH}" PATH) +string(REGEX REPLACE + "^.*wish([0-9]\\.*[0-9]).*$" "\\1" TK_WISH_VERSION "${TK_WISH}") + +get_filename_component(TCL_INCLUDE_PATH_PARENT "${TCL_INCLUDE_PATH}" PATH) +get_filename_component(TK_INCLUDE_PATH_PARENT "${TK_INCLUDE_PATH}" PATH) + +get_filename_component(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH) +get_filename_component(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH) +string(REGEX REPLACE + "^.*tcl([0-9]\\.*[0-9]).*$" "\\1" TCL_LIBRARY_VERSION "${TCL_LIBRARY}") + +get_filename_component(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH) +get_filename_component(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH) +string(REGEX REPLACE + "^.*tk([0-9]\\.*[0-9]).*$" "\\1" TK_LIBRARY_VERSION "${TK_LIBRARY}") + +set(TCLTK_POSSIBLE_BIN_PATHS + "${TCL_INCLUDE_PATH_PARENT}/bin" + "${TK_INCLUDE_PATH_PARENT}/bin" + "${TCL_LIBRARY_PATH_PARENT}/bin" + "${TK_LIBRARY_PATH_PARENT}/bin" + "${TK_WISH_PATH_PARENT}/bin" + ) + +if(WIN32) + get_filename_component( + ActiveTcl_CurrentVersion + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]" + NAME) + set(TCLTK_POSSIBLE_BIN_PATHS ${TCLTK_POSSIBLE_BIN_PATHS} + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/bin" + ) +endif() + +set(TCL_TCLSH_NAMES + tclsh + tclsh${TCL_LIBRARY_VERSION} tclsh${TK_LIBRARY_VERSION} tclsh${TK_WISH_VERSION} + tclsh87 tclsh8.7 + tclsh86 tclsh8.6 + tclsh85 tclsh8.5 + tclsh84 tclsh8.4 + tclsh83 tclsh8.3 + tclsh82 tclsh8.2 + tclsh80 tclsh8.0 + ) + +find_program(TCL_TCLSH + NAMES ${TCL_TCLSH_NAMES} + HINTS ${TCLTK_POSSIBLE_BIN_PATHS} + ) + +if(TCL_TCLSH) + execute_process(COMMAND "${CMAKE_COMMAND}" -E echo puts "\$tcl_version" + COMMAND "${TCL_TCLSH}" + OUTPUT_VARIABLE TCLSH_VERSION_STRING + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) +endif() + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +if (CMAKE_FIND_PACKAGE_NAME STREQUAL "TCL" OR + CMAKE_FIND_PACKAGE_NAME STREQUAL "TclStub") + # FindTCL include()'s this module. It's an old pattern, but rather than + # trying to suppress this from outside the module (which is then sensitive to + # the contents, detect the case in this module and suppress it explicitly. + # Transitively, FindTclStub includes FindTCL. + set(FPHSA_NAME_MISMATCHED 1) +endif () +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Tclsh + REQUIRED_VARS TCL_TCLSH + VERSION_VAR TCLSH_VERSION_STRING) +unset(FPHSA_NAME_MISMATCHED) + +mark_as_advanced(TCL_TCLSH) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindWget.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindWget.cmake new file mode 100644 index 0000000000000000000000000000000000000000..d0b6fdf448309f7b71be3d9553f65c3121a54721 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindWget.cmake @@ -0,0 +1,34 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindWget +-------- + +Find wget + +This module looks for wget. This module defines the following values: + +:: + + WGET_EXECUTABLE: the full path to the wget tool. + WGET_FOUND: True if wget has been found. +#]=======================================================================] + +include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/FindMsys.cmake) + +find_program(WGET_EXECUTABLE + wget + ${CYGWIN_INSTALL_PATH}/bin + ${MSYS_INSTALL_PATH}/usr/bin +) + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Wget DEFAULT_MSG WGET_EXECUTABLE) + +mark_as_advanced( WGET_EXECUTABLE ) + +# WGET option is deprecated. +# use WGET_EXECUTABLE instead. +set (WGET ${WGET_EXECUTABLE}) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindXalanC.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindXalanC.cmake new file mode 100644 index 0000000000000000000000000000000000000000..338d0c028b1175ad9676cd4b08517090bf40628d --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindXalanC.cmake @@ -0,0 +1,160 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindXalanC +----------- + +.. versionadded:: 3.5 + +Find the Apache Xalan-C++ XSL transform processor headers and libraries. + +Imported targets +^^^^^^^^^^^^^^^^ + +This module defines the following :prop_tgt:`IMPORTED` targets: + +``XalanC::XalanC`` + The Xalan-C++ ``xalan-c`` library, if found. + +Result variables +^^^^^^^^^^^^^^^^ + +This module will set the following variables in your project: + +``XalanC_FOUND`` + true if the Xalan headers and libraries were found +``XalanC_VERSION`` + Xalan release version +``XalanC_INCLUDE_DIRS`` + the directory containing the Xalan headers; note + ``XercesC_INCLUDE_DIRS`` is also required +``XalanC_LIBRARIES`` + Xalan libraries to be linked; note ``XercesC_LIBRARIES`` is also + required + +Cache variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``XalanC_INCLUDE_DIR`` + the directory containing the Xalan headers +``XalanC_LIBRARY`` + the Xalan library +#]=======================================================================] + +cmake_policy(PUSH) +cmake_policy(SET CMP0159 NEW) # file(STRINGS) with REGEX updates CMAKE_MATCH_ + +# Written by Roger Leigh + +function(_XalanC_GET_VERSION version_hdr) + file(STRINGS ${version_hdr} _contents REGEX "^[ \t]*#define XALAN_VERSION_.*") + if(_contents) + string(REGEX REPLACE "[^*]*#define XALAN_VERSION_MAJOR[ \t(]+([0-9]+).*" "\\1" XalanC_MAJOR "${_contents}") + string(REGEX REPLACE "[^*]*#define XALAN_VERSION_MINOR[ \t(]+([0-9]+).*" "\\1" XalanC_MINOR "${_contents}") + string(REGEX REPLACE "[^*]*#define XALAN_VERSION_REVISION[ \t(]+([0-9]+).*" "\\1" XalanC_PATCH "${_contents}") + + if(NOT XalanC_MAJOR MATCHES "^[0-9]+$") + message(FATAL_ERROR "Version parsing failed for XALAN_VERSION_MAJOR!") + endif() + if(NOT XalanC_MINOR MATCHES "^[0-9]+$") + message(FATAL_ERROR "Version parsing failed for XALAN_VERSION_MINOR!") + endif() + if(NOT XalanC_PATCH MATCHES "^[0-9]+$") + message(FATAL_ERROR "Version parsing failed for XALAN_VERSION_REVISION!") + endif() + + set(XalanC_VERSION "${XalanC_MAJOR}.${XalanC_MINOR}.${XalanC_PATCH}" PARENT_SCOPE) + set(XalanC_VERSION_MAJOR "${XalanC_MAJOR}" PARENT_SCOPE) + set(XalanC_VERSION_MINOR "${XalanC_MINOR}" PARENT_SCOPE) + set(XalanC_VERSION_PATCH "${XalanC_PATCH}" PARENT_SCOPE) + else() + message(FATAL_ERROR "Include file ${version_hdr} does not exist or does not contain expected version information") + endif() +endfunction() + +# Find include directory +find_path(XalanC_INCLUDE_DIR + NAMES "xalanc/XalanTransformer/XalanTransformer.hpp" + DOC "Xalan-C++ include directory") +mark_as_advanced(XalanC_INCLUDE_DIR) + +if(XalanC_INCLUDE_DIR AND EXISTS "${XalanC_INCLUDE_DIR}/xalanc/Include/XalanVersion.hpp") + _XalanC_GET_VERSION("${XalanC_INCLUDE_DIR}/xalanc/Include/XalanVersion.hpp") +endif() + +if(NOT XalanC_LIBRARY) + # Find all XalanC libraries + find_library(XalanC_LIBRARY_RELEASE + NAMES "Xalan-C" "xalan-c" + "Xalan-C_${XalanC_VERSION_MAJOR}" + "Xalan-C_${XalanC_VERSION_MAJOR}_${XalanC_VERSION_MINOR}" + DOC "Xalan-C++ libraries (release)") + find_library(XalanC_LIBRARY_DEBUG + NAMES "Xalan-CD" "xalan-cd" + "Xalan-C_${XalanC_VERSION_MAJOR}D" + "Xalan-C_${XalanC_VERSION_MAJOR}_${XalanC_VERSION_MINOR}D" + DOC "Xalan-C++ libraries (debug)") + include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) + select_library_configurations(XalanC) + mark_as_advanced(XalanC_LIBRARY_RELEASE XalanC_LIBRARY_DEBUG) +endif() + +unset(XalanC_VERSION_MAJOR) +unset(XalanC_VERSION_MINOR) +unset(XalanC_VERSION_PATCH) + +unset(XalanC_XERCESC_REQUIRED) +if(XalanC_FIND_REQUIRED) + set(XalanC_XERCESC_REQUIRED REQUIRED) +endif() +find_package(XercesC ${XalanC_XERCESC_REQUIRED}) +unset(XalanC_XERCESC_REQUIRED) + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(XalanC + FOUND_VAR XalanC_FOUND + REQUIRED_VARS XalanC_LIBRARY + XalanC_INCLUDE_DIR + XalanC_VERSION + XercesC_FOUND + VERSION_VAR XalanC_VERSION + FAIL_MESSAGE "Failed to find XalanC") + +if(XalanC_FOUND) + set(XalanC_INCLUDE_DIRS "${XalanC_INCLUDE_DIR}" ${XercesC_INCLUDE_DIRS}) + set(XalanC_LIBRARIES "${XalanC_LIBRARY}" ${XercesC_LIBRARIES}) + + # For header-only libraries + if(NOT TARGET XalanC::XalanC) + add_library(XalanC::XalanC UNKNOWN IMPORTED) + if(XalanC_INCLUDE_DIRS) + set_target_properties(XalanC::XalanC PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${XalanC_INCLUDE_DIRS}") + endif() + if(EXISTS "${XalanC_LIBRARY}") + set_target_properties(XalanC::XalanC PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" + IMPORTED_LOCATION "${XalanC_LIBRARY}") + endif() + if(EXISTS "${XalanC_LIBRARY_RELEASE}") + set_property(TARGET XalanC::XalanC APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(XalanC::XalanC PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" + IMPORTED_LOCATION_RELEASE "${XalanC_LIBRARY_RELEASE}") + endif() + if(EXISTS "${XalanC_LIBRARY_DEBUG}") + set_property(TARGET XalanC::XalanC APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(XalanC::XalanC PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" + IMPORTED_LOCATION_DEBUG "${XalanC_LIBRARY_DEBUG}") + endif() + set_target_properties(XalanC::XalanC PROPERTIES INTERFACE_LINK_LIBRARIES XercesC::XercesC) + endif() +endif() + +cmake_policy(POP) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindZLIB.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindZLIB.cmake new file mode 100644 index 0000000000000000000000000000000000000000..0842f4c009837a3eb054a8b0769710aeeeca9fc7 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindZLIB.cmake @@ -0,0 +1,239 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindZLIB +-------- + +Find the native ZLIB includes and library. + +IMPORTED Targets +^^^^^^^^^^^^^^^^ + +.. versionadded:: 3.1 + +This module defines :prop_tgt:`IMPORTED` target ``ZLIB::ZLIB``, if +ZLIB has been found. + +Result Variables +^^^^^^^^^^^^^^^^ + +This module defines the following variables: + +``ZLIB_INCLUDE_DIRS`` + where to find zlib.h, etc. +``ZLIB_LIBRARIES`` + List of libraries when using zlib. +``ZLIB_FOUND`` + True if zlib found. +``ZLIB_VERSION`` + .. versionadded:: 3.26 + the version of Zlib found. + + See also legacy variable ``ZLIB_VERSION_STRING``. + +.. versionadded:: 3.4 + Debug and Release variants are found separately. + +Legacy Variables +^^^^^^^^^^^^^^^^ + +The following variables are provided for backward compatibility: + +``ZLIB_VERSION_MAJOR`` + The major version of zlib. + + .. versionchanged:: 3.26 + Superseded by ``ZLIB_VERSION``. +``ZLIB_VERSION_MINOR`` + The minor version of zlib. + + .. versionchanged:: 3.26 + Superseded by ``ZLIB_VERSION``. +``ZLIB_VERSION_PATCH`` + The patch version of zlib. + + .. versionchanged:: 3.26 + Superseded by ``ZLIB_VERSION``. +``ZLIB_VERSION_TWEAK`` + The tweak version of zlib. + + .. versionchanged:: 3.26 + Superseded by ``ZLIB_VERSION``. +``ZLIB_VERSION_STRING`` + The version of zlib found (x.y.z) + + .. versionchanged:: 3.26 + Superseded by ``ZLIB_VERSION``. +``ZLIB_MAJOR_VERSION`` + The major version of zlib. Superseded by ``ZLIB_VERSION_MAJOR``. +``ZLIB_MINOR_VERSION`` + The minor version of zlib. Superseded by ``ZLIB_VERSION_MINOR``. +``ZLIB_PATCH_VERSION`` + The patch version of zlib. Superseded by ``ZLIB_VERSION_PATCH``. + +Hints +^^^^^ + +A user may set ``ZLIB_ROOT`` to a zlib installation root to tell this +module where to look. + +.. versionadded:: 3.24 + Set ``ZLIB_USE_STATIC_LIBS`` to ``ON`` to look for static libraries. + Default is ``OFF``. + +#]=======================================================================] + +cmake_policy(PUSH) +cmake_policy(SET CMP0159 NEW) # file(STRINGS) with REGEX updates CMAKE_MATCH_ + +if(ZLIB_FIND_COMPONENTS AND NOT ZLIB_FIND_QUIETLY) + message(AUTHOR_WARNING + "ZLIB does not provide any COMPONENTS. Calling\n" + " find_package(ZLIB COMPONENTS ...)\n" + "will always fail." + ) +endif() + +set(_ZLIB_SEARCHES) + +# Search ZLIB_ROOT first if it is set. +if(ZLIB_ROOT) + set(_ZLIB_SEARCH_ROOT PATHS ${ZLIB_ROOT} NO_DEFAULT_PATH) + list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_ROOT) +endif() + +# Normal search. +set(_ZLIB_x86 "(x86)") +set(_ZLIB_SEARCH_NORMAL + PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]" + "$ENV{ProgramFiles}/zlib" + "$ENV{ProgramFiles${_ZLIB_x86}}/zlib") +unset(_ZLIB_x86) +list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_NORMAL) + +if(ZLIB_USE_STATIC_LIBS) + set(ZLIB_NAMES zlibstatic zlibstat zlib z) + set(ZLIB_NAMES_DEBUG zlibstaticd zlibstatd zlibd zd) +else() + set(ZLIB_NAMES z zlib zdll zlib1 zlibstatic zlibwapi zlibvc zlibstat) + set(ZLIB_NAMES_DEBUG zd zlibd zdlld zlibd1 zlib1d zlibstaticd zlibwapid zlibvcd zlibstatd) +endif() + +# Try each search configuration. +foreach(search ${_ZLIB_SEARCHES}) + find_path(ZLIB_INCLUDE_DIR NAMES zlib.h ${${search}} PATH_SUFFIXES include) +endforeach() + +# Allow ZLIB_LIBRARY to be set manually, as the location of the zlib library +if(NOT ZLIB_LIBRARY) + if(DEFINED CMAKE_FIND_LIBRARY_PREFIXES) + set(_zlib_ORIG_CMAKE_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}") + else() + set(_zlib_ORIG_CMAKE_FIND_LIBRARY_PREFIXES) + endif() + if(DEFINED CMAKE_FIND_LIBRARY_SUFFIXES) + set(_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES}") + else() + set(_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES) + endif() + # Prefix/suffix of the win32/Makefile.gcc build + if(WIN32) + list(APPEND CMAKE_FIND_LIBRARY_PREFIXES "" "lib") + list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a") + endif() + # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES + if(ZLIB_USE_STATIC_LIBS) + if(WIN32) + set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) + else() + set(CMAKE_FIND_LIBRARY_SUFFIXES .a) + endif() + endif() + + foreach(search ${_ZLIB_SEARCHES}) + find_library(ZLIB_LIBRARY_RELEASE NAMES ${ZLIB_NAMES} NAMES_PER_DIR ${${search}} PATH_SUFFIXES lib) + find_library(ZLIB_LIBRARY_DEBUG NAMES ${ZLIB_NAMES_DEBUG} NAMES_PER_DIR ${${search}} PATH_SUFFIXES lib) + endforeach() + + # Restore the original find library ordering + if(DEFINED _zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES) + set(CMAKE_FIND_LIBRARY_SUFFIXES "${_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}") + else() + set(CMAKE_FIND_LIBRARY_SUFFIXES) + endif() + if(DEFINED _zlib_ORIG_CMAKE_FIND_LIBRARY_PREFIXES) + set(CMAKE_FIND_LIBRARY_PREFIXES "${_zlib_ORIG_CMAKE_FIND_LIBRARY_PREFIXES}") + else() + set(CMAKE_FIND_LIBRARY_PREFIXES) + endif() + + include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) + select_library_configurations(ZLIB) +endif() + +unset(ZLIB_NAMES) +unset(ZLIB_NAMES_DEBUG) + +mark_as_advanced(ZLIB_INCLUDE_DIR) + +if(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h") + file(STRINGS "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_H REGEX "^#define ZLIB_VERSION \"[^\"]*\"$") + if(ZLIB_H MATCHES "ZLIB_VERSION \"(([0-9]+)\\.([0-9]+)(\\.([0-9]+)(\\.([0-9]+))?)?)") + set(ZLIB_VERSION_STRING "${CMAKE_MATCH_1}") + set(ZLIB_VERSION_MAJOR "${CMAKE_MATCH_2}") + set(ZLIB_VERSION_MINOR "${CMAKE_MATCH_3}") + set(ZLIB_VERSION_PATCH "${CMAKE_MATCH_5}") + set(ZLIB_VERSION_TWEAK "${CMAKE_MATCH_7}") + else() + set(ZLIB_VERSION_STRING "") + set(ZLIB_VERSION_MAJOR "") + set(ZLIB_VERSION_MINOR "") + set(ZLIB_VERSION_PATCH "") + set(ZLIB_VERSION_TWEAK "") + endif() + set(ZLIB_MAJOR_VERSION "${ZLIB_VERSION_MAJOR}") + set(ZLIB_MINOR_VERSION "${ZLIB_VERSION_MINOR}") + set(ZLIB_PATCH_VERSION "${ZLIB_VERSION_PATCH}") + set(ZLIB_VERSION "${ZLIB_VERSION_STRING}") +endif() + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_LIBRARY ZLIB_INCLUDE_DIR + VERSION_VAR ZLIB_VERSION + HANDLE_COMPONENTS) + +if(ZLIB_FOUND) + set(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) + + if(NOT ZLIB_LIBRARIES) + set(ZLIB_LIBRARIES ${ZLIB_LIBRARY}) + endif() + + if(NOT TARGET ZLIB::ZLIB) + add_library(ZLIB::ZLIB UNKNOWN IMPORTED) + set_target_properties(ZLIB::ZLIB PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${ZLIB_INCLUDE_DIRS}") + + if(ZLIB_LIBRARY_RELEASE) + set_property(TARGET ZLIB::ZLIB APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(ZLIB::ZLIB PROPERTIES + IMPORTED_LOCATION_RELEASE "${ZLIB_LIBRARY_RELEASE}") + endif() + + if(ZLIB_LIBRARY_DEBUG) + set_property(TARGET ZLIB::ZLIB APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(ZLIB::ZLIB PROPERTIES + IMPORTED_LOCATION_DEBUG "${ZLIB_LIBRARY_DEBUG}") + endif() + + if(NOT ZLIB_LIBRARY_RELEASE AND NOT ZLIB_LIBRARY_DEBUG) + set_property(TARGET ZLIB::ZLIB APPEND PROPERTY + IMPORTED_LOCATION "${ZLIB_LIBRARY}") + endif() + endif() +endif() + +cmake_policy(POP) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindosgGA.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindosgGA.cmake new file mode 100644 index 0000000000000000000000000000000000000000..7ebcce83bce2f4f669d07de04d76da45c2f49d68 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindosgGA.cmake @@ -0,0 +1,53 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindosgGA +--------- + + + +This is part of the ``Findosg*`` suite used to find OpenSceneGraph +components. Each component is separate and you must opt in to each +module. You must also opt into OpenGL and OpenThreads (and Producer +if needed) as these modules won't do it for you. This is to allow you +control over your own system piece by piece in case you need to opt +out of certain components or change the Find behavior for a particular +module (perhaps because the default :module:`FindOpenGL` module doesn't +work with your system as an example). If you want to use a more +convenient module that includes everything, use the +:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules. + +Locate osgGA This module defines: + +``OSGGA_FOUND`` + Was osgGA found? +``OSGGA_INCLUDE_DIR`` + Where to find the headers +``OSGGA_LIBRARIES`` + The libraries to link against for the osgGA (use this) +``OSGGA_LIBRARY`` + The osgGA library +``OSGGA_LIBRARY_DEBUG`` + The osgGA debug library + +``$OSGDIR`` is an environment variable that would correspond to:: + + ./configure --prefix=$OSGDIR + +used in building osg. + +Created by Eric Wing. +#]=======================================================================] + +# Header files are presumed to be included like +# #include +# #include + +include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake) +OSG_FIND_PATH (OSGGA osgGA/FlightManipulator) +OSG_FIND_LIBRARY(OSGGA osgGA) + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgGA DEFAULT_MSG + OSGGA_LIBRARY OSGGA_INCLUDE_DIR) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindosgIntrospection.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindosgIntrospection.cmake new file mode 100644 index 0000000000000000000000000000000000000000..c0c28f261b4d2e980e0795096b792b070b7d2925 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindosgIntrospection.cmake @@ -0,0 +1,53 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindosgIntrospection +-------------------- + + + +This is part of the ``Findosg*`` suite used to find OpenSceneGraph +components. Each component is separate and you must opt in to each +module. You must also opt into OpenGL and OpenThreads (and Producer +if needed) as these modules won't do it for you. This is to allow you +control over your own system piece by piece in case you need to opt +out of certain components or change the Find behavior for a particular +module (perhaps because the default :module:`FindOpenGL` module doesn't +work with your system as an example). If you want to use a more +convenient module that includes everything, use the +:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules. + +Locate osgINTROSPECTION This module defines: + +``OSGINTROSPECTION_FOUND`` + Was osgIntrospection found? +``OSGINTROSPECTION_INCLUDE_DIR`` + Where to find the headers +``OSGINTROSPECTION_LIBRARIES`` + The libraries to link for osgIntrospection (use this) +``OSGINTROSPECTION_LIBRARY`` + The osgIntrospection library +``OSGINTROSPECTION_LIBRARY_DEBUG`` + The osgIntrospection debug library + +``$OSGDIR`` is an environment variable that would correspond to:: + + ./configure --prefix=$OSGDIR + +used in building osg. + +Created by Eric Wing. +#]=======================================================================] + +# Header files are presumed to be included like +# #include +# #include + +include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake) +OSG_FIND_PATH (OSGINTROSPECTION osgIntrospection/Reflection) +OSG_FIND_LIBRARY(OSGINTROSPECTION osgIntrospection) + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgIntrospection DEFAULT_MSG + OSGINTROSPECTION_LIBRARY OSGINTROSPECTION_INCLUDE_DIR) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindosgPresentation.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindosgPresentation.cmake new file mode 100644 index 0000000000000000000000000000000000000000..e8c8b4fc71540e5ec7ef834b04885dd2c9e611a1 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindosgPresentation.cmake @@ -0,0 +1,53 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindosgPresentation +------------------- + + + +This is part of the ``Findosg*`` suite used to find OpenSceneGraph +components. Each component is separate and you must opt in to each +module. You must also opt into OpenGL and OpenThreads (and Producer +if needed) as these modules won't do it for you. This is to allow you +control over your own system piece by piece in case you need to opt +out of certain components or change the Find behavior for a particular +module (perhaps because the default :module:`FindOpenGL` module doesn't +work with your system as an example). If you want to use a more +convenient module that includes everything, use the +:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules. + +Locate osgPresentation This module defines: + +``OSGPRESENTATION_FOUND`` + Was osgPresentation found? +``OSGPRESENTATION_INCLUDE_DIR`` + Where to find the headers +``OSGPRESENTATION_LIBRARIES`` + The libraries to link for osgPresentation (use this) +``OSGPRESENTATION_LIBRARY`` + The osgPresentation library +``OSGPRESENTATION_LIBRARY_DEBUG`` + The osgPresentation debug library + +``$OSGDIR`` is an environment variable that would correspond to:: + + ./configure --prefix=$OSGDIR + +used in building osg. +Created by Eric Wing. Modified to work with osgPresentation by Robert +Osfield, January 2012. +#]=======================================================================] + +# Header files are presumed to be included like +# #include +# #include + +include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake) +OSG_FIND_PATH (OSGPRESENTATION osgPresentation/SlideEventHandler) +OSG_FIND_LIBRARY(OSGPRESENTATION osgPresentation) + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgPresentation DEFAULT_MSG + OSGPRESENTATION_LIBRARY OSGPRESENTATION_INCLUDE_DIR) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindosgSim.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindosgSim.cmake new file mode 100644 index 0000000000000000000000000000000000000000..37ef03c13185e7771cc9ef23619941e787b9c367 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindosgSim.cmake @@ -0,0 +1,53 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindosgSim +---------- + + + +This is part of the ``Findosg*`` suite used to find OpenSceneGraph +components. Each component is separate and you must opt in to each +module. You must also opt into OpenGL and OpenThreads (and Producer +if needed) as these modules won't do it for you. This is to allow you +control over your own system piece by piece in case you need to opt +out of certain components or change the Find behavior for a particular +module (perhaps because the default :module:`FindOpenGL` module doesn't +work with your system as an example). If you want to use a more +convenient module that includes everything, use the +:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules. + +Locate osgSim This module defines: + +``OSGSIM_FOUND`` + Was osgSim found? +``OSGSIM_INCLUDE_DIR`` + Where to find the headers +``OSGSIM_LIBRARIES`` + The libraries to link for osgSim (use this) +``OSGSIM_LIBRARY`` + The osgSim library +``OSGSIM_LIBRARY_DEBUG`` + The osgSim debug library + +``$OSGDIR`` is an environment variable that would correspond to:: + + ./configure --prefix=$OSGDIR + +used in building osg. + +Created by Eric Wing. +#]=======================================================================] + +# Header files are presumed to be included like +# #include +# #include + +include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake) +OSG_FIND_PATH (OSGSIM osgSim/ImpostorSprite) +OSG_FIND_LIBRARY(OSGSIM osgSim) + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgSim DEFAULT_MSG + OSGSIM_LIBRARY OSGSIM_INCLUDE_DIR) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindosgWidget.cmake b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindosgWidget.cmake new file mode 100644 index 0000000000000000000000000000000000000000..4049fada2f44d55dfc89e4adb8ab6e224752954f --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/FindosgWidget.cmake @@ -0,0 +1,54 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindosgWidget +------------- + + + +This is part of the ``Findosg*`` suite used to find OpenSceneGraph +components. Each component is separate and you must opt in to each +module. You must also opt into OpenGL and OpenThreads (and Producer +if needed) as these modules won't do it for you. This is to allow you +control over your own system piece by piece in case you need to opt +out of certain components or change the Find behavior for a particular +module (perhaps because the default :module:`FindOpenGL` module doesn't +work with your system as an example). If you want to use a more +convenient module that includes everything, use the +:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules. + +Locate osgWidget This module defines: + +``OSGWIDGET_FOUND`` + Was osgWidget found? +``OSGWIDGET_INCLUDE_DIR`` + Where to find the headers +``OSGWIDGET_LIBRARIES`` + The libraries to link for osgWidget (use this) +``OSGWIDGET_LIBRARY`` + The osgWidget library +``OSGWIDGET_LIBRARY_DEBUG`` + The osgWidget debug library + +``$OSGDIR`` is an environment variable that would correspond to:: + + ./configure --prefix=$OSGDIR + +used in building osg. + +FindosgWidget.cmake tweaked from Findosg* suite as created by Eric +Wing. +#]=======================================================================] + +# Header files are presumed to be included like +# #include +# #include + +include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake) +OSG_FIND_PATH (OSGWIDGET osgWidget/Widget) +OSG_FIND_LIBRARY(OSGWIDGET osgWidget) + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgWidget DEFAULT_MSG + OSGWIDGET_LIBRARY OSGWIDGET_INCLUDE_DIR) diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/SquishRunTestCase.bat b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/SquishRunTestCase.bat new file mode 100644 index 0000000000000000000000000000000000000000..5c5d388b033063bd834bffdf02186a1f197515d0 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/SquishRunTestCase.bat @@ -0,0 +1,11 @@ +echo 'Starting the squish server...' +start %1 + +echo 'Running the test case...' +%2 --testcase %3 --wrapper %4 --aut %5 +set result=%ERRORLEVEL% + +echo 'Stopping the squish server...' +%1 --stop + +exit \b %result% diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/TestForSTDNamespace.cxx b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/TestForSTDNamespace.cxx new file mode 100644 index 0000000000000000000000000000000000000000..b537d44a9338719fc009e4009c047692b5d53b24 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/TestForSTDNamespace.cxx @@ -0,0 +1,6 @@ +#include +int main(int, char*[]) +{ + std::list(); + return 0; +} diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Templates/MSBuild/FlagTables/v10_CSharp.json b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Templates/MSBuild/FlagTables/v10_CSharp.json new file mode 100644 index 0000000000000000000000000000000000000000..526bcdaedee1ccf989e2a776f55f3e9096c9bf87 --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Templates/MSBuild/FlagTables/v10_CSharp.json @@ -0,0 +1,542 @@ +[ + { + "name": "ProjectName", + "switch": "out:", + "comment": "", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "OutputType", + "switch": "target:exe", + "comment": "", + "value": "Exe", + "flags": [] + }, + { + "name": "OutputType", + "switch": "target:winexe", + "comment": "", + "value": "Winexe", + "flags": [] + }, + { + "name": "OutputType", + "switch": "target:library", + "comment": "", + "value": "Library", + "flags": [] + }, + { + "name": "OutputType", + "switch": "target:module", + "comment": "", + "value": "Module", + "flags": [] + }, + { + "name": "DocumentationFile", + "switch": "doc", + "comment": "", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "Platform", + "switch": "platform:x86", + "comment": "", + "value": "x86", + "flags": [] + }, + { + "name": "Platform", + "switch": "platform:Itanium", + "comment": "", + "value": "Itanium", + "flags": [] + }, + { + "name": "Platform", + "switch": "platform:x64", + "comment": "", + "value": "x64", + "flags": [] + }, + { + "name": "Platform", + "switch": "platform:arm", + "comment": "", + "value": "arm", + "flags": [] + }, + { + "name": "Platform", + "switch": "platform:anycpu32bitpreferred", + "comment": "", + "value": "anycpu32bitpreferred", + "flags": [] + }, + { + "name": "Platform", + "switch": "platform:anycpu", + "comment": "", + "value": "anycpu", + "flags": [] + }, + { + "name": "References", + "switch": "reference:", + "comment": "mit alias", + "value": "", + "flags": [] + }, + { + "name": "References", + "switch": "reference:", + "comment": "dateiliste", + "value": "", + "flags": [] + }, + { + "name": "AddModules", + "switch": "addmodule:", + "comment": "", + "value": "", + "flags": [ + "SemicolonAppendable" + ] + }, + { + "name": "Win32Resource", + "switch": "win32res:", + "comment": "", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "ApplicationIcon", + "switch": "win32icon:", + "comment": "", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "ApplicationManifest", + "switch": "win32manifest:", + "comment": "", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "NoWin32Manifest", + "switch": "nowin32manifest", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "DefineDebug", + "switch": "debug", + "comment": "", + "value": "true", + "flags": [ + "Continue" + ] + }, + { + "name": "DebugSymbols", + "switch": "debug", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "DebugSymbols", + "switch": "debug-", + "comment": "", + "value": "false", + "flags": [] + }, + { + "name": "DebugSymbols", + "switch": "debug+", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "DebugType", + "switch": "debug:none", + "comment": "", + "value": "none", + "flags": [] + }, + { + "name": "DebugType", + "switch": "debug:full", + "comment": "", + "value": "full", + "flags": [] + }, + { + "name": "DebugType", + "switch": "debug:pdbonly", + "comment": "", + "value": "pdbonly", + "flags": [] + }, + { + "name": "DebugType", + "switch": "debug:embedded", + "comment": "", + "value": "embedded", + "flags": [] + }, + { + "name": "Optimize", + "switch": "optimize", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "Optimize", + "switch": "optimize-", + "comment": "", + "value": "false", + "flags": [] + }, + { + "name": "Optimize", + "switch": "optimize+", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "TreatWarningsAsErrors", + "switch": "warnaserror", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "TreatWarningsAsErrors", + "switch": "warnaserror-", + "comment": "", + "value": "false", + "flags": [] + }, + { + "name": "TreatWarningsAsErrors", + "switch": "warnaserror+", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "WarningsAsErrors", + "switch": "warnaserror", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "WarningsAsErrors", + "switch": "warnaserror-", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "WarningsAsErrors", + "switch": "warnaserror+", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "warn:0", + "comment": "", + "value": "0", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "warn:1", + "comment": "", + "value": "1", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "warn:2", + "comment": "", + "value": "2", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "warn:3", + "comment": "", + "value": "3", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "warn:4", + "comment": "", + "value": "4", + "flags": [] + }, + { + "name": "NoWarn", + "switch": "nowarn:", + "comment": "", + "value": "", + "flags": [ + "UserValue", + "UserRequired", + "CommaAppendable" + ] + }, + { + "name": "CheckForOverflowUnderflow", + "switch": "checked", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "CheckForOverflowUnderflow", + "switch": "checked-", + "comment": "", + "value": "false", + "flags": [] + }, + { + "name": "CheckForOverflowUnderflow", + "switch": "checked+", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "AllowUnsafeBlocks", + "switch": "unsafe", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "AllowUnsafeBlocks", + "switch": "unsafe-", + "comment": "", + "value": "false", + "flags": [] + }, + { + "name": "AllowUnsafeBlocks", + "switch": "unsafe+", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "DefineConstants", + "switch": "define:", + "comment": "", + "value": "", + "flags": [ + "SemicolonAppendable", + "UserValue" + ] + }, + { + "name": "LangVersion", + "switch": "langversion:", + "comment": "", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "DelaySign", + "switch": "delaysign", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "DelaySign", + "switch": "delaysign-", + "comment": "", + "value": "false", + "flags": [] + }, + { + "name": "DelaySign", + "switch": "delaysign+", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "AssemblyOriginatorKeyFile", + "switch": "keyfile", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "KeyContainerName", + "switch": "keycontainer", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "NoLogo", + "switch": "nologo", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "NoConfig", + "switch": "noconfig", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "BaseAddress", + "switch": "baseaddress:", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "CodePage", + "switch": "codepage", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "Utf8Output", + "switch": "utf8output", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "MainEntryPoint", + "switch": "main:", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "GenerateFullPaths", + "switch": "fullpaths", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "FileAlignment", + "switch": "filealign", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "PdbFile", + "switch": "pdb:", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "NoStdLib", + "switch": "nostdlib", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "NoStdLib", + "switch": "nostdlib-", + "comment": "", + "value": "false", + "flags": [] + }, + { + "name": "NoStdLib", + "switch": "nostdlib+", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "SubsystemVersion", + "switch": "subsystemversion", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "AdditionalLibPaths", + "switch": "lib:", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "ErrorReport", + "switch": "errorreport:none", + "comment": "Do Not Send Report", + "value": "none", + "flags": [] + }, + { + "name": "ErrorReport", + "switch": "errorreport:prompt", + "comment": "Prompt Immediately", + "value": "prompt", + "flags": [] + }, + { + "name": "ErrorReport", + "switch": "errorreport:queue", + "comment": "Queue For Next Login", + "value": "queue", + "flags": [] + }, + { + "name": "ErrorReport", + "switch": "errorreport:send", + "comment": "Send Automatically", + "value": "send", + "flags": [] + } +] diff --git a/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Templates/MSBuild/FlagTables/v11_RC.json b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Templates/MSBuild/FlagTables/v11_RC.json new file mode 100644 index 0000000000000000000000000000000000000000..b8c0127d1bf3967d460bd80a7196c52650eb24fd --- /dev/null +++ b/openflamingo/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Templates/MSBuild/FlagTables/v11_RC.json @@ -0,0 +1,69 @@ +[ + { + "name": "IgnoreStandardIncludePath", + "switch": "X", + "comment": "Ignore Standard Include Paths", + "value": "true", + "flags": [] + }, + { + "name": "ShowProgress", + "switch": "v", + "comment": "Show Progress", + "value": "true", + "flags": [] + }, + { + "name": "SuppressStartupBanner", + "switch": "nologo", + "comment": "Suppress Startup Banner", + "value": "true", + "flags": [] + }, + { + "name": "NullTerminateStrings", + "switch": "n", + "comment": "Null Terminate Strings", + "value": "true", + "flags": [] + }, + { + "name": "PreprocessorDefinitions", + "switch": "D", + "comment": "Preprocessor Definitions", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "UndefinePreprocessorDefinitions", + "switch": "u", + "comment": "Undefine Preprocessor Definitions", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "AdditionalIncludeDirectories", + "switch": "I", + "comment": "Additional Include Directories", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "ResourceOutputFileName", + "switch": "fo", + "comment": "Resource File Name", + "value": "", + "flags": [ + "UserValue" + ] + } +]