import { PrimitiveType, StructType } from "../east"; /** * Definition of an aggregation operation to perform on a field, the following aggregations are supported: * @property {string} count - Calculate the total count of data objects in the group. * @property {string} valid - Calculate the count of field values that are not null, undefined or NaN. * @property {string} values - Calculate a list of data objects in the group. * @property {string} missing - Calculate the count of null or undefined field values. * @property {string} distinct - Calculate the count of distinct field values. * @property {string} sum - Calculate the total sum of field values. * @property {string} product - Calculate the product of field values. * @property {string} mean - Calculate the mean (average) field value. * @property {string} average - Calculate the mean (average) field value. Identical to mean. * @property {string} variance - Calculate the sample variance of field values. * @property {string} variancep - Calculate the population variance of field values. * @property {string} stdev - Calculate the sample standard deviation of field values. * @property {string} stdevp - Calculate the population standard deviation of field values. * @property {string} stderr - Calculate the standard error of field values. * @property {string} median - Calculate the median field value. * @property {string} q1 - Calculate the lower quartile boundary of field values. * @property {string} q3 - Calculate the upper quartile boundary of field values. * @property {string} ci0 - Calculate the lower boundary of the bootstrapped 95% confidence interval of the mean field value. * @property {string} ci1 - Calculate the upper boundary of the bootstrapped 95% confidence interval of the mean field value. * @property {string} min - Calculate the minimum field value. * @property {string} max - Calculate the maximum field value. */ export type Aggregate = 'count' | 'valid' | 'values' | 'missing' | 'distinct' | 'sum' | 'product' | 'mean' | 'average' | 'variance' | 'variancep' | 'stdev' | 'stdevp' | 'stderr' | 'median' | 'q1' | 'q3' | 'ci0' | 'ci1' | 'min' | 'max'; /** * Time unit is used to discretize date time field values, the following time units are supported: * - "year": Gregorian calendar years. * - "quarter": Three-month intervals, starting in one of January, April, July, and October. * - "month": Calendar months (January, February, etc.). * - "date": Calendar day of the month (January 1, January 2, etc.). * - "week": Sunday-based weeks. Days before the first Sunday of the year are considered to be in week 0, the first Sunday of the year is the start of week 1, the second Sunday week 2, etc.. * - "day": Day of the week (Sunday, Monday, etc.). * - "dayofyear": Day of the year (1, 2, …, 365, etc.). * - "hours": Hours of the day (12:00am, 1:00am, etc.). * - "minutes": Minutes in an hour (12:00, 12:01, etc.). * - "seconds": Seconds in a minute (12:00:00, 12:00:01, etc.). * - "milliseconds": Milliseconds in a second. * The time units may be used and combined in different ways: * - (1) Time units can also be a string of consecutive time units to indicate desired intervals of time. For example, yearmonthdate indicates chronological time sensitive to year, month, and date (but not to hours, minutes, or seconds). The specifier monthdate is sensitive to month and date, but not year, which can be useful for binning time values to look at seasonal patterns only. * - (2) By default, all time units represent date time using local time. * - (3) To use UTC time, you can add the utc prefix (e.g., "utcyear", "utcyearmonth"). * - (4) (For timeUnit in encoding, you can also add "binned" prefix (e.g., "binnedyearmonth" or "binnedutcyearmonth") for Chronological time units (i.e., units that are truncated date times, as opposed to circle time units, which bin data to parts of date times). * */ export type DiscreteTimeUnit = 'year' | 'quarter' | 'month' | 'week' | 'day' | 'dayofyear' | 'date' | 'hours' | 'minutes' | 'seconds' | 'milliseconds' | 'yearquarter' | 'yearquartermonth' | 'yearmonth' | 'yearmonthdate' | 'yearmonthdatehours' | 'yearmonthdatehoursminutes' | 'yearmonthdatehoursminutesseconds' | 'yearweek' | 'yearweekday' | 'yearweekdayhours' | 'yearweekdayhoursminutes' | 'yearweekdayhoursminutesseconds' | 'yeardayofyear' | 'quartermonth' | 'monthdate' | 'monthdatehours' | 'monthdatehoursminutes' | 'monthdatehoursminutesseconds' | 'weekday' | 'weeksdayhours' | 'weekdayhoursminutes' | 'weekdayhoursminutesseconds' | 'dayhours' | 'dayhoursminutes' | 'dayhoursminutesseconds' | 'hoursminutes' | 'hoursminutesseconds' | 'minutesseconds' | 'secondsmilliseconds'; /** * Definition of the sorting to apply to field values * To order the data by the field values natural order the sort property can be: * - "ascending" (Default) – sort by the field values in ascending order. * - "descending" – sort by the field values in descending order. * */ export type SortOrder = "ascending" | "descending"; /** * Define the type of stacking offset (normalization) if the field should be stacked. Stack is only applicable for the following channels: * - (1) x, * - (2) y, * - (3) theta, * - (4) radius channels with continuous domains. * Normalization can be one of the following values: * - "zero": stacking with baseline offset at zero value of the scale (for creating typical stacked bar and area chart). * - "normalize": stacking with normalized domain (for creating normalized stacked bar and area charts and pie charts with percentage tooltip). * - "center": stacking with center baseline (for streamgraph). * - null: No-stacking. This will produce layered bar and area chart. * */ export type Normalize = "center" | "normalize" | "zero"; /** Definition to sort by another field */ export type FieldSort = { /** the type of sort */ type: 'field'; /** the field to sort by */ field: string; /** the sort operation */ op: Aggregate; /** the sort order */ order: SortOrder; }; /** Definition to sort in a direction */ export type ValueSort = { /** the type of sort */ type: 'value'; /** the sort order */ order: SortOrder; }; /** Definition for a binning operation */ export type Bin = { /** a value in the binned domain at which to anchor the bins */ anchor?: number | undefined; /** the range of desired bin values */ extent?: [min: number, max: number] | undefined; /** the range of desired bin values */ maxbins?: number | undefined; /** a minimum allowable step size */ minstep?: number | undefined; /** attempts to make the bin boundaries use human-friendly boundaries */ nice?: boolean | undefined; /** an exact step size to use between bins (If provided, options such as maxbins will be ignored). */ step?: number | undefined; /** an array of allowable step sizes to choose from.. */ steps?: number[] | undefined; }; /** Definition for either type of sort */ export type EncodingSort = FieldSort | ValueSort; /** Definition of a date time field encoding */ export type TemporalEncodingBase = { /** the data field to encode, this must be a BooleanType, IntegerType, FloatType, StringType or DateTimeType field within the provided data */ field: string; /** the type of encoding */ type: 'nominal' | 'ordinal' | 'quantitative' | 'temporal'; /** the time unit to use to discretize the field value if the type is temporal */ timeUnit?: DiscreteTimeUnit | undefined; /** the title to display */ title?: string | undefined; }; /** Definition of a date time field encoding */ export type TemporalEncoding = TemporalEncodingBase & { /** the kind of value */ kind: 'datetime'; /** the human readable name of the field */ name: string; /** the sorting to apply to the value */ sort?: ValueSort | undefined; }; /** * Definition of a data field encoding * The type of measurement ("quantitative", "temporal", "ordinal", or "nominal") for the encoded field or constant value (datum). It can also be a "geojson" type for encoding ‘geoshape’. * Data types can be inferred in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified aggregate (except argmin and argmax), bin, scale type, custom sort order, nor timeUnit or (2) if you wish to use an ordinal scale for a field with bin or timeUnit. * * Default value: * 1) For a data field, "nominal" is the default data type unless the field encoding has aggregate, channel, bin, scale type, sort, or timeUnit that satisfies the following criteria: * - "quantitative" is the default type if (1) the encoded field contains bin or aggregate except "argmin" and "argmax", (2) the encoding channel is latitude or longitude channel or (3) if the specified scale type is a quantitative scale. * - "temporal" is the default type if (1) the encoded field contains timeUnit or (2) the specified scale type is a time or utc scale * - "ordinal" is the default type if (1) the encoded field contains a custom sort order, (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is order. * 2) For a constant value in data domain (datum): * - "quantitative" if the datum is a number * - "nominal" if the datum is a string * - "temporal" if the datum is a date time object * Note: * - Data type describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. * - Data values for a temporal field can be either a date-time string (e.g., "2015-03-07 12:32:17", "17:01", "2015-03-16". "2015") or a timestamp number (e.g., 1552199579097). * - When using with bin, the type property can be either "quantitative" (for using a linear bin scale) or "ordinal" (for using an ordinal bin scale). * - When using with timeUnit, the type property can be either "temporal" (default, for using a temporal scale) or "ordinal" (for using an ordinal scale). * - When using with aggregate, the type property refers to the post-aggregation data type. * - Secondary channels (e.g., x2, y2, xError, yError) do not have type as they must have exactly the same type as their primary channels (e.g., x, y). * */ export type FieldType = 'nominal' | 'ordinal' | 'quantitative' | 'temporal'; /** Definition of a numeric field encoding */ export type NumericEncodingBase = { /** the data field to encode, this must be a BooleanType, IntegerType, FloatType, StringType or DateTimeType field within the provided data */ field: string; /** the type of encoding */ type: FieldType; /** the title to display*/ title?: string | undefined; /** * The aggregation operation for the field (e.g., "mean", "sum", "median", "min", "max", "count". * The aggregate property of a field definition can be used to compute aggregate summary statistics (e.g., median, min, max) over groups of data. * If at least one fields in the specified encoding channels contain aggregate, the resulting visualization will show aggregate data. In this case, all fields without aggregation function specified are treated as group-by fields1 in the aggregation process. * For example, the following bar chart aggregates mean of Acceleration, grouped by the number of Cylinders. * ```typescript * "encodings": { * "x": {"field": "Cylinders"}, * "y": {"aggregate": "mean", "field": "Acceleration"} * } * Note: aggregated fields are quantitative by default while unaggregated (group by) fields in aggregated encodings are nominal by default. * ``` * */ aggregate?: Aggregate | undefined; /** the binning of the values, used to create discrete bins of data from numeric data */ bin?: Bin | boolean | undefined; }; /** Definition of a numeric field encoding */ export type NumericEncoding = NumericEncodingBase & { /** the kind of value */ kind: 'numeric'; /** the human readable name of the field */ name: string; /** the sorting to apply to the value */ sort?: ValueSort | undefined; /** define how the values should be normalized */ normalize?: Normalize | null | undefined; }; /** Definition of a string field encoding */ export type StringEncodingBase = { /** the data field to encode, this must be a BooleanType, IntegerType, FloatType, StringType or DateTimeType field within the provided data */ field: string; /** the type of encoding */ type: FieldType; /** the title to display*/ title?: string | undefined; }; /** Definition of a string field encoding */ export type StringEncoding = StringEncodingBase & { /** the kind of value */ kind: 'string'; /** the human readable name of the field */ name: string; /** the sort to apply to the value */ sort?: EncodingSort | undefined; }; /** Definition of a discrete field color encoding, which can be used to visually group data. */ export type DiscreteColorEncodingBase = { /** the data field to encode, this must be a BooleanType, IntegerType, FloatType, StringType or DateTimeType field within the provided data */ field: string; /** the type of encoding */ type: FieldType; /** the title to display*/ title?: string | undefined; }; /** Definition of a discrete field color encoding, which can be used to visually group data. */ export type DiscreteColorEncoding = DiscreteColorEncodingBase & { /** the kind of value */ kind: 'discrete'; /** the human readable name of the field */ name: string; /** a the color for each color value */ scale?: [value: string, color: string][] | undefined; }; /** Definition of a continuous field color encoding */ export type ContinuousColorEncodingBase = { /** the data field to encode, this must be a BooleanType, IntegerType, FloatType, StringType or DateTimeType field within the provided data */ field: string; /** the type of encoding */ type: FieldType; /** the title to display*/ title?: string | undefined; /** * The aggregation operation for the field (e.g., "mean", "sum", "median", "min", "max", "count". * The aggregate property of a field definition can be used to compute aggregate summary statistics (e.g., median, min, max) over groups of data. * If at least one fields in the specified encoding channels contain aggregate, the resulting visualization will show aggregate data. In this case, all fields without aggregation function specified are treated as group-by fields1 in the aggregation process. * For example, the following bar chart aggregates mean of Acceleration, grouped by the number of Cylinders. * ```typescript * "encodings": { * "x": {"field": "Cylinders"}, * "color": {"aggregate": "mean", "field": "Acceleration"} * } * Note: aggregated fields are quantitative by default while unaggregated (group by) fields in aggregated encodings are nominal by default. * ``` * */ aggregate?: Aggregate | undefined; }; /** Definition of a continuous field color encoding */ export type ContinuousColorEncoding = ContinuousColorEncodingBase & { /** the kind of value */ kind: 'continuous'; /** the human readable name of the field */ name: string; /** the binning of the values, used to create discrete bins of data from numeric data */ bin?: Bin | boolean | undefined; }; /** Definition for a point mark shape. */ export type PointShape = "circle" | "square" | "cross" | "diamond" | "triangle-up" | "triangle-down" | "triangle-right" | "triangle-left"; /** Definition a chart mark as a point */ export type PointMarkBase = { /** the kind of value */ kind: 'point'; }; /** Definition a chart mark as a point */ export type PointMark = PointMarkBase & { /** the shape to draw for each point */ shape?: PointShape | undefined; /** the shape to draw for each point */ size?: number | undefined; /** true if the shape should be filled */ shape_filled?: boolean | undefined; /** the mark opacity */ opacity?: number | undefined; /** the mark fill color */ fill?: string | undefined; /** the mark fill opacity */ fill_opacity?: number | undefined; /** the mark stroke */ stroke?: string | undefined; /** the mark stroke width */ stroke_width?: number | undefined; /** the mark stroke opacity */ stroke_opacity?: number | undefined; /** the mark stroke dash */ stroke_dash?: [stroke: number, space: number] | undefined; }; /** Definition for a bar mark orientation */ export type Orientation = 'horizontal' | 'vertical'; /** Definition a chart mark as a horizontal or vertical bar */ export type BarMarkBase = { /** the kind of value */ kind: 'bar'; /** the shape to draw for each point */ orient?: Orient | undefined; }; /** Definition a chart mark as a horizontal or vertical bar */ export type BarMark = BarMarkBase & { /** the mark opacity */ opacity?: number | undefined; /** the mark fill color */ fill?: string | undefined; /** the mark fill opacity */ fill_opacity?: number | undefined; /** the mark stroke */ stroke?: string | undefined; /** the mark stroke width */ stroke_width?: number | undefined; /** the mark stroke opacity */ stroke_opacity?: number | undefined; /** the mark stroke dash */ stroke_dash?: [stroke: number, space: number] | undefined; }; /** * Definition the interpolation to use for a line or area chart, which may one of the following values: * - "linear": piecewise linear segments, as in a polyline. * - "linear-closed": close the linear segments to form a polygon. * - "step": alternate between horizontal and vertical segments, as in a step function. * - "step-before": alternate between vertical and horizontal segments, as in a step function. * - "step-after": alternate between horizontal and vertical segments, as in a step function. * - "basis": a B-spline, with control point duplication on the ends. * - "basis-open": an open B-spline; may not intersect the start or end. * - "basis-closed": a closed B-spline, as in a loop. * - "cardinal": a Cardinal spline, with control point duplication on the ends. * - "cardinal-open": an open Cardinal spline; may not intersect the start or end, but will intersect other control points. * - "cardinal-closed": a closed Cardinal spline, as in a loop. * - "bundle": equivalent to basis, except the tension parameter is used to straighten the spline. * - "monotone": cubic interpolation that preserves monotonicity in y. * */ export type Interpolate = "basis" | "basis-open" | "basis-closed" | "bundle" | "cardinal" | "cardinal-open" | "cardinal-closed" | "catmull-rom" | "linear" | "linear-closed" | "monotone" | "natural" | "step" | "step-before" | "step-after"; /** Definition a chart mark as a line */ export type LineMarkBase = { /** the kind of value */ kind: 'line'; /** the line interpolation to apply */ interpolate?: Interpolate | undefined; }; /** Definition a chart mark as a line */ export type LineMark = LineMarkBase & { /** the mark opacity */ opacity?: number | undefined; /** the mark fill color */ fill?: string | undefined; /** the mark fill opacity */ fill_opacity?: number | undefined; /** the mark stroke */ stroke?: string | undefined; /** the mark stroke width */ stroke_width?: number | undefined; /** the mark stroke opacity */ stroke_opacity?: number | undefined; /** the mark stroke dash */ stroke_dash?: [stroke: number, space: number] | undefined; }; /** Definition a chart mark as a line */ export type AreaMarkBase = { /** the kind of value */ kind: 'area'; /** the line interpolation to apply */ interpolate?: Interpolate | undefined; }; /** Definition a chart mark as a line */ export type AreaMark = AreaMarkBase & { /** the mark opacity */ opacity?: number | undefined; /** the mark fill color */ fill?: string | undefined; /** the mark fill opacity */ fill_opacity?: number | undefined; /** the mark stroke */ stroke?: string | undefined; /** the mark stroke width */ stroke_width?: number | undefined; /** the mark stroke opacity */ stroke_opacity?: number | undefined; /** the mark stroke dash */ stroke_dash?: [stroke: number, space: number] | undefined; }; /** Definition a chart mark as a rectangle */ export type RectMarkBase = { /** the kind of value */ kind: 'rect'; }; /** Definition a chart mark as a rectangle */ export type RectMark = RectMarkBase & { /** the mark opacity */ opacity?: number | undefined; /** the rectangle width */ width?: number | undefined; /** the rectangle height */ height?: number | undefined; /** the mark fill color */ fill?: string | undefined; /** the mark fill opacity */ fill_opacity?: number | undefined; /** the mark stroke */ stroke?: string | undefined; /** the mark stroke width */ stroke_width?: number | undefined; /** the mark stroke opacity */ stroke_opacity?: number | undefined; /** the mark stroke dash */ stroke_dash?: [stroke: number, space: number] | undefined; }; /** Definition a chart mark as a box plot, error band or error bar */ export type BoxPlotMarkBase = Kind extends 'boxplot' ? { /** the kind of value */ kind: Kind; /** the line interpolation to apply */ extent?: "min-max" | number | undefined; } : Kind extends 'errorband' ? { /** the kind of value */ kind: Kind; /** the line interpolation to apply */ extent?: "ci" | "stderr" | "stdev" | "iqr" | undefined; } : { /** the kind of value */ kind: Kind; /** the line interpolation to apply */ extent?: "ci" | "stderr" | "stdev" | "iqr" | undefined; }; /** Definition a chart mark as a box plot, error band or error bar */ export type BoxPlotMark = Kind extends 'boxplot' ? BoxPlotMarkBase & { /** the dash style to apply */ invalid?: 'filter' | null | undefined; /** the mark opacity */ opacity?: number | undefined; /** the mark fill color */ fill?: string | undefined; /** the mark fill opacity */ fill_opacity?: number | undefined; /** the mark stroke */ stroke?: string | undefined; /** the mark stroke width */ stroke_width?: number | undefined; /** the mark stroke opacity */ stroke_opacity?: number | undefined; /** the mark stroke dash */ stroke_dash?: [stroke: number, space: number] | undefined; } : Kind extends 'errorband' ? BoxPlotMarkBase & { /** the dash style to apply */ invalid?: 'filter' | null | undefined; /** the mark opacity */ opacity?: number | undefined; /** the mark fill color */ fill?: string | undefined; /** the mark fill opacity */ fill_opacity?: number | undefined; /** the mark stroke */ stroke?: string | undefined; /** the mark stroke width */ stroke_width?: number | undefined; /** the mark stroke opacity */ stroke_opacity?: number | undefined; /** the mark stroke dash */ stroke_dash?: [stroke: number, space: number] | undefined; } : BoxPlotMarkBase & { /** the dash style to apply */ invalid?: 'filter' | null | undefined; /** the mark opacity */ opacity?: number | undefined; /** the mark fill color */ fill?: string | undefined; /** the mark fill opacity */ fill_opacity?: number | undefined; /** the mark stroke */ stroke?: string | undefined; /** the mark stroke width */ stroke_width?: number | undefined; /** the mark stroke opacity */ stroke_opacity?: number | undefined; /** the mark stroke dash */ stroke_dash?: [stroke: number, space: number] | undefined; /** the thickness of the bar */ thickness?: number | undefined; }; /** Definition a chart mark as a tick */ export type TickMarkBase = { /** the kind of value */ kind: 'tick'; }; /** Definition a chart mark as a tick */ export type TickMark = TickMarkBase & { /** the shape to draw for each point */ corner_radius?: number | undefined; /** the mark opacity */ opacity?: number | undefined; /** the mark fill color */ fill?: string | undefined; /** the mark fill opacity */ fill_opacity?: number | undefined; /** the mark stroke */ stroke?: string | undefined; /** the mark stroke width */ stroke_width?: number | undefined; /** the mark stroke opacity */ stroke_opacity?: number | undefined; /** the mark stroke dash */ stroke_dash?: [stroke: number, space: number] | undefined; /** the thickness of the tick */ thickness?: number | undefined; }; /** Definition a chart mark as arc segments */ export type ArcMarkBase = { /** the kind of value */ kind: 'arc'; }; /** Definition a chart mark as arc segments */ export type ArcMark = ArcMarkBase & { /** the radius of each segment */ corner_radius?: number | undefined; /** the padding angle between segments */ pad_angle?: number | undefined; /** the mark opacity */ opacity?: number | undefined; /** the mark fill color */ fill?: string | undefined; /** the mark fill opacity */ fill_opacity?: number | undefined; /** the mark stroke */ stroke?: string | undefined; /** the mark stroke width */ stroke_width?: number | undefined; /** the mark stroke opacity */ stroke_opacity?: number | undefined; /** the mark stroke dash */ stroke_dash?: [stroke: number, space: number] | undefined; }; /** * Marks are the basic visual building block of a chart, they provide basic shapes whose properties (such as position, size, and color) can be used to visually encode data, either from a data field, or a constant value. * * */ export type MarkBase = BarMarkBase | AreaMarkBase | LineMarkBase | BarMarkBase | PointMarkBase | BoxPlotMarkBase | RectMarkBase | TickMarkBase | ArcMarkBase; /** * Marks are the basic visual building block of a chart, they provide basic shapes whose properties (such as position, size, and color) can be used to visually encode data, either from a data field, or a constant value. * * */ export type Mark = BarMark | AreaMark | LineMark | BarMark | PointMark | BoxPlotMark | RectMark | TickMark | ArcMark; /** Definition of all possible field encodings */ export type AxisEncodingBase = NumericEncodingBase | StringEncodingBase | TemporalEncodingBase; /** Definition of all possible field encodings */ export type AxisEncoding = NumericEncoding | StringEncoding | TemporalEncoding; /** Definition of all possible color encodings */ export type ColorEncodingBase = DiscreteColorEncodingBase | ContinuousColorEncodingBase; /** Definition of all possible color encodings */ export type ColorEncoding = DiscreteColorEncoding | ContinuousColorEncoding; /** Definition of the channels to encode formatting for a chart */ export type FormatEncodings = { /** define how to encode the opacity */ opacity?: AxisEncoding | undefined; /** define how to encode the fill opacity */ fill_opacity?: AxisEncoding | undefined; /** define how to encode the stroke opacity */ stroke_opacity?: AxisEncoding | undefined; /** define how to encode the stroke width */ stroke_width?: AxisEncoding | undefined; /** define how to encode the stroke dash */ stroke_dash?: AxisEncoding | undefined; /** define how to encode the detail */ detail?: AxisEncoding | undefined; }; /** Definition of the configuration and channels to encode axes and formatting for a cartesian chart */ export type CartesianEncodings = { type: 'cartesian'; /** the human readable name and title for the chart */ name: string; /** * Marks are the basic visual building block of a visualization. They provide basic shapes whose properties (such as x, y, size, and color) can be used to visually encode data, either from a data field * - 'point': point mark represents each data point with a symbol. Point marks are commonly used in visualizations like scatterplots.. * - 'bar': Bar marks are useful in many visualizations, including bar charts, stacked bar charts, and timelines. * - 'line': The line mark represents the data points stored in a field with a line connecting all of these points. Line marks are commonly used to depict trajectories or change over time. Unlike most other marks that represent one data element per mark, one line mark represents multiple data element as a single line, akin to area and trail. * - 'area': area represent multiple data element as a single area shape. Area marks are often used to show change over time, using either a single area or stacked areas. * - 'rect': The rect mark represents an arbitrary rectangle. * - 'boxplot': A box plot summarizes a distribution of quantitative values using a set of summary statistics. The median tick in the box represents the median. The lower and upper parts of the box represent the first and third quartile respectively. Depending on the type of box plot, the ends of the whiskers can represent multiple things. * - 'tick': The tick mark represents each data point as a short line. This is a useful mark for displaying the distribution of values in a field. */ mark: Mark; /** Definition of how to encode a field into the x coordinates of the marks, or width of horizontal "bar" and "area" without specified x2 or width. */ x?: AxisEncoding | undefined; /** Definition of how to encode the x2 coordinates for the span of ranged "area", "bar", "rect", and "rule". */ x2?: AxisEncoding | undefined; /** Definition of how to encode a field into the y coordinates of the marks, or height of vertical "bar" and "area" without specified y2 or height. */ y?: AxisEncoding | undefined; /** Definition of how to encode the y2 coordinates for the span of ranged "area", "bar", "rect", and "rule". */ y2?: AxisEncoding | undefined; /** the encoding of a field to the color channel */ color?: ColorEncoding | undefined; /** the encoding of a field to the size channel, only applicable for a "point" mark */ size?: AxisEncoding | undefined; /** the encoding of a field to the shape channel, only applicable for a "point" mark */ shape?: AxisEncoding | undefined; } & FormatEncodings; /** Definition of the configuration and channels to encode axes and formatting for a radial chart */ export type RadialEncodings = { type: 'radial'; /** the human readable name and title for the chart */ name: string; /** the mark to display in the chart */ mark: ArcMark; /** the encoding of a field to to radial chart segment angle channel */ angle: AxisEncoding; /** the encoding of a field to to radial chart segment radius channel */ radius?: AxisEncoding | undefined; /** the encoding of a field to the color channel */ color?: ColorEncoding | undefined; } & FormatEncodings; /** The possible chart encodings, that define the configuration and channels to encode axes and formatting a chart */ export type Encodings = CartesianEncodings | RadialEncodings; export type ChartDefinition = { encodings: Encodings; }; export declare function checkEncodings(encodings: Encodings, type: StructType): void; /** Definition of the configuration and channels to encode axes and formatting for a cartesian chart */ export type CartesianEncodingsBase = { /** the human readable name and title for the chart */ name: string; /** * Marks are the basic visual building block of a visualization. They provide basic shapes whose properties (such as x, y, size, and color) can be used to visually encode data, either from a data field * - 'point': point mark represents each data point with a symbol. Point marks are commonly used in visualizations like scatterplots.. * - 'bar': Bar marks are useful in many visualizations, including bar charts, stacked bar charts, and timelines. * - 'line': The line mark represents the data points stored in a field with a line connecting all of these points. Line marks are commonly used to depict trajectories or change over time. Unlike most other marks that represent one data element per mark, one line mark represents multiple data element as a single line, akin to area and trail. * - 'area': area represent multiple data element as a single area shape. Area marks are often used to show change over time, using either a single area or stacked areas. * - 'rect': The rect mark represents an arbitrary rectangle. * - 'boxplot': A box plot summarizes a distribution of quantitative values using a set of summary statistics. The median tick in the box represents the median. The lower and upper parts of the box represent the first and third quartile respectively. Depending on the type of box plot, the ends of the whiskers can represent multiple things. * - 'tick': The tick mark represents each data point as a short line. This is a useful mark for displaying the distribution of values in a field. */ mark: MarkBase; /** Definition of how to encode a field into the x coordinates of the marks, or width of horizontal "bar" and "area" without specified x2 or width. */ x: AxisEncodingBase; /** Definition of how to encode a field into the y coordinates of the marks, or height of vertical "bar" and "area" without specified y2 or height. */ y: AxisEncodingBase; /** the encoding of a field to the color channel */ color?: ColorEncodingBase | undefined; /** the encoding of a field to the size channel, only applicable for a "point" mark */ size?: AxisEncodingBase | undefined; /** the encoding of a field to the shape channel, only applicable for a "point" mark */ detail?: AxisEncodingBase | undefined; }; export declare function fromAxisEncodingBase(encoding: AxisEncodingBase, field: T): AxisEncoding | undefined; export declare function fromColorEncodingBase(encoding: ColorEncodingBase, field: T): ColorEncoding | undefined; export declare function fromCartesianEncodingBase(encoding: CartesianEncodingsBase, type: StructType): CartesianEncodings;