diff --git a/build/vega-lite-schema.json b/build/vega-lite-schema.json index 2a4f6b65cf3..42981361ce0 100644 --- a/build/vega-lite-schema.json +++ b/build/vega-lite-schema.json @@ -1660,12 +1660,6 @@ ], "type": "object" }, - "BoxPlotUnitSpec": { - "$ref": "#/definitions/GenericUnitSpec<(BoxPlotEncoding),(BoxPlot|BoxPlotDef)>" - }, - "BoxPlotUnitSpecWithFacet": { - "$ref": "#/definitions/GenericUnitSpec<(BoxPlotEncodingWithFacet),(BoxPlot|BoxPlotDef)>" - }, "BrushConfig": { "additionalProperties": false, "properties": { @@ -1730,29 +1724,29 @@ "ColorValueDefWithCondition": { "$ref": "#/definitions/ValueDefWithCondition" }, - "CompositeMarkUnitSpec": { + "CompositeMark": { "anyOf": [ { - "$ref": "#/definitions/ErrorBarUnitSpec" + "$ref": "#/definitions/BoxPlot" }, { - "$ref": "#/definitions/ErrorBandUnitSpec" + "$ref": "#/definitions/ErrorBar" }, { - "$ref": "#/definitions/BoxPlotUnitSpec" + "$ref": "#/definitions/ErrorBand" } ] }, - "CompositeMarkUnitSpecWithFacet": { + "CompositeMarkDef": { "anyOf": [ { - "$ref": "#/definitions/ErrorBarUnitSpecWithFacet" + "$ref": "#/definitions/BoxPlotDef" }, { - "$ref": "#/definitions/ErrorBandUnitSpecWithFacet" + "$ref": "#/definitions/ErrorBarDef" }, { - "$ref": "#/definitions/BoxPlotUnitSpecWithFacet" + "$ref": "#/definitions/ErrorBandDef" } ] }, @@ -3570,12 +3564,6 @@ ], "type": "object" }, - "ErrorBandUnitSpec": { - "$ref": "#/definitions/GenericUnitSpec<(ErrorEncoding),(ErrorBand|ErrorBandDef)>" - }, - "ErrorBandUnitSpecWithFacet": { - "$ref": "#/definitions/GenericUnitSpec<(ErrorEncodingWithFacet),(ErrorBand|ErrorBandDef)>" - }, "ErrorBar": { "enum": [ "errorbar" @@ -3674,11 +3662,55 @@ ], "type": "string" }, - "ErrorBarUnitSpec": { - "$ref": "#/definitions/GenericUnitSpec<(ErrorEncoding),(ErrorBar|ErrorBarDef)>" - }, - "ErrorBarUnitSpecWithFacet": { - "$ref": "#/definitions/GenericUnitSpec<(ErrorEncodingWithFacet),(ErrorBar|ErrorBarDef)>" + "ErrorExtraEncoding": { + "additionalProperties": false, + "properties": { + "xError": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/NumberValueDef" + } + ], + "description": "Error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + }, + "xError2": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/NumberValueDef" + } + ], + "description": "Secondary error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + }, + "yError": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/NumberValueDef" + } + ], + "description": "Error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + }, + "yError2": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/NumberValueDef" + } + ], + "description": "Secondary error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + } + }, + "type": "object" }, "EventStream": { }, @@ -3761,25 +3793,11 @@ "type": "object" }, "ExtendedUnitSpec": { - "anyOf": [ - { - "$ref": "#/definitions/NormalizedUnitSpec" - }, - { - "$ref": "#/definitions/CompositeMarkUnitSpec" - } - ], + "$ref": "#/definitions/GenericUnitSpec<(Encoding&CompositeExtraEncoding),(Mark|MarkDef|CompositeMark|CompositeMarkDef)>", "description": "Unit spec that can be normalized/expanded into a layer spec or another unit spec." }, "ExtendedUnitSpecWithFacet": { - "anyOf": [ - { - "$ref": "#/definitions/NormalizedUnitSpecWithFacet" - }, - { - "$ref": "#/definitions/CompositeMarkUnitSpecWithFacet" - } - ], + "$ref": "#/definitions/GenericUnitSpec<(Encoding&CompositeExtraEncodingWithFacet),(Mark|MarkDef|CompositeMark|CompositeMarkDef)>", "description": "Unit spec that can be normalized/expanded into a layer spec or another unit spec." }, "FacetFieldDef": { @@ -5072,7 +5090,7 @@ ], "description": "Any specification in Vega-Lite." }, - "GenericUnitSpec<(BoxPlotEncoding),(BoxPlot|BoxPlotDef)>": { + "GenericUnitSpec<(Encoding&CompositeExtraEncoding),(Mark|MarkDef|CompositeMark|CompositeMarkDef)>": { "additionalProperties": false, "description": "Base interface for a unit (single-view) specification.", "properties": { @@ -5113,18 +5131,18 @@ ], "description": "Additional levels of detail for grouping data in aggregate views and\nin line, trail, and area marks without mapping data to a specific visual channel." }, - "opacity": { + "fill": { "anyOf": [ { - "$ref": "#/definitions/NumericFieldDefWithCondition" + "$ref": "#/definitions/ColorFieldDefWithCondition" }, { - "$ref": "#/definitions/NumericValueDefWithCondition" + "$ref": "#/definitions/ColorValueDefWithCondition" } ], - "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)'s `opacity` property." + "description": "Fill color of the marks.\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_ When using `fill` channel, `color ` channel will be ignored. To customize both fill and stroke, please use `fill` and `stroke` channels (not `fill` and `color`)." }, - "size": { + "fillOpacity": { "anyOf": [ { "$ref": "#/definitions/NumericFieldDefWithCondition" @@ -5133,149 +5151,79 @@ "$ref": "#/definitions/NumericValueDefWithCondition" } ], - "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)" + "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)'s `fillOpacity` property." }, - "x": { + "href": { "anyOf": [ { - "$ref": "#/definitions/PositionFieldDef" + "$ref": "#/definitions/StringFieldDefWithCondition" }, { - "$ref": "#/definitions/XValueDef" + "$ref": "#/definitions/StringValueDefWithCondition" } ], - "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"`." + "description": "A URL to load upon mouse click." }, - "y": { + "key": { + "$ref": "#/definitions/FieldDef", + "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/LatLongFieldDef", + "description": "Latitude position of geographically projected marks." + }, + "latitude2": { + "$ref": "#/definitions/SecondaryFieldDef", + "description": "Latitude-2 position for geographically projected ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`." + }, + "longitude": { + "$ref": "#/definitions/LatLongFieldDef", + "description": "Longitude position of geographically projected marks." + }, + "longitude2": { + "$ref": "#/definitions/SecondaryFieldDef", + "description": "Longitude-2 position for geographically projected ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`." + }, + "opacity": { "anyOf": [ { - "$ref": "#/definitions/PositionFieldDef" + "$ref": "#/definitions/NumericFieldDefWithCondition" }, { - "$ref": "#/definitions/YValueDef" + "$ref": "#/definitions/NumericValueDefWithCondition" } ], - "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"`." - } - }, - "required": [ - "color", - "detail", - "opacity", - "size", - "x", - "y" - ], - "type": "object" - }, - "height": { - "description": "The height of a visualization.\n\n__Default value:__\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its y-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For y-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the height is [determined by the range step, paddings, and the cardinality of the field mapped to y-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`.\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.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.", - "type": "number" - }, - "mark": { - "anyOf": [ - { - "$ref": "#/definitions/BoxPlot" - }, - { - "$ref": "#/definitions/BoxPlotDef" - } - ], - "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n`\"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" - }, - "projection": { - "$ref": "#/definitions/Projection", - "description": "An object defining properties of geographic projection, which will be applied to `shape` path for `\"geoshape\"` marks\nand to `latitude` and `\"longitude\"` channels for other marks." - }, - "selection": { - "additionalProperties": { - "$ref": "#/definitions/SelectionDef" - }, - "description": "A key-value mapping between selection names and definitions.", - "type": "object" - }, - "title": { - "anyOf": [ - { - "type": "string" + "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)'s `opacity` property." }, - { - "$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": { - "description": "The width of a visualization.\n\n__Default value:__ This will be determined by the following rules:\n\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its x-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For x-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the width is [determined by the range step, paddings, and the cardinality of the field mapped to x-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `x` channel, the `width` will be the value of [`config.scale.textXRangeStep`](https://vega.github.io/vega-lite/docs/size.html#default-width-and-height) for `text` mark and the value of `rangeStep` for other marks.\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.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.", - "type": "number" - } - }, - "required": [ - "mark" - ], - "type": "object" - }, - "GenericUnitSpec<(BoxPlotEncodingWithFacet),(BoxPlot|BoxPlotDef)>": { - "additionalProperties": false, - "description": "Base interface for a unit (single-view) specification.", - "properties": { - "data": { - "$ref": "#/definitions/Data", - "description": "An object describing the data source" - }, - "description": { - "description": "Description of this mark for commenting purpose.", - "type": "string" - }, - "encoding": { - "additionalProperties": false, - "description": "A key-value mapping between encoding channels and definition of fields.", - "properties": { - "color": { + "order": { "anyOf": [ { - "$ref": "#/definitions/ColorFieldDefWithCondition" + "$ref": "#/definitions/OrderFieldDef" }, { - "$ref": "#/definitions/ColorValueDefWithCondition" + "items": { + "$ref": "#/definitions/OrderFieldDef" + }, + "type": "array" + }, + { + "$ref": "#/definitions/NumberValueDef" } ], - "description": "Color of the marks – either fill or stroke color based on the `filled` property of mark definition.\nBy default, `color` represents fill color for `\"area\"`, `\"bar\"`, `\"tick\"`,\n`\"text\"`, `\"trail\"`, `\"circle\"`, and `\"square\"` / stroke color for `\"line\"` and `\"point\"`.\n\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_\n1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. If either `fill` or `stroke` channel is specified, `color` channel will be ignored.\n2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme)." - }, - "column": { - "$ref": "#/definitions/FacetFieldDef", - "description": "Horizontal facets for trellis plots." + "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." }, - "detail": { + "shape": { "anyOf": [ { - "$ref": "#/definitions/FieldDef" + "$ref": "#/definitions/ShapeFieldDefWithCondition" }, { - "items": { - "$ref": "#/definitions/FieldDef" - }, - "type": "array" + "$ref": "#/definitions/ShapeValueDefWithCondition" } ], - "description": "Additional levels of detail for grouping data in aggregate views and\nin line, trail, and area marks without mapping data to a specific visual channel." + "description": "For `point` marks the supported values are\n`\"circle\"` (default), `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`,\nor `\"triangle-down\"`, or else a custom SVG path string.\nFor `geoshape` marks it should be a field definition of the geojson data\n\n__Default value:__ If undefined, the default shape depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#point-config)'s `shape` property." }, - "opacity": { + "size": { "anyOf": [ { "$ref": "#/definitions/NumericFieldDefWithCondition" @@ -5284,13 +5232,20 @@ "$ref": "#/definitions/NumericValueDefWithCondition" } ], - "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)'s `opacity` property." + "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)" }, - "row": { - "$ref": "#/definitions/FacetFieldDef", - "description": "Vertical facets for trellis plots." + "stroke": { + "anyOf": [ + { + "$ref": "#/definitions/ColorFieldDefWithCondition" + }, + { + "$ref": "#/definitions/ColorValueDefWithCondition" + } + ], + "description": "Stroke color of the marks.\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_ When using `stroke` channel, `color ` channel will be ignored. To customize both stroke and fill, please use `stroke` and `fill` channels (not `stroke` and `color`)." }, - "size": { + "strokeOpacity": { "anyOf": [ { "$ref": "#/definitions/NumericFieldDefWithCondition" @@ -5299,41 +5254,141 @@ "$ref": "#/definitions/NumericValueDefWithCondition" } ], - "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)" + "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)'s `strokeOpacity` property." }, - "x": { + "strokeWidth": { "anyOf": [ { - "$ref": "#/definitions/PositionFieldDef" + "$ref": "#/definitions/NumericFieldDefWithCondition" }, { - "$ref": "#/definitions/XValueDef" + "$ref": "#/definitions/NumericValueDefWithCondition" } ], - "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"`." + "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)'s `strokeWidth` property." }, - "y": { + "text": { "anyOf": [ { - "$ref": "#/definitions/PositionFieldDef" + "$ref": "#/definitions/TextFieldDefWithCondition" }, { - "$ref": "#/definitions/YValueDef" + "$ref": "#/definitions/TextValueDefWithCondition" } ], - "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"`." - } - }, - "required": [ - "color", - "detail", - "opacity", - "size", - "x", - "y" - ], - "type": "object" - }, + "description": "Text of the `text` mark." + }, + "tooltip": { + "anyOf": [ + { + "$ref": "#/definitions/TextFieldDefWithCondition" + }, + { + "$ref": "#/definitions/TextValueDefWithCondition" + }, + { + "items": { + "$ref": "#/definitions/TextFieldDef" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "description": "The tooltip text to show upon mouse hover." + }, + "x": { + "anyOf": [ + { + "$ref": "#/definitions/PositionFieldDef" + }, + { + "$ref": "#/definitions/XValueDef" + } + ], + "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"`." + }, + "x2": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/XValueDef" + } + ], + "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"`." + }, + "xError": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/NumberValueDef" + } + ], + "description": "Error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + }, + "xError2": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/NumberValueDef" + } + ], + "description": "Secondary error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + }, + "y": { + "anyOf": [ + { + "$ref": "#/definitions/PositionFieldDef" + }, + { + "$ref": "#/definitions/YValueDef" + } + ], + "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"`." + }, + "y2": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/YValueDef" + } + ], + "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"`." + }, + "yError": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/NumberValueDef" + } + ], + "description": "Error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + }, + "yError2": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/NumberValueDef" + } + ], + "description": "Secondary error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + } + }, + "type": "object" + }, "height": { "description": "The height of a visualization.\n\n__Default value:__\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its y-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For y-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the height is [determined by the range step, paddings, and the cardinality of the field mapped to y-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`.\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.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.", "type": "number" @@ -5341,10 +5396,16 @@ "mark": { "anyOf": [ { - "$ref": "#/definitions/BoxPlot" + "$ref": "#/definitions/Mark" + }, + { + "$ref": "#/definitions/MarkDef" + }, + { + "$ref": "#/definitions/CompositeMark" }, { - "$ref": "#/definitions/BoxPlotDef" + "$ref": "#/definitions/CompositeMarkDef" } ], "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n`\"area\"`, `\"point\"`, `\"rule\"`, `\"geoshape\"`, and `\"text\"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def)." @@ -5396,7 +5457,7 @@ ], "type": "object" }, - "GenericUnitSpec<(Encoding),(Mark|MarkDef)>": { + "GenericUnitSpec<(Encoding&CompositeExtraEncodingWithFacet),(Mark|MarkDef|CompositeMark|CompositeMarkDef)>": { "additionalProperties": false, "description": "Base interface for a unit (single-view) specification.", "properties": { @@ -5423,6 +5484,10 @@ ], "description": "Color of the marks – either fill or stroke color based on the `filled` property of mark definition.\nBy default, `color` represents fill color for `\"area\"`, `\"bar\"`, `\"tick\"`,\n`\"text\"`, `\"trail\"`, `\"circle\"`, and `\"square\"` / stroke color for `\"line\"` and `\"point\"`.\n\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_\n1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. If either `fill` or `stroke` channel is specified, `color` channel will be ignored.\n2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme)." }, + "column": { + "$ref": "#/definitions/FacetFieldDef", + "description": "Horizontal facets for trellis plots." + }, "detail": { "anyOf": [ { @@ -5518,6 +5583,10 @@ ], "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." }, + "row": { + "$ref": "#/definitions/FacetFieldDef", + "description": "Vertical facets for trellis plots." + }, "shape": { "anyOf": [ { @@ -5626,6 +5695,28 @@ ], "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"`." }, + "xError": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/NumberValueDef" + } + ], + "description": "Error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + }, + "xError2": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/NumberValueDef" + } + ], + "description": "Secondary error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + }, "y": { "anyOf": [ { @@ -5647,6 +5738,28 @@ } ], "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"`." + }, + "yError": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/NumberValueDef" + } + ], + "description": "Error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + }, + "yError2": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/NumberValueDef" + } + ], + "description": "Secondary error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." } }, "type": "object" @@ -5662,6 +5775,12 @@ }, { "$ref": "#/definitions/MarkDef" + }, + { + "$ref": "#/definitions/CompositeMark" + }, + { + "$ref": "#/definitions/CompositeMarkDef" } ], "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n`\"area\"`, `\"point\"`, `\"rule\"`, `\"geoshape\"`, and `\"text\"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def)." @@ -5713,10 +5832,22 @@ ], "type": "object" }, - "GenericUnitSpec<(EncodingWithFacet),(Mark|MarkDef)>": { + "VConcatSpec": { "additionalProperties": false, - "description": "Base interface for a unit (single-view) specification.", + "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": { "$ref": "#/definitions/Data", "description": "An object describing the data source" @@ -5725,1231 +5856,22 @@ "description": "Description of this mark for commenting purpose.", "type": "string" }, - "encoding": { - "additionalProperties": false, - "description": "A key-value mapping between encoding channels and definition of fields.", - "properties": { - "color": { - "anyOf": [ - { - "$ref": "#/definitions/ColorFieldDefWithCondition" - }, - { - "$ref": "#/definitions/ColorValueDefWithCondition" - } - ], - "description": "Color of the marks – either fill or stroke color based on the `filled` property of mark definition.\nBy default, `color` represents fill color for `\"area\"`, `\"bar\"`, `\"tick\"`,\n`\"text\"`, `\"trail\"`, `\"circle\"`, and `\"square\"` / stroke color for `\"line\"` and `\"point\"`.\n\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_\n1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. If either `fill` or `stroke` channel is specified, `color` channel will be ignored.\n2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme)." - }, - "column": { - "$ref": "#/definitions/FacetFieldDef", - "description": "Horizontal facets for trellis plots." - }, - "detail": { - "anyOf": [ - { - "$ref": "#/definitions/FieldDef" - }, - { - "items": { - "$ref": "#/definitions/FieldDef" - }, - "type": "array" - } - ], - "description": "Additional levels of detail for grouping data in aggregate views and\nin line, trail, and area marks without mapping data to a specific visual channel." - }, - "fill": { - "anyOf": [ - { - "$ref": "#/definitions/ColorFieldDefWithCondition" - }, - { - "$ref": "#/definitions/ColorValueDefWithCondition" - } - ], - "description": "Fill color of the marks.\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_ When using `fill` channel, `color ` channel will be ignored. To customize both fill and stroke, please use `fill` and `stroke` channels (not `fill` and `color`)." - }, - "fillOpacity": { - "anyOf": [ - { - "$ref": "#/definitions/NumericFieldDefWithCondition" - }, - { - "$ref": "#/definitions/NumericValueDefWithCondition" - } - ], - "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)'s `fillOpacity` property." - }, - "href": { - "anyOf": [ - { - "$ref": "#/definitions/StringFieldDefWithCondition" - }, - { - "$ref": "#/definitions/StringValueDefWithCondition" - } - ], - "description": "A URL to load upon mouse click." - }, - "key": { - "$ref": "#/definitions/FieldDef", - "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/LatLongFieldDef", - "description": "Latitude position of geographically projected marks." - }, - "latitude2": { - "$ref": "#/definitions/SecondaryFieldDef", - "description": "Latitude-2 position for geographically projected ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`." - }, - "longitude": { - "$ref": "#/definitions/LatLongFieldDef", - "description": "Longitude position of geographically projected marks." - }, - "longitude2": { - "$ref": "#/definitions/SecondaryFieldDef", - "description": "Longitude-2 position for geographically projected ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`." - }, - "opacity": { - "anyOf": [ - { - "$ref": "#/definitions/NumericFieldDefWithCondition" - }, - { - "$ref": "#/definitions/NumericValueDefWithCondition" - } - ], - "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)'s `opacity` property." - }, - "order": { - "anyOf": [ - { - "$ref": "#/definitions/OrderFieldDef" - }, - { - "items": { - "$ref": "#/definitions/OrderFieldDef" - }, - "type": "array" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "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." - }, - "row": { - "$ref": "#/definitions/FacetFieldDef", - "description": "Vertical facets for trellis plots." - }, - "shape": { - "anyOf": [ - { - "$ref": "#/definitions/ShapeFieldDefWithCondition" - }, - { - "$ref": "#/definitions/ShapeValueDefWithCondition" - } - ], - "description": "For `point` marks the supported values are\n`\"circle\"` (default), `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`,\nor `\"triangle-down\"`, or else a custom SVG path string.\nFor `geoshape` marks it should be a field definition of the geojson data\n\n__Default value:__ If undefined, the default shape depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#point-config)'s `shape` property." - }, - "size": { - "anyOf": [ - { - "$ref": "#/definitions/NumericFieldDefWithCondition" - }, - { - "$ref": "#/definitions/NumericValueDefWithCondition" - } - ], - "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": { - "anyOf": [ - { - "$ref": "#/definitions/ColorFieldDefWithCondition" - }, - { - "$ref": "#/definitions/ColorValueDefWithCondition" - } - ], - "description": "Stroke color of the marks.\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_ When using `stroke` channel, `color ` channel will be ignored. To customize both stroke and fill, please use `stroke` and `fill` channels (not `stroke` and `color`)." - }, - "strokeOpacity": { - "anyOf": [ - { - "$ref": "#/definitions/NumericFieldDefWithCondition" - }, - { - "$ref": "#/definitions/NumericValueDefWithCondition" - } - ], - "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)'s `strokeOpacity` property." - }, - "strokeWidth": { - "anyOf": [ - { - "$ref": "#/definitions/NumericFieldDefWithCondition" - }, - { - "$ref": "#/definitions/NumericValueDefWithCondition" - } - ], - "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)'s `strokeWidth` property." - }, - "text": { - "anyOf": [ - { - "$ref": "#/definitions/TextFieldDefWithCondition" - }, - { - "$ref": "#/definitions/TextValueDefWithCondition" - } - ], - "description": "Text of the `text` mark." - }, - "tooltip": { - "anyOf": [ - { - "$ref": "#/definitions/TextFieldDefWithCondition" - }, - { - "$ref": "#/definitions/TextValueDefWithCondition" - }, - { - "items": { - "$ref": "#/definitions/TextFieldDef" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "description": "The tooltip text to show upon mouse hover." - }, - "x": { - "anyOf": [ - { - "$ref": "#/definitions/PositionFieldDef" - }, - { - "$ref": "#/definitions/XValueDef" - } - ], - "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"`." - }, - "x2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/XValueDef" - } - ], - "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"`." - }, - "y": { - "anyOf": [ - { - "$ref": "#/definitions/PositionFieldDef" - }, - { - "$ref": "#/definitions/YValueDef" - } - ], - "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"`." - }, - "y2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/YValueDef" - } - ], - "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"`." - } - }, - "type": "object" - }, - "height": { - "description": "The height of a visualization.\n\n__Default value:__\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its y-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For y-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the height is [determined by the range step, paddings, and the cardinality of the field mapped to y-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`.\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.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.", - "type": "number" - }, - "mark": { - "anyOf": [ - { - "$ref": "#/definitions/Mark" - }, - { - "$ref": "#/definitions/MarkDef" - } - ], - "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n`\"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" - }, - "projection": { - "$ref": "#/definitions/Projection", - "description": "An object defining properties of geographic projection, which will be applied to `shape` path for `\"geoshape\"` marks\nand to `latitude` and `\"longitude\"` channels for other marks." - }, - "selection": { - "additionalProperties": { - "$ref": "#/definitions/SelectionDef" - }, - "description": "A key-value mapping between selection names and definitions.", - "type": "object" - }, - "title": { - "anyOf": [ - { - "type": "string" - }, - { - "$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": { - "description": "The width of a visualization.\n\n__Default value:__ This will be determined by the following rules:\n\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its x-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For x-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the width is [determined by the range step, paddings, and the cardinality of the field mapped to x-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `x` channel, the `width` will be the value of [`config.scale.textXRangeStep`](https://vega.github.io/vega-lite/docs/size.html#default-width-and-height) for `text` mark and the value of `rangeStep` for other marks.\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.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.", - "type": "number" - } - }, - "required": [ - "mark" - ], - "type": "object" - }, - "GenericUnitSpec<(ErrorEncoding),(ErrorBand|ErrorBandDef)>": { - "additionalProperties": false, - "description": "Base interface for a unit (single-view) specification.", - "properties": { - "data": { - "$ref": "#/definitions/Data", - "description": "An object describing the data source" - }, - "description": { - "description": "Description of this mark for commenting purpose.", - "type": "string" - }, - "encoding": { - "additionalProperties": false, - "description": "A key-value mapping between encoding channels and definition of fields.", - "properties": { - "color": { - "anyOf": [ - { - "$ref": "#/definitions/ColorFieldDefWithCondition" - }, - { - "$ref": "#/definitions/ColorValueDefWithCondition" - } - ], - "description": "Color of the marks – either fill or stroke color based on the `filled` property of mark definition.\nBy default, `color` represents fill color for `\"area\"`, `\"bar\"`, `\"tick\"`,\n`\"text\"`, `\"trail\"`, `\"circle\"`, and `\"square\"` / stroke color for `\"line\"` and `\"point\"`.\n\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_\n1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. If either `fill` or `stroke` channel is specified, `color` channel will be ignored.\n2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme)." - }, - "detail": { - "anyOf": [ - { - "$ref": "#/definitions/FieldDef" - }, - { - "items": { - "$ref": "#/definitions/FieldDef" - }, - "type": "array" - } - ], - "description": "Additional levels of detail for grouping data in aggregate views and\nin line, trail, and area marks without mapping data to a specific visual channel." - }, - "opacity": { - "anyOf": [ - { - "$ref": "#/definitions/NumericFieldDefWithCondition" - }, - { - "$ref": "#/definitions/NumericValueDefWithCondition" - } - ], - "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)'s `opacity` property." - }, - "x": { - "anyOf": [ - { - "$ref": "#/definitions/PositionFieldDef" - }, - { - "$ref": "#/definitions/XValueDef" - } - ], - "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"`." - }, - "x2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/XValueDef" - } - ], - "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"`." - }, - "xError": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - }, - "xError2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Secondary error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - }, - "y": { - "anyOf": [ - { - "$ref": "#/definitions/PositionFieldDef" - }, - { - "$ref": "#/definitions/YValueDef" - } - ], - "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"`." - }, - "y2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/YValueDef" - } - ], - "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"`." - }, - "yError": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - }, - "yError2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Secondary error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - } - }, - "required": [ - "color", - "detail", - "opacity", - "x", - "x2", - "y", - "y2" - ], - "type": "object" - }, - "height": { - "description": "The height of a visualization.\n\n__Default value:__\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its y-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For y-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the height is [determined by the range step, paddings, and the cardinality of the field mapped to y-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`.\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.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.", - "type": "number" - }, - "mark": { - "anyOf": [ - { - "$ref": "#/definitions/ErrorBand" - }, - { - "$ref": "#/definitions/ErrorBandDef" - } - ], - "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n`\"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" - }, - "projection": { - "$ref": "#/definitions/Projection", - "description": "An object defining properties of geographic projection, which will be applied to `shape` path for `\"geoshape\"` marks\nand to `latitude` and `\"longitude\"` channels for other marks." - }, - "selection": { - "additionalProperties": { - "$ref": "#/definitions/SelectionDef" - }, - "description": "A key-value mapping between selection names and definitions.", - "type": "object" - }, - "title": { - "anyOf": [ - { - "type": "string" - }, - { - "$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": { - "description": "The width of a visualization.\n\n__Default value:__ This will be determined by the following rules:\n\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its x-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For x-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the width is [determined by the range step, paddings, and the cardinality of the field mapped to x-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `x` channel, the `width` will be the value of [`config.scale.textXRangeStep`](https://vega.github.io/vega-lite/docs/size.html#default-width-and-height) for `text` mark and the value of `rangeStep` for other marks.\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.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.", - "type": "number" - } - }, - "required": [ - "mark" - ], - "type": "object" - }, - "GenericUnitSpec<(ErrorEncoding),(ErrorBar|ErrorBarDef)>": { - "additionalProperties": false, - "description": "Base interface for a unit (single-view) specification.", - "properties": { - "data": { - "$ref": "#/definitions/Data", - "description": "An object describing the data source" - }, - "description": { - "description": "Description of this mark for commenting purpose.", - "type": "string" - }, - "encoding": { - "additionalProperties": false, - "description": "A key-value mapping between encoding channels and definition of fields.", - "properties": { - "color": { - "anyOf": [ - { - "$ref": "#/definitions/ColorFieldDefWithCondition" - }, - { - "$ref": "#/definitions/ColorValueDefWithCondition" - } - ], - "description": "Color of the marks – either fill or stroke color based on the `filled` property of mark definition.\nBy default, `color` represents fill color for `\"area\"`, `\"bar\"`, `\"tick\"`,\n`\"text\"`, `\"trail\"`, `\"circle\"`, and `\"square\"` / stroke color for `\"line\"` and `\"point\"`.\n\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_\n1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. If either `fill` or `stroke` channel is specified, `color` channel will be ignored.\n2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme)." - }, - "detail": { - "anyOf": [ - { - "$ref": "#/definitions/FieldDef" - }, - { - "items": { - "$ref": "#/definitions/FieldDef" - }, - "type": "array" - } - ], - "description": "Additional levels of detail for grouping data in aggregate views and\nin line, trail, and area marks without mapping data to a specific visual channel." - }, - "opacity": { - "anyOf": [ - { - "$ref": "#/definitions/NumericFieldDefWithCondition" - }, - { - "$ref": "#/definitions/NumericValueDefWithCondition" - } - ], - "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)'s `opacity` property." - }, - "x": { - "anyOf": [ - { - "$ref": "#/definitions/PositionFieldDef" - }, - { - "$ref": "#/definitions/XValueDef" - } - ], - "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"`." - }, - "x2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/XValueDef" - } - ], - "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"`." - }, - "xError": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - }, - "xError2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Secondary error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - }, - "y": { - "anyOf": [ - { - "$ref": "#/definitions/PositionFieldDef" - }, - { - "$ref": "#/definitions/YValueDef" - } - ], - "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"`." - }, - "y2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/YValueDef" - } - ], - "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"`." - }, - "yError": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - }, - "yError2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Secondary error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - } - }, - "required": [ - "color", - "detail", - "opacity", - "x", - "x2", - "y", - "y2" - ], - "type": "object" - }, - "height": { - "description": "The height of a visualization.\n\n__Default value:__\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its y-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For y-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the height is [determined by the range step, paddings, and the cardinality of the field mapped to y-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`.\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.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.", - "type": "number" - }, - "mark": { - "anyOf": [ - { - "$ref": "#/definitions/ErrorBar" - }, - { - "$ref": "#/definitions/ErrorBarDef" - } - ], - "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n`\"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" - }, - "projection": { - "$ref": "#/definitions/Projection", - "description": "An object defining properties of geographic projection, which will be applied to `shape` path for `\"geoshape\"` marks\nand to `latitude` and `\"longitude\"` channels for other marks." - }, - "selection": { - "additionalProperties": { - "$ref": "#/definitions/SelectionDef" - }, - "description": "A key-value mapping between selection names and definitions.", - "type": "object" - }, - "title": { - "anyOf": [ - { - "type": "string" - }, - { - "$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": { - "description": "The width of a visualization.\n\n__Default value:__ This will be determined by the following rules:\n\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its x-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For x-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the width is [determined by the range step, paddings, and the cardinality of the field mapped to x-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `x` channel, the `width` will be the value of [`config.scale.textXRangeStep`](https://vega.github.io/vega-lite/docs/size.html#default-width-and-height) for `text` mark and the value of `rangeStep` for other marks.\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.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.", - "type": "number" - } - }, - "required": [ - "mark" - ], - "type": "object" - }, - "GenericUnitSpec<(ErrorEncodingWithFacet),(ErrorBand|ErrorBandDef)>": { - "additionalProperties": false, - "description": "Base interface for a unit (single-view) specification.", - "properties": { - "data": { - "$ref": "#/definitions/Data", - "description": "An object describing the data source" - }, - "description": { - "description": "Description of this mark for commenting purpose.", - "type": "string" - }, - "encoding": { - "additionalProperties": false, - "description": "A key-value mapping between encoding channels and definition of fields.", - "properties": { - "color": { - "anyOf": [ - { - "$ref": "#/definitions/ColorFieldDefWithCondition" - }, - { - "$ref": "#/definitions/ColorValueDefWithCondition" - } - ], - "description": "Color of the marks – either fill or stroke color based on the `filled` property of mark definition.\nBy default, `color` represents fill color for `\"area\"`, `\"bar\"`, `\"tick\"`,\n`\"text\"`, `\"trail\"`, `\"circle\"`, and `\"square\"` / stroke color for `\"line\"` and `\"point\"`.\n\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_\n1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. If either `fill` or `stroke` channel is specified, `color` channel will be ignored.\n2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme)." - }, - "column": { - "$ref": "#/definitions/FacetFieldDef", - "description": "Horizontal facets for trellis plots." - }, - "detail": { - "anyOf": [ - { - "$ref": "#/definitions/FieldDef" - }, - { - "items": { - "$ref": "#/definitions/FieldDef" - }, - "type": "array" - } - ], - "description": "Additional levels of detail for grouping data in aggregate views and\nin line, trail, and area marks without mapping data to a specific visual channel." - }, - "opacity": { - "anyOf": [ - { - "$ref": "#/definitions/NumericFieldDefWithCondition" - }, - { - "$ref": "#/definitions/NumericValueDefWithCondition" - } - ], - "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)'s `opacity` property." - }, - "row": { - "$ref": "#/definitions/FacetFieldDef", - "description": "Vertical facets for trellis plots." - }, - "x": { - "anyOf": [ - { - "$ref": "#/definitions/PositionFieldDef" - }, - { - "$ref": "#/definitions/XValueDef" - } - ], - "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"`." - }, - "x2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/XValueDef" - } - ], - "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"`." - }, - "xError": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - }, - "xError2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Secondary error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - }, - "y": { - "anyOf": [ - { - "$ref": "#/definitions/PositionFieldDef" - }, - { - "$ref": "#/definitions/YValueDef" - } - ], - "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"`." - }, - "y2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/YValueDef" - } - ], - "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"`." - }, - "yError": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - }, - "yError2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Secondary error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - } - }, - "required": [ - "color", - "detail", - "opacity", - "x", - "x2", - "y", - "y2" - ], - "type": "object" - }, - "height": { - "description": "The height of a visualization.\n\n__Default value:__\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its y-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For y-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the height is [determined by the range step, paddings, and the cardinality of the field mapped to y-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`.\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.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.", - "type": "number" - }, - "mark": { - "anyOf": [ - { - "$ref": "#/definitions/ErrorBand" - }, - { - "$ref": "#/definitions/ErrorBandDef" - } - ], - "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n`\"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" - }, - "projection": { - "$ref": "#/definitions/Projection", - "description": "An object defining properties of geographic projection, which will be applied to `shape` path for `\"geoshape\"` marks\nand to `latitude` and `\"longitude\"` channels for other marks." - }, - "selection": { - "additionalProperties": { - "$ref": "#/definitions/SelectionDef" - }, - "description": "A key-value mapping between selection names and definitions.", - "type": "object" - }, - "title": { - "anyOf": [ - { - "type": "string" - }, - { - "$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": { - "description": "The width of a visualization.\n\n__Default value:__ This will be determined by the following rules:\n\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its x-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For x-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the width is [determined by the range step, paddings, and the cardinality of the field mapped to x-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `x` channel, the `width` will be the value of [`config.scale.textXRangeStep`](https://vega.github.io/vega-lite/docs/size.html#default-width-and-height) for `text` mark and the value of `rangeStep` for other marks.\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.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.", - "type": "number" - } - }, - "required": [ - "mark" - ], - "type": "object" - }, - "GenericUnitSpec<(ErrorEncodingWithFacet),(ErrorBar|ErrorBarDef)>": { - "additionalProperties": false, - "description": "Base interface for a unit (single-view) specification.", - "properties": { - "data": { - "$ref": "#/definitions/Data", - "description": "An object describing the data source" - }, - "description": { - "description": "Description of this mark for commenting purpose.", - "type": "string" - }, - "encoding": { - "additionalProperties": false, - "description": "A key-value mapping between encoding channels and definition of fields.", - "properties": { - "color": { - "anyOf": [ - { - "$ref": "#/definitions/ColorFieldDefWithCondition" - }, - { - "$ref": "#/definitions/ColorValueDefWithCondition" - } - ], - "description": "Color of the marks – either fill or stroke color based on the `filled` property of mark definition.\nBy default, `color` represents fill color for `\"area\"`, `\"bar\"`, `\"tick\"`,\n`\"text\"`, `\"trail\"`, `\"circle\"`, and `\"square\"` / stroke color for `\"line\"` and `\"point\"`.\n\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_\n1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. If either `fill` or `stroke` channel is specified, `color` channel will be ignored.\n2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme)." - }, - "column": { - "$ref": "#/definitions/FacetFieldDef", - "description": "Horizontal facets for trellis plots." - }, - "detail": { - "anyOf": [ - { - "$ref": "#/definitions/FieldDef" - }, - { - "items": { - "$ref": "#/definitions/FieldDef" - }, - "type": "array" - } - ], - "description": "Additional levels of detail for grouping data in aggregate views and\nin line, trail, and area marks without mapping data to a specific visual channel." - }, - "opacity": { - "anyOf": [ - { - "$ref": "#/definitions/NumericFieldDefWithCondition" - }, - { - "$ref": "#/definitions/NumericValueDefWithCondition" - } - ], - "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)'s `opacity` property." - }, - "row": { - "$ref": "#/definitions/FacetFieldDef", - "description": "Vertical facets for trellis plots." - }, - "x": { - "anyOf": [ - { - "$ref": "#/definitions/PositionFieldDef" - }, - { - "$ref": "#/definitions/XValueDef" - } - ], - "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"`." - }, - "x2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/XValueDef" - } - ], - "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"`." - }, - "xError": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - }, - "xError2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Secondary error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - }, - "y": { - "anyOf": [ - { - "$ref": "#/definitions/PositionFieldDef" - }, - { - "$ref": "#/definitions/YValueDef" - } - ], - "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"`." - }, - "y2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/YValueDef" - } - ], - "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"`." - }, - "yError": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - }, - "yError2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Secondary error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - } - }, - "required": [ - "color", - "detail", - "opacity", - "x", - "x2", - "y", - "y2" - ], - "type": "object" - }, - "height": { - "description": "The height of a visualization.\n\n__Default value:__\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its y-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For y-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the height is [determined by the range step, paddings, and the cardinality of the field mapped to y-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`.\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.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.", - "type": "number" - }, - "mark": { - "anyOf": [ - { - "$ref": "#/definitions/ErrorBar" - }, - { - "$ref": "#/definitions/ErrorBarDef" - } - ], - "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n`\"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" - }, - "projection": { - "$ref": "#/definitions/Projection", - "description": "An object defining properties of geographic projection, which will be applied to `shape` path for `\"geoshape\"` marks\nand to `latitude` and `\"longitude\"` channels for other marks." - }, - "selection": { - "additionalProperties": { - "$ref": "#/definitions/SelectionDef" - }, - "description": "A key-value mapping between selection names and definitions.", - "type": "object" - }, - "title": { - "anyOf": [ - { - "type": "string" - }, - { - "$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": { - "description": "The width of a visualization.\n\n__Default value:__ This will be determined by the following rules:\n\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its x-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For x-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the width is [determined by the range step, paddings, and the cardinality of the field mapped to x-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `x` channel, the `width` will be the value of [`config.scale.textXRangeStep`](https://vega.github.io/vega-lite/docs/size.html#default-width-and-height) for `text` mark and the value of `rangeStep` for other marks.\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.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.", - "type": "number" - } - }, - "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": { - "$ref": "#/definitions/Data", - "description": "An object describing the data source" - }, - "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 vertically concatenated charts." - }, - "spacing": { - "description": "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`", - "type": "number" - }, - "title": { - "anyOf": [ - { - "type": "string" + "name": { + "description": "Name of the visualization for later reference.", + "type": "string" + }, + "resolve": { + "$ref": "#/definitions/Resolve", + "description": "Scale, axis, and legend resolutions for vertically concatenated charts." + }, + "spacing": { + "description": "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`", + "type": "number" + }, + "title": { + "anyOf": [ + { + "type": "string" }, { "$ref": "#/definitions/TitleParams" @@ -9100,14 +8022,6 @@ ], "type": "string" }, - "NormalizedUnitSpec": { - "$ref": "#/definitions/GenericUnitSpec<(Encoding),(Mark|MarkDef)>", - "description": "A unit specification without any shortcut/expansion syntax." - }, - "NormalizedUnitSpecWithFacet": { - "$ref": "#/definitions/GenericUnitSpec<(EncodingWithFacet),(Mark|MarkDef)>", - "description": "A unit specification without any shortcut/expansion syntax." - }, "NumericFieldDefWithCondition": { "$ref": "#/definitions/FieldDefWithCondition" }, @@ -11725,129 +10639,9 @@ ], "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": { - "$ref": "#/definitions/Data", - "description": "An object describing the data source" - }, - "datasets": { - "$ref": "#/definitions/Datasets", - "description": "A global data store for named datasets. This is a mapping from names to inline datasets.\nThis 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 that should be concatenated and put into a row.", - "items": { - "$ref": "#/definitions/Spec" - }, - "type": "array" - }, - "name": { - "description": "Name of the visualization for later reference.", - "type": "string" - }, - "padding": { - "$ref": "#/definitions/Padding", - "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.\nIf 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`" - }, - "resolve": { - "$ref": "#/definitions/Resolve", - "description": "Scale, axis, and legend resolutions for horizontally concatenated charts." - }, - "spacing": { - "description": "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`", - "type": "number" - }, - "title": { - "anyOf": [ - { - "type": "string" - }, - { - "$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": { - "description": "Optional metadata that will be passed to Vega.\nThis object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.", - "type": "object" - } - }, - "required": [ - "hconcat" - ], - "type": "object" - }, - "TopLevelRepeatSpec": { - "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/v3.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.\nThe 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": "Sets how the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`.\nObject values can additionally specify parameters for content sizing and automatic resizing.\n`\"fit\"` is only supported for single and layered views that don't use `rangeStep`.\n\n__Default value__: `pad`" - }, - "background": { - "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ none (transparent)", - "type": "string" - }, - "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`" + "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", @@ -11865,6 +10659,13 @@ "description": "Description of this mark for commenting purpose.", "type": "string" }, + "hconcat": { + "description": "A list of views that should be concatenated and put into a row.", + "items": { + "$ref": "#/definitions/Spec" + }, + "type": "array" + }, "name": { "description": "Name of the visualization for later reference.", "type": "string" @@ -11873,27 +10674,13 @@ "$ref": "#/definitions/Padding", "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.\nIf 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`" }, - "repeat": { - "$ref": "#/definitions/Repeat", - "description": "An object that describes what fields should be repeated into views that are laid out as a `row` or `column`." - }, "resolve": { "$ref": "#/definitions/Resolve", - "description": "Scale and legend resolutions for repeated charts." + "description": "Scale, axis, and legend resolutions for horizontally concatenated charts." }, "spacing": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/definitions/RowCol" - } - ], - "description": "The spacing in pixels between sub-views of the composition operator.\nAn object of the form `{\"row\": number, \"column\": number}` can be used to set\ndifferent spacing values for rows and columns.\n\n__Default value__: `10`" - }, - "spec": { - "$ref": "#/definitions/Spec" + "description": "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`", + "type": "number" }, "title": { "anyOf": [ @@ -11919,12 +10706,11 @@ } }, "required": [ - "repeat", - "spec" + "hconcat" ], "type": "object" }, - "TopLevelVConcatSpec": { + "TopLevelRepeatSpec": { "additionalProperties": false, "properties": { "$schema": { @@ -11932,6 +10718,17 @@ "format": "uri", "type": "string" }, + "align": { + "anyOf": [ + { + "$ref": "#/definitions/LayoutAlign" + }, + { + "$ref": "#/definitions/RowCol" + } + ], + "description": "The alignment to apply to grid rows and columns.\nThe 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": [ { @@ -11956,8 +10753,15 @@ "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" + "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", @@ -11983,770 +10787,158 @@ "$ref": "#/definitions/Padding", "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.\nIf 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`" }, + "repeat": { + "$ref": "#/definitions/Repeat", + "description": "An object that describes what fields should be repeated into views that are laid out as a `row` or `column`." + }, "resolve": { "$ref": "#/definitions/Resolve", - "description": "Scale, axis, and legend resolutions for vertically concatenated charts." - }, - "spacing": { - "description": "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`", - "type": "number" - }, - "title": { - "anyOf": [ - { - "type": "string" - }, - { - "$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": { - "description": "Optional metadata that will be passed to Vega.\nThis object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.", - "type": "object" - }, - "vconcat": { - "description": "A list of views that should be concatenated and put into a column.", - "items": { - "$ref": "#/definitions/Spec" - }, - "type": "array" - } - }, - "required": [ - "vconcat" - ], - "type": "object" - }, - "TopLevelCompositeMarkUnitSpec": { - "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/v3.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": "Sets how the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`.\nObject values can additionally specify parameters for content sizing and automatic resizing.\n`\"fit\"` is only supported for single and layered views that don't use `rangeStep`.\n\n__Default value__: `pad`" - }, - "background": { - "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ none (transparent)", - "type": "string" - }, - "config": { - "$ref": "#/definitions/Config", - "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification." - }, - "data": { - "$ref": "#/definitions/Data", - "description": "An object describing the data source" - }, - "datasets": { - "$ref": "#/definitions/Datasets", - "description": "A global data store for named datasets. This is a mapping from names to inline datasets.\nThis 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": { - "additionalProperties": false, - "description": "A key-value mapping between encoding channels and definition of fields.", - "properties": { - "color": { - "anyOf": [ - { - "$ref": "#/definitions/ColorFieldDefWithCondition" - }, - { - "$ref": "#/definitions/ColorValueDefWithCondition" - } - ], - "description": "Color of the marks – either fill or stroke color based on the `filled` property of mark definition.\nBy default, `color` represents fill color for `\"area\"`, `\"bar\"`, `\"tick\"`,\n`\"text\"`, `\"trail\"`, `\"circle\"`, and `\"square\"` / stroke color for `\"line\"` and `\"point\"`.\n\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_\n1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. If either `fill` or `stroke` channel is specified, `color` channel will be ignored.\n2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme)." - }, - "column": { - "$ref": "#/definitions/FacetFieldDef", - "description": "Horizontal facets for trellis plots." - }, - "detail": { - "anyOf": [ - { - "$ref": "#/definitions/FieldDef" - }, - { - "items": { - "$ref": "#/definitions/FieldDef" - }, - "type": "array" - } - ], - "description": "Additional levels of detail for grouping data in aggregate views and\nin line, trail, and area marks without mapping data to a specific visual channel." - }, - "opacity": { - "anyOf": [ - { - "$ref": "#/definitions/NumericFieldDefWithCondition" - }, - { - "$ref": "#/definitions/NumericValueDefWithCondition" - } - ], - "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)'s `opacity` property." - }, - "row": { - "$ref": "#/definitions/FacetFieldDef", - "description": "Vertical facets for trellis plots." - }, - "x": { - "anyOf": [ - { - "$ref": "#/definitions/PositionFieldDef" - }, - { - "$ref": "#/definitions/XValueDef" - } - ], - "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"`." - }, - "x2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/XValueDef" - } - ], - "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"`." - }, - "xError": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - }, - "xError2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Secondary error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - }, - "y": { - "anyOf": [ - { - "$ref": "#/definitions/PositionFieldDef" - }, - { - "$ref": "#/definitions/YValueDef" - } - ], - "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"`." - }, - "y2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/YValueDef" - } - ], - "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"`." - }, - "yError": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - }, - "yError2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Secondary error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - } - }, - "required": [ - "color", - "detail", - "opacity", - "x", - "x2", - "y", - "y2" - ], - "type": "object" - }, - "height": { - "description": "The height of a visualization.\n\n__Default value:__\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its y-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For y-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the height is [determined by the range step, paddings, and the cardinality of the field mapped to y-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`.\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.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.", - "type": "number" - }, - "mark": { - "anyOf": [ - { - "$ref": "#/definitions/ErrorBar" - }, - { - "$ref": "#/definitions/ErrorBarDef" - } - ], - "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n`\"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": { - "$ref": "#/definitions/Padding", - "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.\nIf 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`" - }, - "projection": { - "$ref": "#/definitions/Projection", - "description": "An object defining properties of geographic projection, which will be applied to `shape` path for `\"geoshape\"` marks\nand to `latitude` and `\"longitude\"` channels for other marks." - }, - "selection": { - "additionalProperties": { - "$ref": "#/definitions/SelectionDef" - }, - "description": "A key-value mapping between selection names and definitions.", - "type": "object" - }, - "title": { - "anyOf": [ - { - "type": "string" - }, - { - "$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": { - "description": "Optional metadata that will be passed to Vega.\nThis object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.", - "type": "object" - }, - "view": { - "$ref": "#/definitions/ViewBackground", - "description": "An object defining the view background's fill and stroke.\n\n__Default value:__ none (transparent)" - }, - "width": { - "description": "The width of a visualization.\n\n__Default value:__ This will be determined by the following rules:\n\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its x-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For x-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the width is [determined by the range step, paddings, and the cardinality of the field mapped to x-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `x` channel, the `width` will be the value of [`config.scale.textXRangeStep`](https://vega.github.io/vega-lite/docs/size.html#default-width-and-height) for `text` mark and the value of `rangeStep` for other marks.\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.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.", - "type": "number" - } - }, - "required": [ - "data", - "mark" - ], - "type": "object" + "description": "Scale and legend resolutions for repeated charts." }, - { - "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/v3.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": "Sets how the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`.\nObject values can additionally specify parameters for content sizing and automatic resizing.\n`\"fit\"` is only supported for single and layered views that don't use `rangeStep`.\n\n__Default value__: `pad`" - }, - "background": { - "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ none (transparent)", - "type": "string" - }, - "config": { - "$ref": "#/definitions/Config", - "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification." - }, - "data": { - "$ref": "#/definitions/Data", - "description": "An object describing the data source" - }, - "datasets": { - "$ref": "#/definitions/Datasets", - "description": "A global data store for named datasets. This is a mapping from names to inline datasets.\nThis 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": { - "additionalProperties": false, - "description": "A key-value mapping between encoding channels and definition of fields.", - "properties": { - "color": { - "anyOf": [ - { - "$ref": "#/definitions/ColorFieldDefWithCondition" - }, - { - "$ref": "#/definitions/ColorValueDefWithCondition" - } - ], - "description": "Color of the marks – either fill or stroke color based on the `filled` property of mark definition.\nBy default, `color` represents fill color for `\"area\"`, `\"bar\"`, `\"tick\"`,\n`\"text\"`, `\"trail\"`, `\"circle\"`, and `\"square\"` / stroke color for `\"line\"` and `\"point\"`.\n\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_\n1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. If either `fill` or `stroke` channel is specified, `color` channel will be ignored.\n2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme)." - }, - "column": { - "$ref": "#/definitions/FacetFieldDef", - "description": "Horizontal facets for trellis plots." - }, - "detail": { - "anyOf": [ - { - "$ref": "#/definitions/FieldDef" - }, - { - "items": { - "$ref": "#/definitions/FieldDef" - }, - "type": "array" - } - ], - "description": "Additional levels of detail for grouping data in aggregate views and\nin line, trail, and area marks without mapping data to a specific visual channel." - }, - "opacity": { - "anyOf": [ - { - "$ref": "#/definitions/NumericFieldDefWithCondition" - }, - { - "$ref": "#/definitions/NumericValueDefWithCondition" - } - ], - "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)'s `opacity` property." - }, - "row": { - "$ref": "#/definitions/FacetFieldDef", - "description": "Vertical facets for trellis plots." - }, - "x": { - "anyOf": [ - { - "$ref": "#/definitions/PositionFieldDef" - }, - { - "$ref": "#/definitions/XValueDef" - } - ], - "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"`." - }, - "x2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/XValueDef" - } - ], - "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"`." - }, - "xError": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - }, - "xError2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Secondary error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - }, - "y": { - "anyOf": [ - { - "$ref": "#/definitions/PositionFieldDef" - }, - { - "$ref": "#/definitions/YValueDef" - } - ], - "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"`." - }, - "y2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/YValueDef" - } - ], - "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"`." - }, - "yError": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - }, - "yError2": { - "anyOf": [ - { - "$ref": "#/definitions/SecondaryFieldDef" - }, - { - "$ref": "#/definitions/NumberValueDef" - } - ], - "description": "Secondary error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." - } - }, - "required": [ - "color", - "detail", - "opacity", - "x", - "x2", - "y", - "y2" - ], - "type": "object" - }, - "height": { - "description": "The height of a visualization.\n\n__Default value:__\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its y-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For y-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the height is [determined by the range step, paddings, and the cardinality of the field mapped to y-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`.\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.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.", - "type": "number" - }, - "mark": { - "anyOf": [ - { - "$ref": "#/definitions/ErrorBand" - }, - { - "$ref": "#/definitions/ErrorBandDef" - } - ], - "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n`\"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": { - "$ref": "#/definitions/Padding", - "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.\nIf 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`" - }, - "projection": { - "$ref": "#/definitions/Projection", - "description": "An object defining properties of geographic projection, which will be applied to `shape` path for `\"geoshape\"` marks\nand to `latitude` and `\"longitude\"` channels for other marks." - }, - "selection": { - "additionalProperties": { - "$ref": "#/definitions/SelectionDef" - }, - "description": "A key-value mapping between selection names and definitions.", - "type": "object" - }, - "title": { - "anyOf": [ - { - "type": "string" - }, - { - "$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": { - "description": "Optional metadata that will be passed to Vega.\nThis object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.", - "type": "object" - }, - "view": { - "$ref": "#/definitions/ViewBackground", - "description": "An object defining the view background's fill and stroke.\n\n__Default value:__ none (transparent)" - }, - "width": { - "description": "The width of a visualization.\n\n__Default value:__ This will be determined by the following rules:\n\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its x-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For x-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the width is [determined by the range step, paddings, and the cardinality of the field mapped to x-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `x` channel, the `width` will be the value of [`config.scale.textXRangeStep`](https://vega.github.io/vega-lite/docs/size.html#default-width-and-height) for `text` mark and the value of `rangeStep` for other marks.\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.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.", + "spacing": { + "anyOf": [ + { "type": "number" + }, + { + "$ref": "#/definitions/RowCol" } - }, - "required": [ - "data", - "mark" ], - "type": "object" + "description": "The spacing in pixels between sub-views of the composition operator.\nAn object of the form `{\"row\": number, \"column\": number}` can be used to set\ndifferent spacing values for rows and columns.\n\n__Default value__: `10`" }, - { - "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/v3.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": "Sets how the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`.\nObject values can additionally specify parameters for content sizing and automatic resizing.\n`\"fit\"` is only supported for single and layered views that don't use `rangeStep`.\n\n__Default value__: `pad`" - }, - "background": { - "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ none (transparent)", - "type": "string" - }, - "config": { - "$ref": "#/definitions/Config", - "description": "Vega-Lite configuration object. This property can only be defined at the top-level of a specification." - }, - "data": { - "$ref": "#/definitions/Data", - "description": "An object describing the data source" - }, - "datasets": { - "$ref": "#/definitions/Datasets", - "description": "A global data store for named datasets. This is a mapping from names to inline datasets.\nThis 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.", + "spec": { + "$ref": "#/definitions/Spec" + }, + "title": { + "anyOf": [ + { "type": "string" }, - "encoding": { - "additionalProperties": false, - "description": "A key-value mapping between encoding channels and definition of fields.", - "properties": { - "color": { - "anyOf": [ - { - "$ref": "#/definitions/ColorFieldDefWithCondition" - }, - { - "$ref": "#/definitions/ColorValueDefWithCondition" - } - ], - "description": "Color of the marks – either fill or stroke color based on the `filled` property of mark definition.\nBy default, `color` represents fill color for `\"area\"`, `\"bar\"`, `\"tick\"`,\n`\"text\"`, `\"trail\"`, `\"circle\"`, and `\"square\"` / stroke color for `\"line\"` and `\"point\"`.\n\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_\n1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. If either `fill` or `stroke` channel is specified, `color` channel will be ignored.\n2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme)." - }, - "column": { - "$ref": "#/definitions/FacetFieldDef", - "description": "Horizontal facets for trellis plots." - }, - "detail": { - "anyOf": [ - { - "$ref": "#/definitions/FieldDef" - }, - { - "items": { - "$ref": "#/definitions/FieldDef" - }, - "type": "array" - } - ], - "description": "Additional levels of detail for grouping data in aggregate views and\nin line, trail, and area marks without mapping data to a specific visual channel." - }, - "opacity": { - "anyOf": [ - { - "$ref": "#/definitions/NumericFieldDefWithCondition" - }, - { - "$ref": "#/definitions/NumericValueDefWithCondition" - } - ], - "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)'s `opacity` property." - }, - "row": { - "$ref": "#/definitions/FacetFieldDef", - "description": "Vertical facets for trellis plots." - }, - "size": { - "anyOf": [ - { - "$ref": "#/definitions/NumericFieldDefWithCondition" - }, - { - "$ref": "#/definitions/NumericValueDefWithCondition" - } - ], - "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)" - }, - "x": { - "anyOf": [ - { - "$ref": "#/definitions/PositionFieldDef" - }, - { - "$ref": "#/definitions/XValueDef" - } - ], - "description": "X coordinates of the marks, or width of horizontal `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"`." - }, - "y": { - "anyOf": [ - { - "$ref": "#/definitions/PositionFieldDef" - }, - { - "$ref": "#/definitions/YValueDef" - } - ], - "description": "Y coordinates of the marks, or height of vertical `\"bar\"` and `\"area\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"`." - } - }, - "required": [ - "color", - "detail", - "opacity", - "size", - "x", - "y" - ], - "type": "object" - }, - "height": { - "description": "The height of a visualization.\n\n__Default value:__\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its y-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For y-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the height is [determined by the range step, paddings, and the cardinality of the field mapped to y-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the height will be the value of [`config.view.height`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`.\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.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.", - "type": "number" - }, - "mark": { - "anyOf": [ - { - "$ref": "#/definitions/BoxPlot" - }, - { - "$ref": "#/definitions/BoxPlotDef" - } - ], - "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n`\"area\"`, `\"point\"`, `\"rule\"`, `\"geoshape\"`, and `\"text\"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def)." + { + "$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": { + "description": "Optional metadata that will be passed to Vega.\nThis object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.", + "type": "object" + } + }, + "required": [ + "repeat", + "spec" + ], + "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/v3.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" }, - "name": { - "description": "Name of the visualization for later reference.", + { + "$ref": "#/definitions/AutoSizeParams" + } + ], + "description": "Sets how the visualization size should be determined. If a string, should be one of `\"pad\"`, `\"fit\"` or `\"none\"`.\nObject values can additionally specify parameters for content sizing and automatic resizing.\n`\"fit\"` is only supported for single and layered views that don't use `rangeStep`.\n\n__Default value__: `pad`" + }, + "background": { + "description": "CSS color property to use as the background of the entire view.\n\n__Default value:__ none (transparent)", + "type": "string" + }, + "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": { + "$ref": "#/definitions/Data", + "description": "An object describing the data source" + }, + "datasets": { + "$ref": "#/definitions/Datasets", + "description": "A global data store for named datasets. This is a mapping from names to inline datasets.\nThis 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": { + "$ref": "#/definitions/Padding", + "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.\nIf 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`" + }, + "resolve": { + "$ref": "#/definitions/Resolve", + "description": "Scale, axis, and legend resolutions for vertically concatenated charts." + }, + "spacing": { + "description": "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`", + "type": "number" + }, + "title": { + "anyOf": [ + { "type": "string" }, - "padding": { - "$ref": "#/definitions/Padding", - "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.\nIf 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`" - }, - "projection": { - "$ref": "#/definitions/Projection", - "description": "An object defining properties of geographic projection, which will be applied to `shape` path for `\"geoshape\"` marks\nand to `latitude` and `\"longitude\"` channels for other marks." - }, - "selection": { - "additionalProperties": { - "$ref": "#/definitions/SelectionDef" - }, - "description": "A key-value mapping between selection names and definitions.", - "type": "object" - }, - "title": { - "anyOf": [ - { - "type": "string" - }, - { - "$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": { - "description": "Optional metadata that will be passed to Vega.\nThis object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.", - "type": "object" - }, - "view": { - "$ref": "#/definitions/ViewBackground", - "description": "An object defining the view background's fill and stroke.\n\n__Default value:__ none (transparent)" - }, - "width": { - "description": "The width of a visualization.\n\n__Default value:__ This will be determined by the following rules:\n\n- If a view's [`autosize`](https://vega.github.io/vega-lite/docs/size.html#autosize) type is `\"fit\"` or its x-channel has a [continuous scale](https://vega.github.io/vega-lite/docs/scale.html#continuous), the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- For x-axis with a band or point scale: if [`rangeStep`](https://vega.github.io/vega-lite/docs/scale.html#band) is a numeric value or unspecified, the width is [determined by the range step, paddings, and the cardinality of the field mapped to x-channel](https://vega.github.io/vega-lite/docs/scale.html#band). Otherwise, if the `rangeStep` is `null`, the width will be the value of [`config.view.width`](https://vega.github.io/vega-lite/docs/spec.html#config).\n- If no field is mapped to `x` channel, the `width` will be the value of [`config.scale.textXRangeStep`](https://vega.github.io/vega-lite/docs/size.html#default-width-and-height) for `text` mark and the value of `rangeStep` for other marks.\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.\n\n__See also:__ The documentation for [width and height](https://vega.github.io/vega-lite/docs/size.html) contains more examples.", - "type": "number" + { + "$ref": "#/definitions/TitleParams" } - }, - "required": [ - "data", - "mark" ], + "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": { + "description": "Optional metadata that will be passed to Vega.\nThis object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.", "type": "object" + }, + "vconcat": { + "description": "A list of views that should be concatenated and put into a column.", + "items": { + "$ref": "#/definitions/Spec" + }, + "type": "array" } - ] + }, + "required": [ + "vconcat" + ], + "type": "object" }, "TopLevelFacetSpec": { "additionalProperties": false, @@ -12885,17 +11077,7 @@ ], "type": "object" }, - "TopLevelFacetedUnitSpec": { - "anyOf": [ - { - "$ref": "#/definitions/TopLevelNormalizedUnitSpec" - }, - { - "$ref": "#/definitions/TopLevelCompositeMarkUnitSpec" - } - ] - }, - "TopLevelNormalizedUnitSpec": { + "TopLevelFacetedExtendedUnitSpec": { "additionalProperties": false, "properties": { "$schema": { @@ -13160,6 +11342,28 @@ ], "description": "X2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"width\"`." }, + "xError": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/NumberValueDef" + } + ], + "description": "Error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + }, + "xError2": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/NumberValueDef" + } + ], + "description": "Secondary error value of x coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + }, "y": { "anyOf": [ { @@ -13181,6 +11385,28 @@ } ], "description": "Y2 coordinates for ranged `\"area\"`, `\"bar\"`, `\"rect\"`, and `\"rule\"`.\n\nThe `value` of this channel can be a number or a string `\"height\"`." + }, + "yError": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/NumberValueDef" + } + ], + "description": "Error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." + }, + "yError2": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFieldDef" + }, + { + "$ref": "#/definitions/NumberValueDef" + } + ], + "description": "Secondary error value of y coordinates for error specified `\"errorbar\"` and `\"errorband\"`." } }, "type": "object" @@ -13196,6 +11422,12 @@ }, { "$ref": "#/definitions/MarkDef" + }, + { + "$ref": "#/definitions/CompositeMark" + }, + { + "$ref": "#/definitions/CompositeMarkDef" } ], "description": "A string describing the mark type (one of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n`\"area\"`, `\"point\"`, `\"rule\"`, `\"geoshape\"`, and `\"text\"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def)." @@ -13259,7 +11491,7 @@ "TopLevelSpec": { "anyOf": [ { - "$ref": "#/definitions/TopLevelFacetedUnitSpec" + "$ref": "#/definitions/TopLevelFacetedExtendedUnitSpec" }, { "$ref": "#/definitions/TopLevelFacetSpec" diff --git a/src/compositemark/boxplot.ts b/src/compositemark/boxplot.ts index bb62083e912..d8e550a3e17 100644 --- a/src/compositemark/boxplot.ts +++ b/src/compositemark/boxplot.ts @@ -1,7 +1,7 @@ import {isNumber, isObject} from 'vega-util'; import {Config} from '../config'; import {Encoding, extractTransformsFromEncoding} from '../encoding'; -import {Field, PositionFieldDef} from '../fielddef'; +import {PositionFieldDef} from '../fielddef'; import * as log from '../log'; import {isMarkDef, MarkDef} from '../mark'; import {GenericUnitSpec, NormalizedLayerSpec, NormalizedUnitSpec} from '../spec'; @@ -19,10 +19,6 @@ import { PartsMixins } from './common'; -export type BoxPlotUnitSpec< - EE = {} // extra encoding parameter (for faceted composite unit spec) -> = GenericUnitSpec & EE, BoxPlot | BoxPlotDef>; - export const BOXPLOT: 'boxplot' = 'boxplot'; export type BoxPlot = typeof BOXPLOT; @@ -70,8 +66,6 @@ export type BoxPlotDef = GenericCompositeMarkDef & orient?: Orient; }; -export type BoxPlotEncoding = Pick, 'x' | 'y' | 'color' | 'detail' | 'opacity' | 'size'>; - export interface BoxPlotConfigMixins { /** * Box Config diff --git a/src/compositemark/errorbar.ts b/src/compositemark/errorbar.ts index 479d8e495d4..6205d46e193 100644 --- a/src/compositemark/errorbar.ts +++ b/src/compositemark/errorbar.ts @@ -30,10 +30,6 @@ import { } from './common'; import {ErrorBand, ErrorBandDef} from './errorband'; -export type ErrorBarUnitSpec< - EE = {} // extra encoding parameter (for faceted composite unit spec) -> = GenericUnitSpec & EE, ErrorBar | ErrorBarDef>; - export const ERRORBAR: 'errorbar' = 'errorbar'; export type ErrorBar = typeof ERRORBAR; @@ -49,8 +45,7 @@ const ERRORBAR_PART_INDEX: Flag = { rule: 1 }; -export interface ErrorEncoding - extends Pick, 'x' | 'y' | 'x2' | 'y2' | 'color' | 'detail' | 'opacity'> { +export interface ErrorExtraEncoding { /** * Error value of x coordinates for error specified `"errorbar"` and `"errorband"`. */ @@ -74,6 +69,12 @@ export interface ErrorEncoding yError2?: SecondaryFieldDef | ValueDef; } +export type ErrorEncoding = Pick< + Encoding, + 'x' | 'y' | 'x2' | 'y2' | 'color' | 'detail' | 'opacity' +> & + ErrorExtraEncoding; + export const ERRORBAR_PARTS = keys(ERRORBAR_PART_INDEX); export type ErrorBarPartsMixins = PartsMixins; diff --git a/src/compositemark/index.ts b/src/compositemark/index.ts index 881444020be..de685e81ad4 100644 --- a/src/compositemark/index.ts +++ b/src/compositemark/index.ts @@ -1,23 +1,15 @@ import {Config} from '../config'; +import {Field} from '../fielddef'; import {AnyMark, isMarkDef} from '../mark'; import {GenericUnitSpec, NormalizedLayerSpec} from '../spec'; import {keys} from '../util'; -import { - BOXPLOT, - BoxPlot, - BOXPLOT_PARTS, - BoxPlotConfigMixins, - BoxPlotDef, - BoxPlotUnitSpec, - normalizeBoxPlot -} from './boxplot'; +import {BOXPLOT, BoxPlot, BOXPLOT_PARTS, BoxPlotConfigMixins, BoxPlotDef, normalizeBoxPlot} from './boxplot'; import { ERRORBAND, ErrorBand, ERRORBAND_PARTS, ErrorBandConfigMixins, ErrorBandDef, - ErrorBandUnitSpec, normalizeErrorBand } from './errorband'; import { @@ -26,7 +18,7 @@ import { ERRORBAR_PARTS, ErrorBarConfigMixins, ErrorBarDef, - ErrorBarUnitSpec, + ErrorExtraEncoding, normalizeErrorBar } from './errorbar'; @@ -53,9 +45,8 @@ export function remove(mark: string) { delete compositeMarkRegistry[mark]; } -export type CompositeMarkUnitSpec< - EE = {} // extra encoding parameter (for faceted composite unit spec) -> = ErrorBarUnitSpec | ErrorBandUnitSpec | BoxPlotUnitSpec; +export type CompositeExtraEncoding = ErrorExtraEncoding; + export type CompositeMark = BoxPlot | ErrorBar | ErrorBand; export function getAllCompositeMarks() { diff --git a/src/spec/index.ts b/src/spec/index.ts index 2059e63c0cf..ffd0cd07aed 100644 --- a/src/spec/index.ts +++ b/src/spec/index.ts @@ -22,7 +22,7 @@ import { GenericUnitSpec, isUnitSpec, NormalizedUnitSpec, - TopLevelFacetedUnitSpec + TopLevelFacetedExtendedUnitSpec } from './unit'; export {normalizeTopLevelSpec as normalize} from '../normalize'; @@ -65,7 +65,7 @@ export type TopLevelFacetSpec = TopLevel | TopLevel> diff --git a/src/spec/unit.ts b/src/spec/unit.ts index 6129872a8ab..cf761227405 100644 --- a/src/spec/unit.ts +++ b/src/spec/unit.ts @@ -1,7 +1,4 @@ -import {BoxPlotUnitSpec} from '../compositemark/boxplot'; -import {ErrorBandUnitSpec} from '../compositemark/errorband'; -import {ErrorBarUnitSpec} from '../compositemark/errorbar'; -import {CompositeMarkUnitSpec} from '../compositemark/index'; +import {CompositeExtraEncoding, CompositeMark, CompositeMarkDef} from '../compositemark/index'; import {Encoding} from '../encoding'; import {Field} from '../fielddef'; import {Mark, MarkDef} from '../mark'; @@ -57,25 +54,17 @@ export interface EmptyObject {} export type ExtendedUnitSpec< /** Extra Encoding */ EE = EmptyObject -> = NormalizedUnitSpec | CompositeMarkUnitSpec; +> = GenericUnitSpec< + Encoding & CompositeExtraEncoding & EE, + Mark | MarkDef | CompositeMark | CompositeMarkDef +>; /** * Unit spec that can have a composite mark and row or column channels (shorthand for a facet spec). */ export type FacetedExtendedUnitSpec = ExtendedUnitSpec>; -// Note: The following three declarations are equivalent to: -// ``` -// export type TopLevelFacetedUnitSpec = TopLevel & DataMixins; -// ``` -// However, the JSON schema generator does not support the simpler syntax - -export type TopLevelNormalizedUnitSpec = TopLevel>> & DataMixins; -export type TopLevelCompositeMarkUnitSpec = - | (TopLevel>> & DataMixins) - | (TopLevel>> & DataMixins) - | (TopLevel>> & DataMixins); -export type TopLevelFacetedUnitSpec = TopLevelNormalizedUnitSpec | TopLevelCompositeMarkUnitSpec; +export type TopLevelFacetedExtendedUnitSpec = TopLevel & DataMixins; export function isUnitSpec(spec: BaseSpec): spec is FacetedExtendedUnitSpec | NormalizedUnitSpec { return !!spec['mark']; diff --git a/test/compositemark/errorbar.test.ts b/test/compositemark/errorbar.test.ts index 35bc12ca25e..cb33996eca1 100644 --- a/test/compositemark/errorbar.test.ts +++ b/test/compositemark/errorbar.test.ts @@ -1,12 +1,12 @@ /* tslint:disable:quotemark */ import {AggregateOp} from 'vega'; import {ErrorBarCenter, ErrorBarExtent} from '../../src/compositemark/errorbar'; -import {CompositeMarkUnitSpec} from '../../src/compositemark/index'; import {defaultConfig} from '../../src/config'; import {isFieldDef} from '../../src/fielddef'; import * as log from '../../src/log'; import {isMarkDef} from '../../src/mark'; import {ExtendedLayerSpec, GenericSpec, isLayerSpec, isUnitSpec, normalize} from '../../src/spec'; +import {ExtendedUnitSpec} from '../../src/spec/unit'; import {isAggregate, isCalculate, Transform} from '../../src/transform'; import {some} from '../../src/util'; @@ -615,7 +615,7 @@ describe('normalizeErrorBar for all possible extents and centers with raw data i for (const center of centers) { for (const extent of extents) { - const spec: GenericSpec = { + const spec: GenericSpec = { data: {url: 'data/population.json'}, mark: {type, ...(center ? {center} : {}), ...(extent ? {extent} : {})}, encoding: {