{
    "oneOf": [
        {
            "$ref": "#/definitions/ExtendedUnitSpec",
            "description": "Schema for a unit Vega-Lite specification, with the syntactic sugar extensions:\n\n- `row` and `column` are included in the encoding.\n\n- (Future) label, box plot\n\n\n\nNote: the spec could contain facet."
        },
        {
            "$ref": "#/definitions/FacetSpec"
        },
        {
            "$ref": "#/definitions/LayerSpec"
        }
    ],
    "definitions": {
        "ExtendedUnitSpec": {
            "type": "object",
            "properties": {
                "mark": {
                    "$ref": "#/definitions/Mark",
                    "description": "The mark type.\n\nOne of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n\n`\"area\"`, `\"point\"`, `\"rule\"`, and `\"text\"`."
                },
                "encoding": {
                    "$ref": "#/definitions/Encoding",
                    "description": "A key-value mapping between encoding channels and definition of fields."
                },
                "name": {
                    "description": "Name of the visualization for later reference.",
                    "type": "string"
                },
                "description": {
                    "description": "An optional description of this mark for commenting purpose.\n\nThis property has no effect on the output visualization.",
                    "type": "string"
                },
                "data": {
                    "$ref": "#/definitions/Data",
                    "description": "An object describing the data source"
                },
                "transform": {
                    "$ref": "#/definitions/Transform",
                    "description": "An object describing filter and new field calculation."
                },
                "config": {
                    "$ref": "#/definitions/Config",
                    "description": "Configuration object"
                }
            },
            "required": [
                "mark"
            ]
        },
        "Mark": {
            "type": "string",
            "enum": [
                "area",
                "bar",
                "line",
                "point",
                "text",
                "tick",
                "rule",
                "circle",
                "square",
                "errorBar"
            ]
        },
        "Encoding": {
            "type": "object",
            "properties": {
                "row": {
                    "$ref": "#/definitions/PositionChannelDef",
                    "description": "Vertical facets for trellis plots."
                },
                "column": {
                    "$ref": "#/definitions/PositionChannelDef",
                    "description": "Horizontal facets for trellis plots."
                },
                "x": {
                    "$ref": "#/definitions/PositionChannelDef",
                    "description": "X coordinates for `point`, `circle`, `square`,\n\n`line`, `rule`, `text`, and `tick`\n\n(or to width and height for `bar` and `area` marks)."
                },
                "y": {
                    "$ref": "#/definitions/PositionChannelDef",
                    "description": "Y coordinates for `point`, `circle`, `square`,\n\n`line`, `rule`, `text`, and `tick`\n\n(or to width and height for `bar` and `area` marks)."
                },
                "x2": {
                    "$ref": "#/definitions/PositionChannelDef",
                    "description": "X2 coordinates for ranged `bar`, `rule`, `area`"
                },
                "y2": {
                    "$ref": "#/definitions/PositionChannelDef",
                    "description": "Y2 coordinates for ranged `bar`, `rule`, `area`"
                },
                "color": {
                    "$ref": "#/definitions/ChannelDefWithLegend",
                    "description": "Color of the marks \u2013 either fill or stroke color based on mark type.\n\n(By default, fill color for `area`, `bar`, `tick`, `text`, `circle`, and `square` /\n\nstroke color for `line` and `point`.)"
                },
                "opacity": {
                    "$ref": "#/definitions/ChannelDefWithLegend",
                    "description": "Opacity of the marks \u2013 either can be a value or in a range."
                },
                "size": {
                    "$ref": "#/definitions/ChannelDefWithLegend",
                    "description": "Size of the mark.\n\n- For `point`, `square` and `circle`\n\n\u2013 the symbol size, or pixel area of the mark.\n\n- For `bar` and `tick` \u2013 the bar and tick's size.\n\n- For `text` \u2013 the text's font size.\n\n- Size is currently unsupported for `line` and `area`."
                },
                "shape": {
                    "$ref": "#/definitions/ChannelDefWithLegend",
                    "description": "The symbol's shape (only for `point` marks). The supported values are\n\n`\"circle\"` (default), `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`,\n\nor `\"triangle-down\"`."
                },
                "detail": {
                    "description": "Additional levels of detail for grouping data in aggregate views and\n\nin line and area marks without mapping data to a specific visual channel.",
                    "oneOf": [
                        {
                            "$ref": "#/definitions/FieldDef",
                            "description": "Interface for any kind of FieldDef;\n\nFor simplicity, we do not declare multiple interfaces of FieldDef like\n\nwe do for JSON schema."
                        },
                        {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/FieldDef",
                                "description": "Interface for any kind of FieldDef;\n\nFor simplicity, we do not declare multiple interfaces of FieldDef like\n\nwe do for JSON schema."
                            }
                        }
                    ]
                },
                "text": {
                    "$ref": "#/definitions/FieldDef",
                    "description": "Text of the `text` mark."
                },
                "label": {
                    "$ref": "#/definitions/FieldDef"
                },
                "path": {
                    "description": "Order of data points in line marks.",
                    "oneOf": [
                        {
                            "$ref": "#/definitions/OrderChannelDef"
                        },
                        {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/OrderChannelDef"
                            }
                        }
                    ]
                },
                "order": {
                    "description": "Layer order for non-stacked marks, or stack order for stacked marks.",
                    "oneOf": [
                        {
                            "$ref": "#/definitions/OrderChannelDef"
                        },
                        {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/OrderChannelDef"
                            }
                        }
                    ]
                }
            }
        },
        "PositionChannelDef": {
            "type": "object",
            "properties": {
                "axis": {
                    "oneOf": [
                        {
                            "type": "boolean"
                        },
                        {
                            "$ref": "#/definitions/Axis"
                        }
                    ]
                },
                "scale": {
                    "$ref": "#/definitions/Scale"
                },
                "sort": {
                    "oneOf": [
                        {
                            "$ref": "#/definitions/SortField"
                        },
                        {
                            "$ref": "#/definitions/SortOrder"
                        }
                    ]
                },
                "field": {
                    "description": "Name of the field from which to pull a data value.",
                    "type": "string"
                },
                "type": {
                    "$ref": "#/definitions/Type",
                    "description": "The encoded field's type of measurement. This can be either a full type\n\nname (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`,  and `\"nominal\"`)\n\nor an initial character of the type name (`\"Q\"`, `\"T\"`, `\"O\"`, `\"N\"`).\n\nThis property is case insensitive."
                },
                "value": {
                    "description": "A constant value in visual domain.",
                    "oneOf": [
                        {
                            "type": "number"
                        },
                        {
                            "type": "string"
                        },
                        {
                            "type": "boolean"
                        }
                    ]
                },
                "timeUnit": {
                    "$ref": "#/definitions/TimeUnit",
                    "description": "Time unit for a `temporal` field  (e.g., `year`, `yearmonth`, `month`, `hour`)."
                },
                "bin": {
                    "description": "Flag for binning a `quantitative` field, or a bin property object\n\nfor binning parameters.",
                    "oneOf": [
                        {
                            "type": "boolean"
                        },
                        {
                            "$ref": "#/definitions/Bin",
                            "description": "Binning properties or boolean flag for determining whether to bin data or not."
                        }
                    ]
                },
                "aggregate": {
                    "$ref": "#/definitions/AggregateOp",
                    "description": "Aggregation function for the field\n\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`)."
                },
                "title": {
                    "description": "Title for axis or legend.",
                    "type": "string"
                }
            }
        },
        "Axis": {
            "type": "object",
            "properties": {
                "labelAngle": {
                    "description": "The rotation angle of the axis labels.",
                    "type": "number"
                },
                "format": {
                    "description": "The formatting pattern for axis labels.",
                    "type": "string"
                },
                "orient": {
                    "$ref": "#/definitions/AxisOrient",
                    "description": "The orientation of the axis. One of top, bottom, left or right. The orientation can be used to further specialize the axis type (e.g., a y axis oriented for the right edge of the chart)."
                },
                "title": {
                    "description": "A title for the axis. Shows field name and its function by default.",
                    "type": "string"
                },
                "values": {
                    "type": "array",
                    "items": {
                        "type": "number"
                    }
                },
                "axisWidth": {
                    "description": "Width of the axis line",
                    "type": "number"
                },
                "layer": {
                    "description": "A string indicating if the axis (and any gridlines) should be placed above or below the data marks.",
                    "type": "string"
                },
                "offset": {
                    "description": "The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.",
                    "type": "number"
                },
                "axisColor": {
                    "description": "Color of axis line.",
                    "type": "string"
                },
                "grid": {
                    "description": "A flag indicate if gridlines should be created in addition to ticks. If `grid` is unspecified, the default value is `true` for ROW and COL. For X and Y, the default value is `true` for quantitative and time fields and `false` otherwise.",
                    "type": "boolean"
                },
                "gridColor": {
                    "description": "Color of gridlines.",
                    "type": "string"
                },
                "gridDash": {
                    "description": "The offset (in pixels) into which to begin drawing with the grid dash array.",
                    "type": "array",
                    "items": {
                        "type": "number"
                    }
                },
                "gridOpacity": {
                    "description": "The stroke opacity of grid (value between [0,1])",
                    "type": "number"
                },
                "gridWidth": {
                    "description": "The grid width, in pixels.",
                    "type": "number"
                },
                "labels": {
                    "description": "Enable or disable labels.",
                    "type": "boolean"
                },
                "labelAlign": {
                    "description": "Text alignment for the Label.",
                    "type": "string"
                },
                "labelBaseline": {
                    "description": "Text baseline for the label.",
                    "type": "string"
                },
                "labelMaxLength": {
                    "description": "Truncate labels that are too long.",
                    "minimum": 1,
                    "type": "number"
                },
                "shortTimeLabels": {
                    "description": "Whether month and day names should be abbreviated.",
                    "type": "boolean"
                },
                "subdivide": {
                    "description": "If provided, sets the number of minor ticks between major ticks (the value 9 results in decimal subdivision). Only applicable for axes visualizing quantitative scales.",
                    "type": "number"
                },
                "ticks": {
                    "description": "A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are \"nice\" (multiples of 2, 5, 10) and lie within the underlying scale's range.",
                    "minimum": 0,
                    "type": "number"
                },
                "tickColor": {
                    "description": "The color of the axis's tick.",
                    "type": "string"
                },
                "tickLabelColor": {
                    "description": "The color of the tick label, can be in hex color code or regular color name.",
                    "type": "string"
                },
                "tickLabelFont": {
                    "description": "The font of the tick label.",
                    "type": "string"
                },
                "tickLabelFontSize": {
                    "description": "The font size of label, in pixels.",
                    "type": "number"
                },
                "tickPadding": {
                    "description": "The padding, in pixels, between ticks and text labels.",
                    "type": "number"
                },
                "tickSize": {
                    "description": "The size, in pixels, of major, minor and end ticks.",
                    "minimum": 0,
                    "type": "number"
                },
                "tickSizeMajor": {
                    "description": "The size, in pixels, of major ticks.",
                    "minimum": 0,
                    "type": "number"
                },
                "tickSizeMinor": {
                    "description": "The size, in pixels, of minor ticks.",
                    "minimum": 0,
                    "type": "number"
                },
                "tickSizeEnd": {
                    "description": "The size, in pixels, of end ticks.",
                    "minimum": 0,
                    "type": "number"
                },
                "tickWidth": {
                    "description": "The width, in pixels, of ticks.",
                    "type": "number"
                },
                "titleColor": {
                    "description": "Color of the title, can be in hex color code or regular color name.",
                    "type": "string"
                },
                "titleFont": {
                    "description": "Font of the title.",
                    "type": "string"
                },
                "titleFontSize": {
                    "description": "Size of the title.",
                    "type": "number"
                },
                "titleFontWeight": {
                    "description": "Weight of the title.",
                    "type": "string"
                },
                "titleOffset": {
                    "description": "A title offset value for the axis.",
                    "type": "number"
                },
                "titleMaxLength": {
                    "description": "Max length for axis title if the title is automatically generated from the field's description. By default, this is automatically based on cell size and characterWidth property.",
                    "minimum": 0,
                    "type": "number"
                },
                "characterWidth": {
                    "description": "Character width for automatically determining title max length.",
                    "type": "number"
                },
                "properties": {
                    "description": "Optional mark property definitions for custom axis styling."
                }
            }
        },
        "AxisOrient": {
            "type": "string",
            "enum": [
                "top",
                "right",
                "left",
                "bottom"
            ]
        },
        "Scale": {
            "type": "object",
            "properties": {
                "type": {
                    "$ref": "#/definitions/ScaleType"
                },
                "domain": {
                    "description": "The domain of the scale, representing the set of data values. For quantitative data, this can take the form of a two-element array with minimum and maximum values. For ordinal/categorical data, this may be an array of valid input values.",
                    "oneOf": [
                        {
                            "type": "array",
                            "items": {
                                "type": "number"
                            }
                        },
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "range": {
                    "description": "The range of the scale, representing the set of visual values. For numeric values, the range can take the form of a two-element array with minimum and maximum values. For ordinal or quantized data, the range may by an array of desired output values, which are mapped to elements in the specified domain. For ordinal scales only, the range can be defined using a DataRef: the range values are then drawn dynamically from a backing data set.",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "array",
                            "items": {
                                "type": "number"
                            }
                        },
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "round": {
                    "description": "If true, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid.",
                    "type": "boolean"
                },
                "bandSize": {
                    "minimum": 0,
                    "type": "number"
                },
                "padding": {
                    "description": "Applies spacing among ordinal elements in the scale range. The actual effect depends on how the scale is configured. If the __points__ parameter is `true`, the padding value is interpreted as a multiple of the spacing between points. A reasonable value is 1.0, such that the first and last point will be offset from the minimum and maximum value by half the distance between points. Otherwise, padding is typically in the range [0, 1] and corresponds to the fraction of space in the range interval to allocate to padding. A value of 0.5 means that the range band width will be equal to the padding width. For more, see the [D3 ordinal scale documentation](https://github.com/mbostock/d3/wiki/Ordinal-Scales).",
                    "type": "number"
                },
                "clamp": {
                    "description": "If true, values that exceed the data domain are clamped to either the minimum or maximum range value",
                    "type": "boolean"
                },
                "nice": {
                    "description": "If specified, modifies the scale domain to use a more human-friendly value range. If specified as a true boolean, modifies the scale domain to use a more human-friendly number range (e.g., 7 instead of 6.96). If specified as a string, modifies the scale domain to use a more human-friendly value range. For time and utc scale types only, the nice value should be a string indicating the desired time interval.",
                    "oneOf": [
                        {
                            "type": "boolean"
                        },
                        {
                            "$ref": "#/definitions/NiceTime"
                        }
                    ]
                },
                "exponent": {
                    "description": "Sets the exponent of the scale transformation. For pow scale types only, otherwise ignored.",
                    "type": "number"
                },
                "zero": {
                    "description": "If `true`, ensures that a zero baseline value is included in the scale domain.\n\nDefault value: `true` for `x` and `y` channel if the quantitative field is not binned\n\nand no custom `domain` is provided; `false` otherwise.",
                    "type": "boolean"
                },
                "useRawDomain": {
                    "description": "Uses the source data range as scale domain instead of aggregated data for aggregate axis.\n\nThis property only works with aggregate functions that produce values within the raw data domain (`\"mean\"`, `\"average\"`, `\"stdev\"`, `\"stdevp\"`, `\"median\"`, `\"q1\"`, `\"q3\"`, `\"min\"`, `\"max\"`). For other aggregations that produce values outside of the raw data domain (e.g. `\"count\"`, `\"sum\"`), this property is ignored.",
                    "type": "boolean"
                }
            }
        },
        "ScaleType": {
            "type": "string",
            "enum": [
                "linear",
                "log",
                "pow",
                "sqrt",
                "quantile",
                "quantize",
                "ordinal",
                "time",
                "utc"
            ]
        },
        "NiceTime": {
            "type": "string",
            "enum": [
                "second",
                "minute",
                "hour",
                "day",
                "week",
                "month",
                "year"
            ]
        },
        "SortField": {
            "type": "object",
            "properties": {
                "field": {
                    "description": "The field name to aggregate over.",
                    "type": "string"
                },
                "op": {
                    "$ref": "#/definitions/AggregateOp",
                    "description": "The sort aggregation operator"
                },
                "order": {
                    "$ref": "#/definitions/SortOrder"
                }
            },
            "required": [
                "field",
                "op"
            ]
        },
        "AggregateOp": {
            "type": "string",
            "enum": [
                "values",
                "count",
                "valid",
                "missing",
                "distinct",
                "sum",
                "mean",
                "average",
                "variance",
                "variancep",
                "stdev",
                "stdevp",
                "median",
                "q1",
                "q3",
                "modeskew",
                "min",
                "max",
                "argmin",
                "argmax"
            ]
        },
        "SortOrder": {
            "type": "string",
            "enum": [
                "ascending",
                "descending",
                "none"
            ]
        },
        "Type": {
            "type": "string",
            "enum": [
                "quantitative",
                "ordinal",
                "temporal",
                "nominal"
            ]
        },
        "TimeUnit": {
            "type": "string",
            "enum": [
                "year",
                "month",
                "day",
                "date",
                "hours",
                "minutes",
                "seconds",
                "milliseconds",
                "yearmonth",
                "yearmonthdate",
                "yearmonthdatehours",
                "yearmonthdatehoursminutes",
                "yearmonthdatehoursminutesseconds",
                "hoursminutes",
                "hoursminutesseconds",
                "minutesseconds",
                "secondsmilliseconds",
                "quarter",
                "yearquarter",
                "quartermonth",
                "yearquartermonth"
            ]
        },
        "Bin": {
            "type": "object",
            "properties": {
                "min": {
                    "description": "The minimum bin value to consider. If unspecified, the minimum value of the specified field is used.",
                    "type": "number"
                },
                "max": {
                    "description": "The maximum bin value to consider. If unspecified, the maximum value of the specified field is used.",
                    "type": "number"
                },
                "base": {
                    "description": "The number base to use for automatic bin determination (default is base 10).",
                    "type": "number"
                },
                "step": {
                    "description": "An exact step size to use between bins. If provided, options such as maxbins will be ignored.",
                    "type": "number"
                },
                "steps": {
                    "description": "An array of allowable step sizes to choose from.",
                    "type": "array",
                    "items": {
                        "type": "number"
                    }
                },
                "minstep": {
                    "description": "A minimum allowable step size (particularly useful for integer values).",
                    "type": "number"
                },
                "div": {
                    "description": "Scale factors indicating allowable subdivisions. The default value is [5, 2], which indicates that for base 10 numbers (the default base), the method may consider dividing bin sizes by 5 and/or 2. For example, for an initial step size of 10, the method can check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might also satisfy the given constraints.",
                    "type": "array",
                    "items": {
                        "type": "number"
                    }
                },
                "maxbins": {
                    "description": "Maximum number of bins.",
                    "minimum": 2,
                    "type": "number"
                }
            }
        },
        "ChannelDefWithLegend": {
            "type": "object",
            "properties": {
                "legend": {
                    "$ref": "#/definitions/Legend"
                },
                "scale": {
                    "$ref": "#/definitions/Scale"
                },
                "sort": {
                    "oneOf": [
                        {
                            "$ref": "#/definitions/SortField"
                        },
                        {
                            "$ref": "#/definitions/SortOrder"
                        }
                    ]
                },
                "field": {
                    "description": "Name of the field from which to pull a data value.",
                    "type": "string"
                },
                "type": {
                    "$ref": "#/definitions/Type",
                    "description": "The encoded field's type of measurement. This can be either a full type\n\nname (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`,  and `\"nominal\"`)\n\nor an initial character of the type name (`\"Q\"`, `\"T\"`, `\"O\"`, `\"N\"`).\n\nThis property is case insensitive."
                },
                "value": {
                    "description": "A constant value in visual domain.",
                    "oneOf": [
                        {
                            "type": "number"
                        },
                        {
                            "type": "string"
                        },
                        {
                            "type": "boolean"
                        }
                    ]
                },
                "timeUnit": {
                    "$ref": "#/definitions/TimeUnit",
                    "description": "Time unit for a `temporal` field  (e.g., `year`, `yearmonth`, `month`, `hour`)."
                },
                "bin": {
                    "description": "Flag for binning a `quantitative` field, or a bin property object\n\nfor binning parameters.",
                    "oneOf": [
                        {
                            "type": "boolean"
                        },
                        {
                            "$ref": "#/definitions/Bin",
                            "description": "Binning properties or boolean flag for determining whether to bin data or not."
                        }
                    ]
                },
                "aggregate": {
                    "$ref": "#/definitions/AggregateOp",
                    "description": "Aggregation function for the field\n\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`)."
                },
                "title": {
                    "description": "Title for axis or legend.",
                    "type": "string"
                }
            }
        },
        "Legend": {
            "type": "object",
            "properties": {
                "format": {
                    "description": "An optional formatting pattern for legend labels. Vega uses D3\\'s format pattern.",
                    "type": "string"
                },
                "title": {
                    "description": "A title for the legend. (Shows field name and its function by default.)",
                    "type": "string"
                },
                "values": {
                    "description": "Explicitly set the visible legend values.",
                    "type": "array",
                    "items": {}
                },
                "orient": {
                    "description": "The orientation of the legend. One of \"left\" or \"right\". This determines how the legend is positioned within the scene. The default is \"right\".",
                    "type": "string"
                },
                "offset": {
                    "description": "The offset, in pixels, by which to displace the legend from the edge of the enclosing group or data rectangle.",
                    "type": "number"
                },
                "padding": {
                    "description": "The padding, in pixels, between the lengend and axis.",
                    "type": "number"
                },
                "margin": {
                    "description": "The margin around the legend, in pixels",
                    "type": "number"
                },
                "gradientStrokeColor": {
                    "description": "The color of the gradient stroke, can be in hex color code or regular color name.",
                    "type": "string"
                },
                "gradientStrokeWidth": {
                    "description": "The width of the gradient stroke, in pixels.",
                    "type": "number"
                },
                "gradientHeight": {
                    "description": "The height of the gradient, in pixels.",
                    "type": "number"
                },
                "gradientWidth": {
                    "description": "The width of the gradient, in pixels.",
                    "type": "number"
                },
                "labelAlign": {
                    "description": "The alignment of the legend label, can be left, middle or right.",
                    "type": "string"
                },
                "labelBaseline": {
                    "description": "The position of the baseline of legend label, can be top, middle or bottom.",
                    "type": "string"
                },
                "labelColor": {
                    "description": "The color of the legend label, can be in hex color code or regular color name.",
                    "type": "string"
                },
                "labelFont": {
                    "description": "The font of the lengend label.",
                    "type": "string"
                },
                "labelFontSize": {
                    "description": "The font size of lengend lable.",
                    "type": "number"
                },
                "labelOffset": {
                    "description": "The offset of the legend label.",
                    "type": "number"
                },
                "shortTimeLabels": {
                    "description": "Whether month names and weekday names should be abbreviated.",
                    "type": "boolean"
                },
                "symbolColor": {
                    "description": "The color of the legend symbol,",
                    "type": "string"
                },
                "symbolShape": {
                    "description": "The shape of the legend symbol, can be the 'circle', 'square', 'cross', 'diamond',\n\n'triangle-up', 'triangle-down'.",
                    "type": "string"
                },
                "symbolSize": {
                    "description": "The size of the lengend symbol, in pixels.",
                    "type": "number"
                },
                "symbolStrokeWidth": {
                    "description": "The width of the symbol's stroke.",
                    "type": "number"
                },
                "titleColor": {
                    "description": "Optional mark property definitions for custom legend styling.\n\nThe color of the legend title, can be in hex color code or regular color name.",
                    "type": "string"
                },
                "titleFont": {
                    "description": "The font of the legend title.",
                    "type": "string"
                },
                "titleFontSize": {
                    "description": "The font size of the legend title.",
                    "type": "number"
                },
                "titleFontWeight": {
                    "description": "The font weight of the legend title.",
                    "type": "string"
                },
                "properties": {
                    "description": "Optional mark property definitions for custom legend styling."
                }
            }
        },
        "FieldDef": {
            "type": "object",
            "properties": {
                "field": {
                    "description": "Name of the field from which to pull a data value.",
                    "type": "string"
                },
                "type": {
                    "$ref": "#/definitions/Type",
                    "description": "The encoded field's type of measurement. This can be either a full type\n\nname (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`,  and `\"nominal\"`)\n\nor an initial character of the type name (`\"Q\"`, `\"T\"`, `\"O\"`, `\"N\"`).\n\nThis property is case insensitive."
                },
                "value": {
                    "description": "A constant value in visual domain.",
                    "oneOf": [
                        {
                            "type": "number"
                        },
                        {
                            "type": "string"
                        },
                        {
                            "type": "boolean"
                        }
                    ]
                },
                "timeUnit": {
                    "$ref": "#/definitions/TimeUnit",
                    "description": "Time unit for a `temporal` field  (e.g., `year`, `yearmonth`, `month`, `hour`)."
                },
                "bin": {
                    "description": "Flag for binning a `quantitative` field, or a bin property object\n\nfor binning parameters.",
                    "oneOf": [
                        {
                            "type": "boolean"
                        },
                        {
                            "$ref": "#/definitions/Bin",
                            "description": "Binning properties or boolean flag for determining whether to bin data or not."
                        }
                    ]
                },
                "aggregate": {
                    "$ref": "#/definitions/AggregateOp",
                    "description": "Aggregation function for the field\n\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`)."
                },
                "title": {
                    "description": "Title for axis or legend.",
                    "type": "string"
                }
            }
        },
        "OrderChannelDef": {
            "type": "object",
            "properties": {
                "sort": {
                    "$ref": "#/definitions/SortOrder"
                },
                "field": {
                    "description": "Name of the field from which to pull a data value.",
                    "type": "string"
                },
                "type": {
                    "$ref": "#/definitions/Type",
                    "description": "The encoded field's type of measurement. This can be either a full type\n\nname (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`,  and `\"nominal\"`)\n\nor an initial character of the type name (`\"Q\"`, `\"T\"`, `\"O\"`, `\"N\"`).\n\nThis property is case insensitive."
                },
                "value": {
                    "description": "A constant value in visual domain.",
                    "oneOf": [
                        {
                            "type": "number"
                        },
                        {
                            "type": "string"
                        },
                        {
                            "type": "boolean"
                        }
                    ]
                },
                "timeUnit": {
                    "$ref": "#/definitions/TimeUnit",
                    "description": "Time unit for a `temporal` field  (e.g., `year`, `yearmonth`, `month`, `hour`)."
                },
                "bin": {
                    "description": "Flag for binning a `quantitative` field, or a bin property object\n\nfor binning parameters.",
                    "oneOf": [
                        {
                            "type": "boolean"
                        },
                        {
                            "$ref": "#/definitions/Bin",
                            "description": "Binning properties or boolean flag for determining whether to bin data or not."
                        }
                    ]
                },
                "aggregate": {
                    "$ref": "#/definitions/AggregateOp",
                    "description": "Aggregation function for the field\n\n(e.g., `mean`, `sum`, `median`, `min`, `max`, `count`)."
                },
                "title": {
                    "description": "Title for axis or legend.",
                    "type": "string"
                }
            }
        },
        "Data": {
            "type": "object",
            "properties": {
                "format": {
                    "$ref": "#/definitions/DataFormat",
                    "description": "An object that specifies the format for the data file or values."
                },
                "url": {
                    "description": "A URL from which to load the data set. Use the format.type property\n\nto ensure the loaded data is correctly parsed.",
                    "type": "string"
                },
                "values": {
                    "description": "Pass array of objects instead of a url to a file.",
                    "type": "array",
                    "items": {}
                }
            }
        },
        "DataFormat": {
            "type": "object",
            "properties": {
                "type": {
                    "$ref": "#/definitions/DataFormatType",
                    "description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`.\n\nThe default format type is determined by the extension of the file url.\n\nIf no extension is detected, `\"json\"` will be used by default."
                },
                "property": {
                    "description": "JSON only) The JSON property containing the desired data.\n\nThis parameter can be used when the loaded JSON file may have surrounding structure or meta-data.\n\nFor example `\"property\": \"values.features\"` is equivalent to retrieving `json.values.features`\n\nfrom the loaded JSON object.",
                    "type": "string"
                },
                "feature": {
                    "description": "The name of the TopoJSON object set to convert to a GeoJSON feature collection.\n\nFor example, in a map of the world, there may be an object set named `\"countries\"`.\n\nUsing the feature property, we can extract this set and generate a GeoJSON feature object for each country.",
                    "type": "string"
                },
                "mesh": {
                    "description": "The name of the TopoJSON object set to convert to a mesh.\n\nSimilar to the `feature` option, `mesh` extracts a named TopoJSON object set.\n\nUnlike the `feature` option, the corresponding geo data is returned as a single, unified mesh instance, not as inidividual GeoJSON features.\n\nExtracting a mesh is useful for more efficiently drawing borders or other geographic elements that you do not need to associate with specific regions such as individual countries, states or counties.",
                    "type": "string"
                }
            }
        },
        "DataFormatType": {
            "type": "string",
            "enum": [
                "json",
                "csv",
                "tsv",
                "topojson"
            ]
        },
        "Transform": {
            "type": "object",
            "properties": {
                "filter": {
                    "description": "A string containing the filter Vega expression. Use `datum` to refer to the current data object.",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "$ref": "#/definitions/EqualFilter"
                        },
                        {
                            "$ref": "#/definitions/RangeFilter"
                        },
                        {
                            "$ref": "#/definitions/InFilter"
                        },
                        {
                            "type": "array",
                            "items": {
                                "oneOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "$ref": "#/definitions/EqualFilter"
                                    },
                                    {
                                        "$ref": "#/definitions/RangeFilter"
                                    },
                                    {
                                        "$ref": "#/definitions/InFilter"
                                    }
                                ]
                            }
                        }
                    ]
                },
                "filterInvalid": {
                    "description": "Whether to filter invalid values (`null` and `NaN`) from the data. By default (`undefined`), only quantitative and temporal fields are filtered. If set to `true`, all data items with null values are filtered. If `false`, all data items are included.",
                    "type": "boolean"
                },
                "calculate": {
                    "description": "Calculate new field(s) using the provided expresssion(s). Calculation are applied before filter.",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/Formula",
                        "description": "Formula object for calculate."
                    }
                }
            }
        },
        "EqualFilter": {
            "type": "object",
            "properties": {
                "timeUnit": {
                    "$ref": "#/definitions/TimeUnit",
                    "description": "Time unit for the field to be filtered."
                },
                "field": {
                    "description": "Field to be filtered.",
                    "type": "string"
                },
                "equal": {
                    "description": "Value that the field should be equal to.",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "number"
                        },
                        {
                            "type": "boolean"
                        },
                        {
                            "$ref": "#/definitions/DateTime",
                            "description": "Object for defining datetime in Vega-Lite Filter.\n\nIf both month and quarter are provided, month has higher precedence.\n\n`day` cannot be combined with other date.\n\nWe accept string for month and day names."
                        }
                    ]
                }
            },
            "required": [
                "field",
                "equal"
            ]
        },
        "DateTime": {
            "type": "object",
            "properties": {
                "year": {
                    "description": "Integer value representing the year.",
                    "type": "number"
                },
                "quarter": {
                    "description": "Integer value representing the quarter of the year (from 1-4).",
                    "type": "number"
                },
                "month": {
                    "description": "One of: (1) integer value representing the month from `1`-`12`. `1` represents January;  (2) case-insensitive month name (e.g., `\"January\"`);  (3) case-insensitive, 3-character short month name (e.g., `\"Jan\"`).",
                    "oneOf": [
                        {
                            "type": "number"
                        },
                        {
                            "type": "string"
                        }
                    ]
                },
                "date": {
                    "description": "Integer value representing the date from 1-31.",
                    "type": "number"
                },
                "day": {
                    "description": "Value representing the day of week.  This can be one of: (1) integer value -- `1` represents Monday; (2) case-insensitive day name (e.g., `\"Monday\"`);  (3) case-insensitive, 3-character short day name (e.g., `\"Mon\"`).   <br/> **Warning:** A DateTime definition object with `day`** should not be combined with `year`, `quarter`, `month`, or `date`.",
                    "oneOf": [
                        {
                            "type": "number"
                        },
                        {
                            "type": "string"
                        }
                    ]
                },
                "hours": {
                    "description": "Integer value representing the hour of day from 0-23.",
                    "type": "number"
                },
                "minutes": {
                    "description": "Integer value representing minute segment of a time from 0-59.",
                    "type": "number"
                },
                "seconds": {
                    "description": "Integer value representing second segment of a time from 0-59.",
                    "type": "number"
                },
                "milliseconds": {
                    "description": "Integer value representing millisecond segment of a time.",
                    "type": "number"
                }
            }
        },
        "RangeFilter": {
            "type": "object",
            "properties": {
                "timeUnit": {
                    "$ref": "#/definitions/TimeUnit",
                    "description": "time unit for the field to be filtered."
                },
                "field": {
                    "description": "Field to be filtered",
                    "type": "string"
                },
                "range": {
                    "description": "Array of inclusive minimum and maximum values\n\nfor a field value of a data item to be included in the filtered data.",
                    "maxItems": 2,
                    "minItems": 2,
                    "type": "array",
                    "items": {
                        "oneOf": [
                            {
                                "type": "number"
                            },
                            {
                                "$ref": "#/definitions/DateTime",
                                "description": "Object for defining datetime in Vega-Lite Filter.\n\nIf both month and quarter are provided, month has higher precedence.\n\n`day` cannot be combined with other date.\n\nWe accept string for month and day names."
                            }
                        ]
                    }
                }
            },
            "required": [
                "field",
                "range"
            ]
        },
        "InFilter": {
            "type": "object",
            "properties": {
                "timeUnit": {
                    "$ref": "#/definitions/TimeUnit",
                    "description": "time unit for the field to be filtered."
                },
                "field": {
                    "description": "Field to be filtered",
                    "type": "string"
                },
                "in": {
                    "description": "A set of values that the `field`'s value should be a member of,\n\nfor a data item included in the filtered data.",
                    "type": "array",
                    "items": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "number"
                            },
                            {
                                "type": "boolean"
                            },
                            {
                                "$ref": "#/definitions/DateTime",
                                "description": "Object for defining datetime in Vega-Lite Filter.\n\nIf both month and quarter are provided, month has higher precedence.\n\n`day` cannot be combined with other date.\n\nWe accept string for month and day names."
                            }
                        ]
                    }
                }
            },
            "required": [
                "field",
                "in"
            ]
        },
        "Formula": {
            "type": "object",
            "properties": {
                "field": {
                    "description": "The field in which to store the computed formula value.",
                    "type": "string"
                },
                "expr": {
                    "description": "A string containing an expression for the formula. Use the variable `datum` to to refer to the current data object.",
                    "type": "string"
                }
            },
            "required": [
                "field",
                "expr"
            ]
        },
        "Config": {
            "type": "object",
            "properties": {
                "viewport": {
                    "description": "The width and height of the on-screen viewport, in pixels. If necessary, clipping and scrolling will be applied.",
                    "type": "number"
                },
                "background": {
                    "description": "CSS color property to use as background of visualization. Default is `\"transparent\"`.",
                    "type": "string"
                },
                "numberFormat": {
                    "description": "D3 Number format for axis labels and text tables. For example \"s\" for SI units.",
                    "type": "string"
                },
                "timeFormat": {
                    "description": "Default datetime format for axis and legend labels. The format can be set directly on each axis and legend.",
                    "type": "string"
                },
                "countTitle": {
                    "description": "Default axis and legend title for count fields.",
                    "type": "string"
                },
                "cell": {
                    "$ref": "#/definitions/CellConfig",
                    "description": "Cell Config"
                },
                "mark": {
                    "$ref": "#/definitions/MarkConfig",
                    "description": "Mark Config"
                },
                "overlay": {
                    "$ref": "#/definitions/OverlayConfig",
                    "description": "Mark Overlay Config"
                },
                "scale": {
                    "$ref": "#/definitions/ScaleConfig",
                    "description": "Scale Config"
                },
                "axis": {
                    "$ref": "#/definitions/AxisConfig",
                    "description": "Axis Config"
                },
                "legend": {
                    "$ref": "#/definitions/LegendConfig",
                    "description": "Legend Config"
                },
                "facet": {
                    "$ref": "#/definitions/FacetConfig",
                    "description": "Facet Config"
                }
            }
        },
        "CellConfig": {
            "type": "object",
            "properties": {
                "width": {
                    "type": "number"
                },
                "height": {
                    "type": "number"
                },
                "clip": {
                    "type": "boolean"
                },
                "fill": {
                    "description": "The fill color.",
                    "format": "color",
                    "type": "string"
                },
                "fillOpacity": {
                    "description": "The fill opacity (value between [0,1]).",
                    "type": "number"
                },
                "stroke": {
                    "description": "The stroke color.",
                    "type": "string"
                },
                "strokeOpacity": {
                    "description": "The stroke opacity (value between [0,1]).",
                    "type": "number"
                },
                "strokeWidth": {
                    "description": "The stroke width, in pixels.",
                    "type": "number"
                },
                "strokeDash": {
                    "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
                    "type": "array",
                    "items": {
                        "type": "number"
                    }
                },
                "strokeDashOffset": {
                    "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
                    "type": "number"
                }
            }
        },
        "MarkConfig": {
            "type": "object",
            "properties": {
                "filled": {
                    "description": "Whether the shape\\'s color should be used as fill color instead of stroke color.\n\nThis is only applicable for \"bar\", \"point\", and \"area\".\n\nAll marks except \"point\" marks are filled by default.\n\nSee Mark Documentation (http://vega.github.io/vega-lite/docs/marks.html)\n\nfor usage example.",
                    "type": "boolean"
                },
                "color": {
                    "description": "Default color.",
                    "format": "color",
                    "type": "string"
                },
                "fill": {
                    "description": "Default Fill Color.  This has higher precedence than config.color",
                    "format": "color",
                    "type": "string"
                },
                "stroke": {
                    "description": "Default Stroke Color.  This has higher precedence than config.color",
                    "format": "color",
                    "type": "string"
                },
                "opacity": {
                    "minimum": 0,
                    "maximum": 1,
                    "type": "number"
                },
                "fillOpacity": {
                    "minimum": 0,
                    "maximum": 1,
                    "type": "number"
                },
                "strokeOpacity": {
                    "minimum": 0,
                    "maximum": 1,
                    "type": "number"
                },
                "strokeWidth": {
                    "minimum": 0,
                    "type": "number"
                },
                "strokeDash": {
                    "description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
                    "type": "array",
                    "items": {
                        "type": "number"
                    }
                },
                "strokeDashOffset": {
                    "description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
                    "type": "number"
                },
                "stacked": {
                    "$ref": "#/definitions/StackOffset"
                },
                "orient": {
                    "$ref": "#/definitions/Orient",
                    "description": "The orientation of a non-stacked bar, tick, area, and line charts.\n\nThe value is either horizontal (default) or vertical.\n\n- For bar, rule and tick, this determines whether the size of the bar and tick\n\nshould be applied to x or y dimension.\n\n- For area, this property determines the orient property of the Vega output.\n\n- For line, this property determines the sort order of the points in the line\n\nif `config.sortLineBy` is not specified.\n\nFor stacked charts, this is always determined by the orientation of the stack;\n\ntherefore explicitly specified value will be ignored."
                },
                "interpolate": {
                    "$ref": "#/definitions/Interpolate",
                    "description": "The line interpolation method to use. One of linear, step-before, step-after, basis, basis-open, cardinal, cardinal-open, monotone."
                },
                "tension": {
                    "description": "Depending on the interpolation type, sets the tension parameter.",
                    "type": "number"
                },
                "lineSize": {
                    "description": "Size of line mark.",
                    "type": "number"
                },
                "ruleSize": {
                    "description": "Size of rule mark.",
                    "type": "number"
                },
                "barSize": {
                    "description": "The size of the bars.  If unspecified, the default size is  `bandSize-1`,\n\nwhich provides 1 pixel offset between bars.",
                    "type": "number"
                },
                "barThinSize": {
                    "description": "The size of the bars on continuous scales.",
                    "type": "number"
                },
                "shape": {
                    "$ref": "#/definitions/Shape",
                    "description": "The symbol shape to use. One of circle (default), square, cross, diamond, triangle-up, or triangle-down."
                },
                "size": {
                    "description": "The pixel area each the point. For example: in the case of circles, the radius is determined in part by the square root of the size value.",
                    "type": "number"
                },
                "tickSize": {
                    "description": "The width of the ticks.",
                    "type": "number"
                },
                "tickThickness": {
                    "description": "Thickness of the tick mark.",
                    "type": "number"
                },
                "align": {
                    "$ref": "#/definitions/HorizontalAlign",
                    "description": "The horizontal alignment of the text. One of left, right, center."
                },
                "angle": {
                    "description": "The rotation angle of the text, in degrees.",
                    "type": "number"
                },
                "baseline": {
                    "$ref": "#/definitions/VerticalAlign",
                    "description": "The vertical alignment of the text. One of top, middle, bottom."
                },
                "dx": {
                    "description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.",
                    "type": "number"
                },
                "dy": {
                    "description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.",
                    "type": "number"
                },
                "radius": {
                    "description": "Polar coordinate radial offset, in pixels, of the text label from the origin determined by the x and y properties.",
                    "type": "number"
                },
                "theta": {
                    "description": "Polar coordinate angle, in radians, of the text label from the origin determined by the x and y properties. Values for theta follow the same convention of arc mark startAngle and endAngle properties: angles are measured in radians, with 0 indicating \"north\".",
                    "type": "number"
                },
                "font": {
                    "description": "The typeface to set the text in (e.g., Helvetica Neue).",
                    "type": "string"
                },
                "fontSize": {
                    "description": "The font size, in pixels.",
                    "type": "number"
                },
                "fontStyle": {
                    "$ref": "#/definitions/FontStyle",
                    "description": "The font style (e.g., italic)."
                },
                "fontWeight": {
                    "$ref": "#/definitions/FontWeight",
                    "description": "The font weight (e.g., bold)."
                },
                "format": {
                    "description": "The formatting pattern for text value. If not defined, this will be determined automatically.",
                    "type": "string"
                },
                "shortTimeLabels": {
                    "description": "Whether month names and weekday names should be abbreviated.",
                    "type": "boolean"
                },
                "text": {
                    "description": "Placeholder Text",
                    "type": "string"
                },
                "applyColorToBackground": {
                    "description": "Apply color field to background color instead of the text.",
                    "type": "boolean"
                }
            }
        },
        "StackOffset": {
            "type": "string",
            "enum": [
                "zero",
                "center",
                "normalize",
                "none"
            ]
        },
        "Orient": {
            "type": "string",
            "enum": [
                "horizontal",
                "vertical"
            ]
        },
        "Interpolate": {
            "type": "string",
            "enum": [
                "linear",
                "linear-closed",
                "step",
                "step-before",
                "step-after",
                "basis",
                "basis-open",
                "basis-closed",
                "cardinal",
                "cardinal-open",
                "cardinal-closed",
                "bundle",
                "monotone"
            ]
        },
        "Shape": {
            "type": "string",
            "enum": [
                "circle",
                "square",
                "cross",
                "diamond",
                "triangle-up",
                "triangle-down"
            ]
        },
        "HorizontalAlign": {
            "type": "string",
            "enum": [
                "left",
                "right",
                "center"
            ]
        },
        "VerticalAlign": {
            "type": "string",
            "enum": [
                "top",
                "middle",
                "bottom"
            ]
        },
        "FontStyle": {
            "type": "string",
            "enum": [
                "normal",
                "italic"
            ]
        },
        "FontWeight": {
            "type": "string",
            "enum": [
                "normal",
                "bold"
            ]
        },
        "OverlayConfig": {
            "type": "object",
            "properties": {
                "line": {
                    "description": "Whether to overlay line with point.",
                    "type": "boolean"
                },
                "area": {
                    "$ref": "#/definitions/AreaOverlay",
                    "description": "Type of overlay for area mark (line or linepoint)"
                },
                "pointStyle": {
                    "$ref": "#/definitions/MarkConfig",
                    "description": "Default style for the overlayed point."
                },
                "lineStyle": {
                    "$ref": "#/definitions/MarkConfig",
                    "description": "Default style for the overlayed point."
                }
            }
        },
        "AreaOverlay": {
            "type": "string",
            "enum": [
                "line",
                "linepoint",
                "none"
            ]
        },
        "ScaleConfig": {
            "type": "object",
            "properties": {
                "round": {
                    "description": "If true, rounds numeric output values to integers.\n\nThis can be helpful for snapping to the pixel grid.\n\n(Only available for `x`, `y`, `size`, `row`, and `column` scales.)",
                    "type": "boolean"
                },
                "textBandWidth": {
                    "description": "Default band width for `x` ordinal scale when is mark is `text`.",
                    "minimum": 0,
                    "type": "number"
                },
                "bandSize": {
                    "description": "Default band size for (1) `y` ordinal scale,\n\nand (2) `x` ordinal scale when the mark is not `text`.",
                    "minimum": 0,
                    "type": "number"
                },
                "opacity": {
                    "description": "Default range for opacity.",
                    "type": "array",
                    "items": {
                        "type": "number"
                    }
                },
                "padding": {
                    "description": "Default padding for `x` and `y` ordinal scales.",
                    "type": "number"
                },
                "useRawDomain": {
                    "description": "Uses the source data range as scale domain instead of aggregated data for aggregate axis.\n\nThis property only works with aggregate functions that produce values within the raw data domain (`\"mean\"`, `\"average\"`, `\"stdev\"`, `\"stdevp\"`, `\"median\"`, `\"q1\"`, `\"q3\"`, `\"min\"`, `\"max\"`). For other aggregations that produce values outside of the raw data domain (e.g. `\"count\"`, `\"sum\"`), this property is ignored.",
                    "type": "boolean"
                },
                "nominalColorRange": {
                    "description": "Default range for nominal color scale",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "sequentialColorRange": {
                    "description": "Default range for ordinal / continuous color scale",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "shapeRange": {
                    "description": "Default range for shape",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "barSizeRange": {
                    "description": "Default range for bar size scale",
                    "type": "array",
                    "items": {
                        "type": "number"
                    }
                },
                "fontSizeRange": {
                    "description": "Default range for font size scale",
                    "type": "array",
                    "items": {
                        "type": "number"
                    }
                },
                "ruleSizeRange": {
                    "description": "Default range for rule stroke widths",
                    "type": "array",
                    "items": {
                        "type": "number"
                    }
                },
                "tickSizeRange": {
                    "description": "Default range for tick spans",
                    "type": "array",
                    "items": {
                        "type": "number"
                    }
                },
                "pointSizeRange": {
                    "description": "Default range for bar size scale",
                    "type": "array",
                    "items": {
                        "type": "number"
                    }
                }
            }
        },
        "AxisConfig": {
            "type": "object",
            "properties": {
                "axisWidth": {
                    "description": "Width of the axis line",
                    "type": "number"
                },
                "layer": {
                    "description": "A string indicating if the axis (and any gridlines) should be placed above or below the data marks.",
                    "type": "string"
                },
                "offset": {
                    "description": "The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.",
                    "type": "number"
                },
                "axisColor": {
                    "description": "Color of axis line.",
                    "type": "string"
                },
                "grid": {
                    "description": "A flag indicate if gridlines should be created in addition to ticks. If `grid` is unspecified, the default value is `true` for ROW and COL. For X and Y, the default value is `true` for quantitative and time fields and `false` otherwise.",
                    "type": "boolean"
                },
                "gridColor": {
                    "description": "Color of gridlines.",
                    "type": "string"
                },
                "gridDash": {
                    "description": "The offset (in pixels) into which to begin drawing with the grid dash array.",
                    "type": "array",
                    "items": {
                        "type": "number"
                    }
                },
                "gridOpacity": {
                    "description": "The stroke opacity of grid (value between [0,1])",
                    "type": "number"
                },
                "gridWidth": {
                    "description": "The grid width, in pixels.",
                    "type": "number"
                },
                "labels": {
                    "description": "Enable or disable labels.",
                    "type": "boolean"
                },
                "labelAngle": {
                    "description": "The rotation angle of the axis labels.",
                    "type": "number"
                },
                "labelAlign": {
                    "description": "Text alignment for the Label.",
                    "type": "string"
                },
                "labelBaseline": {
                    "description": "Text baseline for the label.",
                    "type": "string"
                },
                "labelMaxLength": {
                    "description": "Truncate labels that are too long.",
                    "minimum": 1,
                    "type": "number"
                },
                "shortTimeLabels": {
                    "description": "Whether month and day names should be abbreviated.",
                    "type": "boolean"
                },
                "subdivide": {
                    "description": "If provided, sets the number of minor ticks between major ticks (the value 9 results in decimal subdivision). Only applicable for axes visualizing quantitative scales.",
                    "type": "number"
                },
                "ticks": {
                    "description": "A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are \"nice\" (multiples of 2, 5, 10) and lie within the underlying scale's range.",
                    "minimum": 0,
                    "type": "number"
                },
                "tickColor": {
                    "description": "The color of the axis's tick.",
                    "type": "string"
                },
                "tickLabelColor": {
                    "description": "The color of the tick label, can be in hex color code or regular color name.",
                    "type": "string"
                },
                "tickLabelFont": {
                    "description": "The font of the tick label.",
                    "type": "string"
                },
                "tickLabelFontSize": {
                    "description": "The font size of label, in pixels.",
                    "type": "number"
                },
                "tickPadding": {
                    "description": "The padding, in pixels, between ticks and text labels.",
                    "type": "number"
                },
                "tickSize": {
                    "description": "The size, in pixels, of major, minor and end ticks.",
                    "minimum": 0,
                    "type": "number"
                },
                "tickSizeMajor": {
                    "description": "The size, in pixels, of major ticks.",
                    "minimum": 0,
                    "type": "number"
                },
                "tickSizeMinor": {
                    "description": "The size, in pixels, of minor ticks.",
                    "minimum": 0,
                    "type": "number"
                },
                "tickSizeEnd": {
                    "description": "The size, in pixels, of end ticks.",
                    "minimum": 0,
                    "type": "number"
                },
                "tickWidth": {
                    "description": "The width, in pixels, of ticks.",
                    "type": "number"
                },
                "titleColor": {
                    "description": "Color of the title, can be in hex color code or regular color name.",
                    "type": "string"
                },
                "titleFont": {
                    "description": "Font of the title.",
                    "type": "string"
                },
                "titleFontSize": {
                    "description": "Size of the title.",
                    "type": "number"
                },
                "titleFontWeight": {
                    "description": "Weight of the title.",
                    "type": "string"
                },
                "titleOffset": {
                    "description": "A title offset value for the axis.",
                    "type": "number"
                },
                "titleMaxLength": {
                    "description": "Max length for axis title if the title is automatically generated from the field's description. By default, this is automatically based on cell size and characterWidth property.",
                    "minimum": 0,
                    "type": "number"
                },
                "characterWidth": {
                    "description": "Character width for automatically determining title max length.",
                    "type": "number"
                },
                "properties": {
                    "description": "Optional mark property definitions for custom axis styling."
                }
            }
        },
        "LegendConfig": {
            "type": "object",
            "properties": {
                "orient": {
                    "description": "The orientation of the legend. One of \"left\" or \"right\". This determines how the legend is positioned within the scene. The default is \"right\".",
                    "type": "string"
                },
                "offset": {
                    "description": "The offset, in pixels, by which to displace the legend from the edge of the enclosing group or data rectangle.",
                    "type": "number"
                },
                "padding": {
                    "description": "The padding, in pixels, between the lengend and axis.",
                    "type": "number"
                },
                "margin": {
                    "description": "The margin around the legend, in pixels",
                    "type": "number"
                },
                "gradientStrokeColor": {
                    "description": "The color of the gradient stroke, can be in hex color code or regular color name.",
                    "type": "string"
                },
                "gradientStrokeWidth": {
                    "description": "The width of the gradient stroke, in pixels.",
                    "type": "number"
                },
                "gradientHeight": {
                    "description": "The height of the gradient, in pixels.",
                    "type": "number"
                },
                "gradientWidth": {
                    "description": "The width of the gradient, in pixels.",
                    "type": "number"
                },
                "labelAlign": {
                    "description": "The alignment of the legend label, can be left, middle or right.",
                    "type": "string"
                },
                "labelBaseline": {
                    "description": "The position of the baseline of legend label, can be top, middle or bottom.",
                    "type": "string"
                },
                "labelColor": {
                    "description": "The color of the legend label, can be in hex color code or regular color name.",
                    "type": "string"
                },
                "labelFont": {
                    "description": "The font of the lengend label.",
                    "type": "string"
                },
                "labelFontSize": {
                    "description": "The font size of lengend lable.",
                    "type": "number"
                },
                "labelOffset": {
                    "description": "The offset of the legend label.",
                    "type": "number"
                },
                "shortTimeLabels": {
                    "description": "Whether month names and weekday names should be abbreviated.",
                    "type": "boolean"
                },
                "symbolColor": {
                    "description": "The color of the legend symbol,",
                    "type": "string"
                },
                "symbolShape": {
                    "description": "The shape of the legend symbol, can be the 'circle', 'square', 'cross', 'diamond',\n\n'triangle-up', 'triangle-down'.",
                    "type": "string"
                },
                "symbolSize": {
                    "description": "The size of the lengend symbol, in pixels.",
                    "type": "number"
                },
                "symbolStrokeWidth": {
                    "description": "The width of the symbol's stroke.",
                    "type": "number"
                },
                "titleColor": {
                    "description": "Optional mark property definitions for custom legend styling.\n\nThe color of the legend title, can be in hex color code or regular color name.",
                    "type": "string"
                },
                "titleFont": {
                    "description": "The font of the legend title.",
                    "type": "string"
                },
                "titleFontSize": {
                    "description": "The font size of the legend title.",
                    "type": "number"
                },
                "titleFontWeight": {
                    "description": "The font weight of the legend title.",
                    "type": "string"
                },
                "properties": {
                    "description": "Optional mark property definitions for custom legend styling."
                }
            }
        },
        "FacetConfig": {
            "type": "object",
            "properties": {
                "scale": {
                    "$ref": "#/definitions/FacetScaleConfig",
                    "description": "Facet Scale Config"
                },
                "axis": {
                    "$ref": "#/definitions/AxisConfig",
                    "description": "Facet Axis Config"
                },
                "grid": {
                    "$ref": "#/definitions/FacetGridConfig",
                    "description": "Facet Grid Config"
                },
                "cell": {
                    "$ref": "#/definitions/CellConfig",
                    "description": "Facet Cell Config"
                }
            }
        },
        "FacetScaleConfig": {
            "type": "object",
            "properties": {
                "round": {
                    "type": "boolean"
                },
                "padding": {
                    "type": "number"
                }
            }
        },
        "FacetGridConfig": {
            "type": "object",
            "properties": {
                "color": {
                    "format": "color",
                    "type": "string"
                },
                "opacity": {
                    "type": "number"
                },
                "offset": {
                    "type": "number"
                }
            }
        },
        "FacetSpec": {
            "type": "object",
            "properties": {
                "facet": {
                    "$ref": "#/definitions/Facet"
                },
                "spec": {
                    "oneOf": [
                        {
                            "$ref": "#/definitions/LayerSpec"
                        },
                        {
                            "$ref": "#/definitions/UnitSpec"
                        }
                    ]
                },
                "name": {
                    "description": "Name of the visualization for later reference.",
                    "type": "string"
                },
                "description": {
                    "description": "An optional description of this mark for commenting purpose.\n\nThis property has no effect on the output visualization.",
                    "type": "string"
                },
                "data": {
                    "$ref": "#/definitions/Data",
                    "description": "An object describing the data source"
                },
                "transform": {
                    "$ref": "#/definitions/Transform",
                    "description": "An object describing filter and new field calculation."
                },
                "config": {
                    "$ref": "#/definitions/Config",
                    "description": "Configuration object"
                }
            },
            "required": [
                "facet",
                "spec"
            ]
        },
        "Facet": {
            "type": "object",
            "properties": {
                "row": {
                    "$ref": "#/definitions/PositionChannelDef"
                },
                "column": {
                    "$ref": "#/definitions/PositionChannelDef"
                }
            }
        },
        "LayerSpec": {
            "type": "object",
            "properties": {
                "layers": {
                    "description": "Unit specs that will be layered.",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/UnitSpec"
                    }
                },
                "name": {
                    "description": "Name of the visualization for later reference.",
                    "type": "string"
                },
                "description": {
                    "description": "An optional description of this mark for commenting purpose.\n\nThis property has no effect on the output visualization.",
                    "type": "string"
                },
                "data": {
                    "$ref": "#/definitions/Data",
                    "description": "An object describing the data source"
                },
                "transform": {
                    "$ref": "#/definitions/Transform",
                    "description": "An object describing filter and new field calculation."
                },
                "config": {
                    "$ref": "#/definitions/Config",
                    "description": "Configuration object"
                }
            },
            "required": [
                "layers"
            ]
        },
        "UnitSpec": {
            "type": "object",
            "properties": {
                "mark": {
                    "$ref": "#/definitions/Mark",
                    "description": "The mark type.\n\nOne of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n\n`\"area\"`, `\"point\"`, `\"rule\"`, and `\"text\"`."
                },
                "encoding": {
                    "$ref": "#/definitions/UnitEncoding",
                    "description": "A key-value mapping between encoding channels and definition of fields."
                },
                "name": {
                    "description": "Name of the visualization for later reference.",
                    "type": "string"
                },
                "description": {
                    "description": "An optional description of this mark for commenting purpose.\n\nThis property has no effect on the output visualization.",
                    "type": "string"
                },
                "data": {
                    "$ref": "#/definitions/Data",
                    "description": "An object describing the data source"
                },
                "transform": {
                    "$ref": "#/definitions/Transform",
                    "description": "An object describing filter and new field calculation."
                },
                "config": {
                    "$ref": "#/definitions/Config",
                    "description": "Configuration object"
                }
            },
            "required": [
                "mark"
            ]
        },
        "UnitEncoding": {
            "type": "object",
            "properties": {
                "x": {
                    "$ref": "#/definitions/PositionChannelDef",
                    "description": "X coordinates for `point`, `circle`, `square`,\n\n`line`, `rule`, `text`, and `tick`\n\n(or to width and height for `bar` and `area` marks)."
                },
                "y": {
                    "$ref": "#/definitions/PositionChannelDef",
                    "description": "Y coordinates for `point`, `circle`, `square`,\n\n`line`, `rule`, `text`, and `tick`\n\n(or to width and height for `bar` and `area` marks)."
                },
                "x2": {
                    "$ref": "#/definitions/PositionChannelDef",
                    "description": "X2 coordinates for ranged `bar`, `rule`, `area`"
                },
                "y2": {
                    "$ref": "#/definitions/PositionChannelDef",
                    "description": "Y2 coordinates for ranged `bar`, `rule`, `area`"
                },
                "color": {
                    "$ref": "#/definitions/ChannelDefWithLegend",
                    "description": "Color of the marks \u2013 either fill or stroke color based on mark type.\n\n(By default, fill color for `area`, `bar`, `tick`, `text`, `circle`, and `square` /\n\nstroke color for `line` and `point`.)"
                },
                "opacity": {
                    "$ref": "#/definitions/ChannelDefWithLegend",
                    "description": "Opacity of the marks \u2013 either can be a value or in a range."
                },
                "size": {
                    "$ref": "#/definitions/ChannelDefWithLegend",
                    "description": "Size of the mark.\n\n- For `point`, `square` and `circle`\n\n\u2013 the symbol size, or pixel area of the mark.\n\n- For `bar` and `tick` \u2013 the bar and tick's size.\n\n- For `text` \u2013 the text's font size.\n\n- Size is currently unsupported for `line` and `area`."
                },
                "shape": {
                    "$ref": "#/definitions/ChannelDefWithLegend",
                    "description": "The symbol's shape (only for `point` marks). The supported values are\n\n`\"circle\"` (default), `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`,\n\nor `\"triangle-down\"`."
                },
                "detail": {
                    "description": "Additional levels of detail for grouping data in aggregate views and\n\nin line and area marks without mapping data to a specific visual channel.",
                    "oneOf": [
                        {
                            "$ref": "#/definitions/FieldDef",
                            "description": "Interface for any kind of FieldDef;\n\nFor simplicity, we do not declare multiple interfaces of FieldDef like\n\nwe do for JSON schema."
                        },
                        {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/FieldDef",
                                "description": "Interface for any kind of FieldDef;\n\nFor simplicity, we do not declare multiple interfaces of FieldDef like\n\nwe do for JSON schema."
                            }
                        }
                    ]
                },
                "text": {
                    "$ref": "#/definitions/FieldDef",
                    "description": "Text of the `text` mark."
                },
                "label": {
                    "$ref": "#/definitions/FieldDef"
                },
                "path": {
                    "description": "Order of data points in line marks.",
                    "oneOf": [
                        {
                            "$ref": "#/definitions/OrderChannelDef"
                        },
                        {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/OrderChannelDef"
                            }
                        }
                    ]
                },
                "order": {
                    "description": "Layer order for non-stacked marks, or stack order for stacked marks.",
                    "oneOf": [
                        {
                            "$ref": "#/definitions/OrderChannelDef"
                        },
                        {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/OrderChannelDef"
                            }
                        }
                    ]
                }
            }
        }
    },
    "$schema": "http://json-schema.org/draft-04/schema#"
}